Reply
missing ) after argument list when echoing HTML
Old 04-21-2008, 01:48 PM missing ) after argument list when echoing HTML
Junior Talker

Posts: 2
Hello guys!

when i try to
echo '<td width=25 align=center><input type=image class=icon src=Pics/delete.gif alt="Delete" onClick=dodelete('.$name.','.$id.') /></td>';

the code runs but on click only the 1st word in string $name is passed through, like dodelete(1stword

dodelete is a js function defined in <head>

Any suggetions would be appreciated:

Andras

Last edited by bodiandras : 04-21-2008 at 01:51 PM.
bodiandras is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-21-2008, 01:55 PM Re: missing ) after argument list when echoing HTML
rogem002's Avatar
Webmaster Talker

Posts: 567
Name: Mike
Location: United Kingdom
Would you be able to post a bit more code, just as the JS code a swell? It could be a JS based problem.
__________________
Website Services
PHP Code:
if(Added_Talkupation($post) == TRUE){iHug($you);} 
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 04-21-2008, 04:53 PM Re: missing ) after argument list when echoing HTML
Ultra Talker

Posts: 478
I think you need:
echo '<td width=25 align=center><input type=image class=icon src=Pics/delete.gif alt="Delete" onClick=dodelete("'.$name.'",'.$id.') /></td>';

Note that I've added double quotes around the $name, which is what the JS probably needs for the parameter.
__________________
Free PHP Obfuscator
TwistMyArm is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to missing ) after argument list when echoing HTML
 

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11576 seconds with 13 queries