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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.