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

Javascript error 1

Status
Not open for further replies.

ck1999

Technical User
Dec 2, 2004
784
US
Error: missing ) after argument list

Code:
<script type="text/javascript">document.writeln('<img id="2" src="up.png" width="15" height="8" alt="Open list" onClick="toggle('2');">');</script>


Any ideas?


ck1999
 
You have to escape your single quotes:
Code:
<script type="text/javascript">document.writeln('<img id="2" src="up.png" width="15" height="8" alt="Open list" onClick="toggle([!]\[/!]'2[!]\[/!]');">');</script>

-kaht

[small](All puppies have now found loving homes, thanks for all who showed interest)[/small]
 
you're having nested quotation mark issues. try this:

Code:
<script type="text/javascript">
document.writeln('<img id="2" src="up.png" width="15" height="8" alt="Open list" onClick="toggle([red]\[/red]'2[red]\[/red]');">');
</script>



*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
You even copied my red backslashes, how cute.....

-kaht

[small](All puppies have now found loving homes, thanks for all who showed interest)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top