Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

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

Posts: 2
Trades: 0
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 02:51 PM..
bodiandras is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-21-2008, 02:55 PM Re: missing ) after argument list when echoing HTML
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Would you be able to post a bit more code, just as the JS code a swell? It could be a JS based problem.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 04-21-2008, 05:53 PM Re: missing ) after argument list when echoing HTML
Ultra Talker

Posts: 483
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
TwistMyArm is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to missing ) after argument list when echoing HTML
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB 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.46569 seconds with 12 queries