This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Facing problem to pass a quoted String as a parameter in javascript function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Facing problem to pass a quoted String as a parameter in javascript function" Watch "Facing problem to pass a quoted String as a parameter in javascript function" New topic
Author

Facing problem to pass a quoted String as a parameter in javascript function

Pradeep Chaubey
Greenhorn

Joined: Jun 15, 2009
Posts: 20
Dear members,
I am facing a problem passing a parameter under a single quote in javascript function in IE8, Its working fine in firefox.
I am using Tapestry 5. My code is as follows :


I tried the in this format also :


The javascript function never gets called and when I remove the Quote from the String it works.
Plase help me to resolve the issue.

Chris Baron
Ranch Hand

Joined: Mar 21, 2003
Posts: 1049
Maybe it's the leading "javascript:". That doesn't belong to an onclick attribute.
Pradeep Chaubey
Greenhorn

Joined: Jun 15, 2009
Posts: 20
Hi Chris ,

I have got my problem resolved. It was not because of leading javascript. Actually the parameters were
dynamically getting populated and the bean which was doing this, was having wrong value for a quoted String.
That's why the javascript function was not called.

Thank you very much, you spent your valuable time in this problem.
 
jQuery in Action, 2nd edition
 
subject: Facing problem to pass a quoted String as a parameter in javascript function
 
Similar Threads
Alert box problem
Open selected table row in edit mode in JSP using javascript
Return string from javascript function and display in text area.
dojo loading FilteringTable problem
dojo loading FilteringTable problem