Zifnab
07-02-2003, 07:44 AM
Link to page:
testje.html (http://www.sscdata.com/test/testje.html)
Situation:
1) Frameset named "testje.html" into which "mainMenu.js (http://www.sscdata.com/test/mainMenu.js)" is loaded
2) "mainMenu.js (http://www.sscdata.com/test/mainMenu.js)" is a popup-menu JS that works across frames, in which all properties, text, name and links of the popup menu items are (see lines 507-542 of the file)
3) in order for the popup menu to work across frames, the html-files that are loaded into the frameset and where parts of the popup menu should show, load the "subfr.js (http://www.sscdata.com/test/subfr.js)" JS file.
4) In the frame langR (langR.html (http://www.sscdata.com/test/langR.html)) a number of buttons are loaded which change the content of a number of frames through the functions in "langSwap.js (http://www.sscdata.com/test/langSwap.js)".
What I want to achieve:
Clicking on one of the buttons in langR.html (http://www.sscdata.com/test/langR.html) that the text and links of the menu items also gets (read: can be) changed.
I hope this makes some sense... took me a while to figure out how to explain it... :p
Basically, what I was wondering is whether it's possible to "modify" a piece of JS through the use of another piece of JS... so say that lines 507-542 are substituted by a function-call or something, which depending on the current/last "language" selected, through for example the changeLang() function, gets a list of the values for the text/links of the different menu items from a text-file or XML or something (I don't know any XML though :( )... and "refreshes" the menu, but without having to reload the entire frameset...
Hmm... I wonder whether this just made it more or less confusing than before... :p
btw... if my terminology/thought-line seems a bit strange, it's because I'm used to Flash Actionscript... :D
testje.html (http://www.sscdata.com/test/testje.html)
Situation:
1) Frameset named "testje.html" into which "mainMenu.js (http://www.sscdata.com/test/mainMenu.js)" is loaded
2) "mainMenu.js (http://www.sscdata.com/test/mainMenu.js)" is a popup-menu JS that works across frames, in which all properties, text, name and links of the popup menu items are (see lines 507-542 of the file)
3) in order for the popup menu to work across frames, the html-files that are loaded into the frameset and where parts of the popup menu should show, load the "subfr.js (http://www.sscdata.com/test/subfr.js)" JS file.
4) In the frame langR (langR.html (http://www.sscdata.com/test/langR.html)) a number of buttons are loaded which change the content of a number of frames through the functions in "langSwap.js (http://www.sscdata.com/test/langSwap.js)".
What I want to achieve:
Clicking on one of the buttons in langR.html (http://www.sscdata.com/test/langR.html) that the text and links of the menu items also gets (read: can be) changed.
I hope this makes some sense... took me a while to figure out how to explain it... :p
Basically, what I was wondering is whether it's possible to "modify" a piece of JS through the use of another piece of JS... so say that lines 507-542 are substituted by a function-call or something, which depending on the current/last "language" selected, through for example the changeLang() function, gets a list of the values for the text/links of the different menu items from a text-file or XML or something (I don't know any XML though :( )... and "refreshes" the menu, but without having to reload the entire frameset...
Hmm... I wonder whether this just made it more or less confusing than before... :p
btw... if my terminology/thought-line seems a bit strange, it's because I'm used to Flash Actionscript... :D