error77
asked on
Syntax issue with javascript and quotes
Hi all,
I am having some issues with code synta not working...
For example:
This code works fine:
But this code (added via javascript does not):
I think the problem is here:
onclick="window.plugins.ch ildBrowser .showWebPa ge('http://mysite.com');" ....
to be more precise here:
('http://mysite.com');
but I've tried:
("'http://mysite.com'") and ("e;'http://mysite.com'"e;) but it still doesn't work.
Anyone got any ideas please?
Thanks
I am having some issues with code synta not working...
For example:
This code works fine:
<li>
<a href="#" onclick="window.plugins.childBrowser.showWebPage('http://www.mysite.com');">
<img src="images/thumb.jpg" />
<h3>Text Here</h3>
<p>text</p>
</a>
</li>
But this code (added via javascript does not):
output += '<li><a href="#" onclick="window.plugins.childBrowser.showWebPage('http://mysite.com');"><img src="'+value.thumbnail_url+'" /><h3>'+value.title+'</h3>'+value.body+'</a></li>';
I think the problem is here:
onclick="window.plugins.ch
to be more precise here:
('http://mysite.com');
but I've tried:
("'http://mysite.com'") and ("e;'http://mysite.com'"e;) but it still doesn't work.
Anyone got any ideas please?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.