Link to home
Start Free TrialLog in
Avatar of Zoniac
Zoniac

asked on

How to get dynamically added elements in server side?

I have tried dynamically adding row of elments [input box,select control,input file] using Jquery addrow table version 1.02 with jquery-1.4.2.

Here i couldn't get the dynamically added elements [using javascript/Jquery ] in server side while i access my application in firefox/Safari/Chrome.But it's working fine in IE browser.

I'm using  apache-tomcat-6.0.10 web server.

--from JSP page--

<form name="newsheet" id="newsheet" method="POST" enctype="multipart/form-data" action="/servlet/TestServlet">
<tr>

	<td><span class="DeleteButton"  id="delRow" >DEL</span></td>
	<td><input type="text" name="Attachmentname_0" id="Attachmentname_0" size="40"  maxlength="255" ></td>
	<td><select name="attachmentStatus_0" id="attachmentStatus_0" size="1"></select></td>
	<td><input TYPE="file" VALUE="Browse"  name="resumeFile_0" id="resumeFile_0" value="" maxlength="1000" size="40" tabIndex="33" class="controlStyle" /></td>
	<td><input type="hidden" class="delRow" value="Delete Row"/></td>
</tr>
</form>

Open in new window

--script Code for adding dynamic elements

<script type="text/javascript">
(function($){
$(document).ready(function(){
$("#addRow").btnAddRow();
$("#delRow").btnDelRow();
$("#addRow").btnAddRow({inputBoxAutoNumber:true});
});
})(jQuery);
</script>

Open in new window


I'm getting elements using multipart request in which elements are not able to reach in server side.
ASKER CERTIFIED SOLUTION
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Zoniac
Zoniac

ASKER

Hi tagit,

I'm getting different ids for all dynamically added elements.

I have fixed this issue by aligning the table tag element in my jsp page.
Now i can get all the elements in server side for all the browsers.


Thanks for your suggestion.