JavaScript popup from main menu?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
chilsta
Forum Members
Forum Members
Posts: 52
Joined: Thu Oct 20, 2005 8:22 pm

JavaScript popup from main menu?

Post by chilsta »

I need to add a popup from the main menu which will open a popup using javascript like this guy.

I have to use Javascript because I need to be able define the properties of the new window, which isn't possible using target="_blank".

For accessibility/ usability reasons I'd like to use A List Apart's method (unless there's a better/ easier option?).

What that boils down to is needing to be able to define an ID (or class) for the link:

Code: Select all

	<a id="popup-feat" href="example_popup.html">link</a>
there's then a Javascript event listener which is placed in external .js file.

Any help with this'd be much appreciated.
Last edited by chilsta on Tue Nov 25, 2008 12:26 pm, edited 1 time in total.
User avatar
chilsta
Forum Members
Forum Members
Posts: 52
Joined: Thu Oct 20, 2005 8:22 pm

Re: JavaScript popup from main menu?

Post by chilsta »

Bumping as I've still not found a solution to this- there must be some way of adding an accessible, configurable popup to CMSMS' main menu?
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: JavaScript popup from main menu?

Post by Dee »

You can define an ID (or class) for the link in your menu template.
For an ID you can use for example id="{$node->alias}"

(see also http://forum.cmsmadesimple.org/index.ph ... #msg134302)

Regards,
D
User avatar
chilsta
Forum Members
Forum Members
Posts: 52
Joined: Thu Oct 20, 2005 8:22 pm

Re: JavaScript popup from main menu?

Post by chilsta »

Thanks very much Dee-

That looks like exactly what I need.
I'm hoping it will also fix another site I have which validates apart from one small niggle with an ID in the nav being repeated- this should get rid of that.

Will experiment and get back.
Post Reply

Return to “CMSMS Core”