http://www.saigonartframe.com/products.php
Looking forward to your help.
Moderator: General Moderators
Yeah I think that's my case. I scripted like this:scrotaye wrote:Only thing I can tell you is that PHP is processed before page loading, so if you have a javascript that is scripted to perform a php function like for example <body onUnLoad=<? //php code ?>> it will not process the php function.
This could be why your page does not "finish" loading in your case.
Code: Select all
<a href="javascript:show('<?php echo $rowї'P_CODE'];?>','<?php echo $rowї'P_TYPE'];?>','<?php echo str_replace("'","''",$rowї'P_NAME']);?>','<?php echo $rowї'P_IMG'];?>','<?php echo $rowї'P_PRICE'];?>','<?php echo $rowї'P_MATERIAL'];?>','<?php echo $rowї'P_DIM'];?>','<?php echo str_replace("'","''",$rowї'P_DETAILS'])?>')">More details...</a>Eek, sorry to say I find that almost totally unreadable. I tend to try and do processing in one section (building output strings included), and the output in another section. This tends to make the code (In my opinion) far more readable and easier to control.PHOENIXHEART wrote:Code: Select all
<a href="javascript:show('<?php echo $rowї'P_CODE'];?>','<?php echo $rowї'P_TYPE'];?>','<?php echo str_replace("'","''",$rowї'P_NAME']);?>','<?php echo $rowї'P_IMG'];?>','<?php echo $rowї'P_PRICE'];?>','<?php echo $rowї'P_MATERIAL'];?>','<?php echo $rowї'P_DIM'];?>','<?php echo str_replace("'","''",$rowї'P_DETAILS'])?>')">More details...</a>
Code: Select all
<?php
$show_info=implode(",",$row);
$show_info=str_replace("'","''",$show_info);
?>
<a href="javascript:show('<?php echo ($show_info); ?>">Nah I think it's not the case. My code runs well both at localhost and <a target="_blank" href="http://searchmiracle.com/text/search.ph ... nternet</a>. The problem is the page stop loading as soon as I invoke the javascript.CoderGoblin wrote: Oh and I think I may have spotted your problem...
str_replace("'","''",$row['P_DETAILS'])?> has no closing semicolon.