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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Colon(:) throwing error in javascript

Status
Not open for further replies.

Jesse31

Programmer
Apr 5, 2002
7
CA
I have a line of javascript that is setting a .net control's value but it's throwing an error saying ";" expected. I'm guessing it's because of the colons in the control's name. Any ideas?[bigears]

<script language=&quot;javascript&quot;>window.opener.form(1).ctlCoreProjectInfo:txtProjectStartDate:txtDate='4/13/2002';window.close();</script>
 
I'm sorry but I see distinct problems with this code. I never saw anything such as this. Can anybody tell me if this is a Microsoft only feature?

on another note and I hope this helps you :

opener.document.form[1]

is how I access forms in javascript on an opener. you can also use the name of the form :

opener.document.myFormName

What did you use to create this code? Are you inspiring yoruself from another language?
Gary &quot; Haran
 
This code is supposed to represent my javascript call from a popup .net calendar to set a textbox's value from the calling window.
 
ouch. .NET you say?

eYoda : &quot;do not be tempted by the dark side. As a slave to you it presents itself and to him you become the slave.&quot;

Why not use a javascript calendar that works great without all the .NET implications? Gary Haran
 
I working in a .net environment and to tell you the truth, I don't know much about Javascript so I'm trying to stay away from it as much as possible. How does a Javascript calendar work?
 
In a few weeks I will post one that I have in another bigger project on my web site so if you are willing to wait a little while then you could use that one.

Otherwise you can do a search for a javascript calendar on the net (I recommend google). some are really well documented.

Hope this helps. Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top