Hi!
I'm quite new to Javascript and I have a problem.
I have a menu-framework that is generated from php that writes menu items dynamically from a Database.
My Website is a frameset based site with a left frame, a top frame and a main frame. The main frame is called "middleFrame". The menu is on the left frame. When I click on a link on the menu I want the link to open in the mainframe and I want the leftframe to stay as it is.
The syntax of adding a menuitem is like this:
-So when I try to make a new node I do like this:
The node is added and it puts the output from 'main.php?a=11&mapp_fk=436' on the mainframe when I click the link, but it also destroys my left frame. My leftframe contains only the text 'main.php?a=11&mapp_fk=436' after I have clicked the link, so the menu and everything disappears...
What am i doing wrong?
In advance, thanks!
Greetings
Pål
Pål Nesteby
PDC-Tangen
Norway
I'm quite new to Javascript and I have a problem.
I have a menu-framework that is generated from php that writes menu items dynamically from a Database.
My Website is a frameset based site with a left frame, a top frame and a main frame. The main frame is called "middleFrame". The menu is on the left frame. When I click on a link on the menu I want the link to open in the mainframe and I want the leftframe to stay as it is.
The syntax of adding a menuitem is like this:
Code:
palmtree.addItem("name of menuitem", name of the parent node, "url")
-So when I try to make a new node I do like this:
Code:
palmtree.addItem("Nodename", Nodeparent, "javascript:parent.frames['middleFrame'].location.href='main.php?a=11&mapp_fk=436'");
The node is added and it puts the output from 'main.php?a=11&mapp_fk=436' on the mainframe when I click the link, but it also destroys my left frame. My leftframe contains only the text 'main.php?a=11&mapp_fk=436' after I have clicked the link, so the menu and everything disappears...
What am i doing wrong?
In advance, thanks!
Greetings
Pål
Pål Nesteby
PDC-Tangen
Norway