Greystoke Posted December 22, 2010 Share Posted December 22, 2010 How do I change the img src in echo ' <td class="dataTableContent" valign="middle" height="15"> <script language="JavaScript" type="text/javascript"> <!-- document.write("<span id=\"update_totals['.$i.']\"><a href=\"javascript:setCustomOTVisibility(\'update_totals['.($i+1).']\', \'visible\', \'update_totals['.$i.']\');\"><img src=\"order_editor/images/plus.gif\" border=\"0\" alt=\"' . IMAGE_ADD_NEW_OT . '\" title=\"' . IMAGE_ADD_NEW_OT . '\"></a></span>"); //--> </script></td>' . "\n"; to have this <?php echo tep_image(DIR_WS_IMAGES . '../order_editor/images/plus.gif'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/222387-can-anyone-help-with-this-please/ Share on other sites More sharing options...
trq Posted December 22, 2010 Share Posted December 22, 2010 The bigger question is why your using document.write() to write the code to the browser in the first place. Not to mention your wrapping your js in <!-- --> comment tags. Do you actually know why they are there? They haven't been needed since netscape 2.* Quote Link to comment https://forums.phpfreaks.com/topic/222387-can-anyone-help-with-this-please/#findComment-1150315 Share on other sites More sharing options...
Greystoke Posted December 22, 2010 Author Share Posted December 22, 2010 Hi, Just trying to update the image link. The code is no longer supported by the coder, so trying to do it myself. I don't know why it was done that way. Quote Link to comment https://forums.phpfreaks.com/topic/222387-can-anyone-help-with-this-please/#findComment-1150323 Share on other sites More sharing options...
trq Posted December 22, 2010 Share Posted December 22, 2010 document.write("<span id=\"update_totals['.$i.']\"><a href=\"javascript:setCustomOTVisibility(\'update_totals['.($i+1).']\', \'visible\', \'update_totals['.$i.']\');\"><img src=\"' . tep_image(DIR_WS_IMAGES . '../order_editor/images/plus.gif') . '" border=\"0\" alt=\"' . IMAGE_ADD_NEW_OT . '\" title=\"' . IMAGE_ADD_NEW_OT . '\"></a></span>"); Quote Link to comment https://forums.phpfreaks.com/topic/222387-can-anyone-help-with-this-please/#findComment-1150325 Share on other sites More sharing options...
Greystoke Posted December 22, 2010 Author Share Posted December 22, 2010 Thank you Quote Link to comment https://forums.phpfreaks.com/topic/222387-can-anyone-help-with-this-please/#findComment-1150336 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.