Javascript menu link adding/modifying question,plz help

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
foufou
Beginner
Beginner
Posts: 5
Joined: Tue Apr 27, 2004 9:33 am

Javascript menu link adding/modifying question,plz help

Post by foufou »

hi
I needed to make a menu link targets 2 pages , each page in one of 2 separate iframes on mainpage, i searched the web, and came up with this javascript tip/solution:

<a href="javascript:top.frames[x].location.href='URL1';
top.frames[x].location.href='URL2';">Change Frames</a>

where "x" can be frames ID or NAME

how can i embed this into my menu links?
Thank u very much for ur patience
Last edited by foufou on Wed Apr 28, 2004 8:31 am, edited 1 time in total.
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

I don't know javascript. but it might be possible to use
text=<place it here>;type=html;

or the
javascipt=

I think the first will work because it allows you to create more than one link.

maz
foufou
Beginner
Beginner
Posts: 5
Joined: Tue Apr 27, 2004 9:33 am

Post by foufou »

hello
Thank you for your reply,

"text=<place it here>;type=html"

Like this?:

text=<<a href="javascript:top.frames[x].location.href='URL1';
top.frames[x].location.href='URL2';">Change Frames</a>>;type=html;


i don't know much about html, ..
I appreciate
foufou
Beginner
Beginner
Posts: 5
Joined: Tue Apr 27, 2004 9:33 am

Post by foufou »

Tried it, didn't work; the menu just disappears from the page, for the sake of lack of html knowledge i have , i 've tried it again this way:

text=<a href="javascript:top.frames[x].location.href='URL1';
top.frames[x].location.href='URL2';">Change Frames</a>;type=html;

With single "<" or ">"
Same result..
What shall i have to do
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

I'm not sure if this is supposed to work because I don't know javascript.

But the second try would be correct, but no apostrophes ' ' or quotes within menu items.

maz
Post Reply