3 Replies Latest reply on Jan 5, 2007 1:23 AM by arunbe

    Help with getURL using javascript

    CrazyMerlin Level 1
      Hey people!

      I have an swf embedded in a page, and to be able to do the validation I need, I also have a hidden text field.
      When the user selects a file using a filebrowse I need to populate the hidden field with the filename they selected.
      I make the hidden field to text so I can see it, and using

      getURL("javascript: document.getElementById('hidden_field').value = " + txtFile.name);

      works fine until the page suddenly clears and the javascript appears in the address bar.

      So the textbox does get the correct value, but then the browser redirects.

      How can I stop this? I understand the getURL should load a url to the browser but I thought sending it a simple JS line would not do that.

      TIA and Happy New Year to all of you.