Jump to content

[SOLVED] Writing to layers trouble???


bird_man11

Recommended Posts

I have this code where i want to be able for the user to click a add button and it writes the text they inputed to a div layer in a table.

 

I've managed to get it working but when i add the <tr> and <td> tags it seems to not write them to the document

 

this is what i want written to the div layer

 

var text1 = "<tr><td><input type=hidden value=\"" + venue + " \" name=venues" + count + " \/>
<span class=formtext>" + venue + "<\/span><\/td><td><input type=button name=del[] value=Del onclick=delit(";

var text2 = ",\'" + id + "\') \/><\/td><\/tr>";

 

when i alert(text1 + text2) it outputs the way i want but when written to the layer it shows up like this

 

<input type=hidden value="Blah" name=venues3 /><span class=formtext>Blah</span></td><td><input type=button name="del[] value=Del onclick=delit(177,177,'venuediv') /></td></tr>

 

although when i add a second venue it writes the tags for the second entry onwards, so its only the first entry that has the problem.

 

<input type=hidden value="Blah" name=venues3 /><span class=formtext>Blah</span></td><td><input type=button name="del[] value=Del onclick=delit(177,177,'venuediv') /></td></tr>
<tr><td><input type=hidden value="Blah" name=venues3 /><span class=formtext>Blah</span></td><td><input type=button name="del[] value=Del onclick=delit(177,177,'venuediv') /></td></tr>

 

 

Hope someone can be of some help, it would be much appreciated.

 

Cheers in advance

Link to comment
https://forums.phpfreaks.com/topic/43583-solved-writing-to-layers-trouble/
Share on other sites

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.