Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable format?

Status
Not open for further replies.

gagz

Programmer
Nov 21, 2002
333
US
* i asked this in the javascript forum, but since its .net related, i thought someone here may have run into it*

is this legal? ie, the ":" in the html element name?

I can't change the name of the html element because of how .NET renders elements in usercontrols. however, the error i get on this line is:
Code:
Error: missing ; before statement
Source File: [URL unfurl="true"]http://localhost/Library/tableHead.js[/URL]
Line: 8, Column: 39
Source Code:
  var date1 = document.Form1.rfpBodyCtl:txtPreferredDate1;

the source code is the line (pointing at the word Form1)...
is there another way to declare this? maybe using () or [] or something?

thanks for the help.
 
nm, got it:
document.forms['Form1'].elements['foo:bar'];
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top