Javascript appears in different area?
Permalink
I have a page that shows content within different tabs. I have three tabs, each with two c5 areas. This mostly works great - but I have an issue with some client supplied JS I need to appear.
Here's the page:
http://67.52.57.24/index.php/vici-beauty-schools/request-appointmen...
There's a form that displays in each tab - at least that's the way it should work. If you scroll down a bit you'll see that the Milwaukee tab has two forms in it... the second is an HTML block placed after the image in the Bayshore tab.
It shows properly if you view source - the JS in in the Bayshore tab, after the image. Yet it appears in the Milwaukee tab, after the first form... I thought it was my code - but the image works fine...
Any one have any suggestions?
Here's the page:
http://67.52.57.24/index.php/vici-beauty-schools/request-appointmen...
There's a form that displays in each tab - at least that's the way it should work. If you scroll down a bit you'll see that the Milwaukee tab has two forms in it... the second is an HTML block placed after the image in the Bayshore tab.
It shows properly if you view source - the JS in in the Bayshore tab, after the image. Yet it appears in the Milwaukee tab, after the first form... I thought it was my code - but the image works fine...
Any one have any suggestions?
I don't see any tabs -- can you be more specific?
Sorry about that. This thing has to go to client review today and I decided to ditch the tabs and just have the user select where they want to make an appointment to with three radio buttons at the top.
Trying to get a click on one of the radio buttons to modify a variable that gets posted with the form. Not having much luck so far...
Trying to get a click on one of the radio buttons to modify a variable that gets posted with the form. Not having much luck so far...
Yeesh. My attempt at using radio buttons didn't pan out so I'm back to the tabs. Hoping I can figure out why this form is appearing where I don't want it to.
Link in first post demonstrates the problem now.
Link in first post demonstrates the problem now.
The Packers are on you fool.
I found out the forms can go in the proper div ok. I removed the milwaukee and bayshore forms, and then just the madison one appears, in the madison tab.
If I put the form in for bayshore, then both the bayshore and madison forms appear in the bayshore tab. And then if I put in milwaukee, all three forms appear in the milwaukee tab.
Anyone have an idea what I might be doing wrong?
If I put the form in for bayshore, then both the bayshore and madison forms appear in the bayshore tab. And then if I put in milwaukee, all three forms appear in the milwaukee tab.
Anyone have an idea what I might be doing wrong?
Tabs are tricky -- I think the javascript for them interferes with C5 javascript for the editing interface. There is one or two addons in the marketplace that do the tabs but use blocks that are in a scrapbook instead. You might try using one of those addons or just using that approach instead.
Thanks for the reply. I solved it using iframes... a bit hacky but it does what I need.
I have an add-on package under development that takes a different approach to give a site admin complete control over how blocks and groups of blocks in an area are split into tabs (or potentially anything else an area could split into). I am developing under C5 v4.2.2 so it is compatible with earlier versions, but not have not tried it under 5.5 yet.
At the moment I would describe it as 'alpha'. Where it works, it works well, but I don't yet have enough use-cases to have developed the code for it to be robust in all situations and cant be sure that changes I make during ongoing development will remain compatible. Also, some blocks (like maps) are troublesome (I have a hacky work around for maps). It also currently lacks polished tab chrome, just outputting a list of headings.
Anyway, it is at the stage where it could do with some limited 'alpha' testing by a few hardened C5 developers. PM me if you want to give it a go.
At the moment I would describe it as 'alpha'. Where it works, it works well, but I don't yet have enough use-cases to have developed the code for it to be robust in all situations and cant be sure that changes I make during ongoing development will remain compatible. Also, some blocks (like maps) are troublesome (I have a hacky work around for maps). It also currently lacks polished tab chrome, just outputting a list of headings.
Anyway, it is at the stage where it could do with some limited 'alpha' testing by a few hardened C5 developers. PM me if you want to give it a go.