You are here: Re: dynamic button not working « PHP Programming Language « IT news, forums, messages
Re: dynamic button not working

Posted by tomb on 07/26/07 17:41

Rik wrote:
> On Thu, 26 Jul 2007 19:05:32 +0200, tomb <tomb@technetcenter.com> wrote:
>> Rik,
>> Thank you for such an informative and complete response. You actually
>> led me to the real problem and, yes, it is PHP related. When I
>> capture the actual response from my PHP script, I see all my quote
>> marks are escaped with \., which I am doing when I build the response
>> string.
>
> Ah, so the problem with the form was an HTML problem. The cause of the
> HTML problem is actually faulty PHP-script.
>
>> I didn't think they would still be there when it reached my
>> browser. Is there something I can do in my PHP script prior to
>> returning the HTML string that will strip those slashes?
>
> Don't have those slashes in there at all I'd say.
>
>> I also tried changing my code to single quotes around the entire
>> string, and double quotes only - no slashes - around the element
>> values, but it still comes to my browser with the slashes at the
>> double-quotes. ???
>
> That shouldn't happen, unless you run some code over the response
> string by accident. Might wee see an extract of your code?
>
> --Rik Wasmus
I verified that magic_quotes_sybase is off, and magic_quotes_gpc is on.
According to the php manual, I should be able to use stripslashes() to
resolve this, but it isn't doing anything. So, I am gladly posting my
code for you to critique. I only included the txtCompany text box for
brevity. Even though I took out all the slashes, they are all there
when it reached my browser.

if($row){
$output = '<table class="clientdata"><tr><td>' . $row['name'] .
'<br />&nbsp;</td></tr>';
$output = $output . '<tr><td><form name="clientform"
id="clientform"><table>';
$output = $output . '<tr><td>Name:</td><td><input
id="txtCompany" name="txtCompany" type="text" size="65" value="' .
$row['name'] . '" /></td></tr>';

$output = $output . '<tr><td colspan="2">';
$output = $output . '<input id="add" name="add" type="button"
value="Add" onClick="addThisClient(' .$row['tid'] . ',' . $row['id'] .
');" />';
$output = $output . '<input id="update" name="update"
type="button" value="Update" onClick="updateThisClient(' .$row['tid'] .
',' . $row['id'] . ');" />';
$output = $output . '<input id="delete" name="delete"
type="button" value="Delete" onClick="deleteThisClient(' .$row['tid'] .
',' . $row['id'] . ');" />';

$output = $output . '<input type="reset" value="Clear"
/></td></tr>';
$output = $output . '</table></form></td></tr></table>';
echo $output;
}

Makes no sense to me, I hope it does to you. Thanks so much for taking
your time on this.

Tom

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация