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? Quote 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? Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.