Teruhiko Kurosaka wrote:
I have a form that sets the hl.fl form hidden variable.
I wanted to change the higlighted field depending on the
query string that is typed, using JavaScript.
This is normally done by the JavaScript code like this:
        document.myform.varname.value = "whatever"
But this doesn't work for hl.fl because the name of
the variable includes a dot that JavaScript interprets
as a layer separator:
        document.myform.hl.fl.value
would be interpreted as document.my form.hl's
subelement named fl.  I tried this but it didn't work:
        document.myforom.hl\u002Efl.value

Is there any other way to change the form variable
named hl.fl?


can't you use something like:

document.forms["FormName"].elements["Input.Name"].value

or:

<input id="myhlfield" ...>

document.getElementById( "myhlfield" ).value


For the futuer versions, may I suggest removing the
dots from this and other variables?


the dot syntax is used in many places, and can't easily be removed...

ryan

Reply via email to