JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 27th, 2007, 03:09 AM
hermoine hermoine is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 4 hermoine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 37 sec
Reputation Power: 0
Lightbulb Unterminated String Constant

I am using javascript in jsp... In my page there is a text box which needs a input for date. I use a function for popup of the calender and then on selecting the date will include the date in the text box... there seems to be no problem with the code...

fn(this,textbox1) is the function.... there is no problem with the code since if i use it in html it works perfectly.. But however it says Unterminated String Constant when i use it in jsp....

I could not rectify it... Can you tell me what could be the problem with it?

Reply With Quote
  #2  
Old August 27th, 2007, 05:12 AM
Nilpo's Avatar
Nilpo Nilpo is offline
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Location: Near Dev Articles Headquarters
Posts: 127 Nilpo User rank is Private First Class (20 - 50 Reputation Level)Nilpo User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 11 h 58 m
Reputation Power: 3
Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo
MySpace
Quote:
Originally Posted by hermoine
Can you tell me what could be the problem with it?
Not without seeing your code.
__________________
Click the image if at any point you don't like my decision.

Ask the Windows Guru!


Reply With Quote
  #3  
Old August 27th, 2007, 05:42 AM
hermoine hermoine is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 4 hermoine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 37 sec
Reputation Power: 0
Lightbulb Unterminated String Constant

Quote:
Originally Posted by Nilpo
Not without seeing your code.


No thats actually a large piece of code...

Can you just tell me what might be the problem?

Reply With Quote
  #4  
Old August 27th, 2007, 06:53 AM
hermoine hermoine is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 4 hermoine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 37 sec
Reputation Power: 0
Lightbulb Unterminated String Constant

Quote:
Originally Posted by hermoine
Can you just tell me what might be the problem?


Actually i have a js file which i have included in my jsp file...

here i call the fn()...

its like....
Code:

<input type="text" name="t1">
<img src="img.gif" onClick="fn(this,t1)">


This code works perfectly as html... but when i change this to jsp and run thru servers its not working.. i am not able to figure it out... It gives a javascript error as "Unterminated String Constant" and then if i click on the image then it gives a javascript error as "Object Expected"...

Can any one help me out....

Reply With Quote
  #5  
Old August 27th, 2007, 02:27 PM
Nilpo's Avatar
Nilpo Nilpo is offline
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Location: Near Dev Articles Headquarters
Posts: 127 Nilpo User rank is Private First Class (20 - 50 Reputation Level)Nilpo User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 11 h 58 m
Reputation Power: 3
Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo
MySpace
Unterminated String Constant generally means there is an issue with quotation marks. If you're trying to include them in a string value, be sure that they are properly escaped.

Reply With Quote
  #6  
Old August 29th, 2007, 12:48 AM
hermoine hermoine is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 4 hermoine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 37 sec
Reputation Power: 0
Lightbulb Problem solved...

Thanks for all your replies. I found what the problem was. I was using french text in my code(for display purpose.). and i found from my search that usually such special fonts like ü will be taken as o' in javascript. hence it was giving an unterminated string constant error.

Thanks a lot friends.

Reply With Quote
  #7  
Old August 29th, 2007, 12:50 AM
Nilpo's Avatar
Nilpo Nilpo is offline
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Location: Near Dev Articles Headquarters
Posts: 127 Nilpo User rank is Private First Class (20 - 50 Reputation Level)Nilpo User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 11 h 58 m
Reputation Power: 3
Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo
MySpace
No problem. Thanks for replying with your solution. That's an interesting problem that I would have never guessed.

Glad you got it figured out!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Unterminated String Constant


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway