Jump to content


Photo

How to add new row in specific table?


  • Please log in to reply
1 reply to this topic

#1 Dooq

Dooq
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 08 April 2006 - 06:15 PM

Hi

How Can i add new row to a specific table when someone click an image ?

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
<table id="Fileds">
<tr>
<td>
Hi
</td>
</tr>
</table>
[/quote]

when a visitor click into an image in my website i whant to add a new row like this for example:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
<tr>
<td>
Example
</td>
</tr>
[/quote]
so the result sholde be like this :
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
<table id="Fileds">
<tr>
<td>
Hi
</td>
</tr>
<tr>
<td>
Example
</td>
</tr>
</table>
[/quote]

i need this ASAP pleas.

can any body help me ?

Regards,

#2 GBS

GBS
  • Members
  • PipPipPip
  • Advanced Member
  • 108 posts

Posted 19 April 2006 - 11:20 PM

Hi there,

What you could try is to use the hidden/visible values for the style.visibility property,
By example:
<html>

<script>

function DoTheJob(){
document.getElementById('testing').style.visibility="visible";
}

</script>

<body>
<table>
    <tr>
        <td onclick="DoTheJob();">
        Hi there,, click on me,,
        </td>
    </tr>
    <tr>
        <td id="testing" style="visibility:hidden;">
        Yep yep,, nice shot ! :)
        </td>
    </tr>
</table>

</body>
</html>
If this is not a good solution to you, the other idea would be to use the innerHTML function, adding some rows to your table,... we'll see then,,
Hoping it helps,,

l8tr,,
Sorry for my english,... I do my best, but sometimes,...
1st intention: understand the problem
2nd intention: try to solve it
3rd intention: try to understand how to solve it :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users