Jump to content

How do I add this piece of code; to this piece of code?


xwishmasterx

Recommended Posts

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?

 $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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.