If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > using clonenode??????

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-20-04, 09:20
giri_1982 giri_1982 is offline
Registered User
 
Join Date: Feb 2004
Posts: 4
using clonenode??????

hi,
i'm using clonenode property to add rows ....
i'm not getting the option ie a null value is inserted automatically in the combobox......here is my code!!!!!!!

<script>
function addRow(){
//var obj = document.getElementById("tbl");
//var firstRow = obj.children(0);
//var newNode = obj.children(0).cloneNode(false);
//obj.insertBefore(newNode, firstRow);
var obj = document.getElementById("tbl");
var obj1 = document.getElementById("tblmain");
var newNode = obj1.children(0).cloneNode(true);
obj.appendChild(newNode);
}
</script>
</HEAD>
<BODY>


<table id="tbl" width="300" border="1">
<tr>

</tr>
</table>



<table id="tbl2" width="300" border="1">
<tr>
<td><input type="button" value="add" onClick="addRow()" id=button1 name=button1></td>
</tr>
</table>



<table width="95%" id="tblmain">
<tr>
<td width="20%"><TEXTAREA name=txtgoal>fafasf</TEXTAREA></td>
<td width="20%">

<select id="select1" name="cbocompcat">


</select>
</td>

<td width="20%">
<select id="select1" name="cboGencat">
<option></option>
<option selected>giri</option>
</select>

</td>

<td height="1" width="478">
<p><span name="date" id="date"><input class="TextBox18" name="txtdate" id="txtdate" size="15" valign="top" >

</td>
<td width="20%"><TEXTAREA name=txtresult></TEXTAREA></td>


</tr>

</table>



<table width="95%" id="tblhidden" style="VISIBILITY: hidden">
<tr>
<td width="20%"><TEXTAREA name=txtgoal></TEXTAREA></td>
<td width="20%">

<select id="select1" name="cbocompcat">
<option value=""
selected>Select</option>

</select>
</td>

<td width="20%">
<select id="select1" name="cboGencat">
<option value=""
selected>-----Select-----</option>

</select>

</td>

<td height="1" width="478">
<p><span name="date" id="date"><input class="TextBox18" name="txtdate" id="txtdate" size="15" valign="top" >
<IMG height=21 id=ChoseDate name=ChoseDate onclick="vbscript:CALL GetDate(Me)" src ="calendar.gif" width=25 indexval="txtdate"></span></p>
</td>
<td width="20%"><TEXTAREA name=txtresult></TEXTAREA></td>


</tr>

</table>
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On