|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
||||
|
||||
|
Quote:
__________________
Click the image if at any point you don't like my decision.Ask the Windows Guru! |
|
#3
|
|||
|
|||
|
Quote:
No thats actually a large piece of code... Can you just tell me what might be the problem? |
|
#4
|
|||
|
|||
|
Quote:
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.... |
|
#5
|
||||
|
||||
|
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.
|
|
#6
|
|||
|
|||
|
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. |
|
#7
|
||||
|
||||
|
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! |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Unterminated String Constant |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|