xwishmasterx Posted April 25, 2011 Share Posted April 25, 2011 I have the below code: $buttons = "button+='<table height=\"40\" border=\"0\"id=\"table1\"cellspacing=\"0\"cellpadding=\"2\"><tr><td>---PLACE CODE HERE---</td><td valign=\"bottom\">';\n"; between the to cell tags (<td>---PLACE CODE HERE---</td>) I need to add this code: document.getElementById('com').innerHTML=<?php echo $gSurfMultiLoadedText; ?>+button2; My problem is the '; " and \" stuff Anyone care to show how I can merge these pieces? Link to comment https://forums.phpfreaks.com/topic/234674-how-do-i-add-this-piece-of-code-to-this-piece-of-code/ Share on other sites More sharing options...
xwishmasterx Posted April 25, 2011 Author Share Posted April 25, 2011 anyone? Link to comment https://forums.phpfreaks.com/topic/234674-how-do-i-add-this-piece-of-code-to-this-piece-of-code/#findComment-1205978 Share on other sites More sharing options...
wildteen88 Posted April 25, 2011 Share Posted April 25, 2011 $buttons = "button+='<table height=\"40\" border=\"0\"id=\"table1\"cellspacing=\"0\"cellpadding=\"2\"><tr><td>document.getElementById('com').innerHTML=\"$gSurfMultiLoadedText\"+button2;</td><td valign=\"bottom\">';\n"; Like that? This document.getElementById('com').innerHTML=<?php echo $gSurfMultiLoadedText; ?>+button2; Is JavaScript if you want to execute that code, then you'll need to wrap it <script></script> tags. Link to comment https://forums.phpfreaks.com/topic/234674-how-do-i-add-this-piece-of-code-to-this-piece-of-code/#findComment-1205984 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.