Click to See Complete Forum and Search --> : re-calling of external JS. Please help


GoViNdA
03-12-2003, 03:04 AM
hi all.

I have a problem such that;
I have a menu script, that is very complicated and I am loading it as external js file.

and I have a menu list that give chance to personalize the menu.
Now I modify the script for; when the user select the one of items in menu script and press "refresh" the vfalue taken from the listbox modifies the JS.

My code is working in my computer but when I upload to net it is not working, because when I press the refresh button listbox refreshes too.

You can see it at ht*p://www.pulsar.com.tr
there is a listbox on left vertical bar. If you save the page to your computer and do what I said you can see my aim.

Now, If I can re-call the external JS without refreshing but just pressing a key or just when listbox value is changed, this will solve my problem.

Or, refreshing the site without loss of listmenu value solve my problem too.

Please help me.

Thank you

khalidali63
03-12-2003, 07:56 AM
here is what I understood from your question and by taking a lookat the page,
if you change a value in the list box and refresh it will never change the *.js files values,and if it is doing this on your PC then there is something really freaky hapening(Javascript can write toa file without a third party utility).

What you should do is in the onchange event of the select element call a function that changes the required value in the js file for you.

Cheers

Khalid

GoViNdA
03-13-2003, 07:10 AM
Firstly, thank you very much for your interest to my problem.

My prożblem is exactly what you understood.

I see what you said, I tried but I couldn't
I think I don't know well how to handle variables in JS

in my code I used

form.option.value
but I realized I should use

POST_VAR.select.value

but I couldn't handle the variable

If yopu can give me a way to overcome this problem I would appriciate very much

thank you again