I need to refer to a HTML form field name in JScript that contains a dash in it (<input name="where-taxon">), but whereas Netscape JavaScript doesn't have a problem, IE's JScript interprets the field name as a negation of two variables (where - taxon). <BR><BR>What I'm doing is pasting a value from an index in a child window into a field parent document:<BR><BR> function indexLookup(taxon) {<BR> opener.document.form s[0].where-taxon.value = taxon;<BR> self.close();<BR > }<BR><BR>I can't rename the field, so I am looking for a way to get IE to escape the dash or otherwise recognize the form element. <BR>I've tried escaping it with a backslash (where-taxon), and messing around with various quotes and braces. <BR>I'd rather not resort to the elements[] array to specify the field since the form dyncamicaly changes element positions (based on whether a cookie is set). <BR><BR>Any ideas?<BR>Mucho Thanks,<BR>Tony<BR>www.calflora.org<BR>Biodiversit y information on California wild plants for conservation, research, and education.


Reply With Quote
Bookmarks