Forums Register Login
I am dynamically creating table rows through a javascript function..evertime i give a page refresh the added rows disppear...how can i rectify the problem??
could you please paste some relevent piece of code. that would help in getting the real problem.
Hope this makes sense


<table id="TimeTable" border="1" width="100%" cellpadding="2" >

<th><bean:message key="USR_FORM_PROJNAME"/></th>
<th><bean:message key="USR_FORM_TASKNAME"/></th>
<th>Activity Name</th>
<th><bean:message key="USR_FORM_STARTTIME"/></th>
<th><bean:message key="USR_FORM_ENDTIME"/></th>


On clicking an add button i add the rows dynamically as follows
var row = tbl.insertRow(lastRow);

var tbl = document.getElementById('TimeTable');
var lastRow = tbl.rows.length;

var cellRightProjName = row.insertCell(0);
var elProj = document.createElement('select');
elProj.onchange= function() {selectTask(document.TimeEntryAddForm,lastRow-1);};
for(var k=0;k<ProjLength;k++)
var optProj = new Option(ProjArray[k],ProjArray[k]);
elProj.options[elProj.length] = optProj;


The rows which are dynaimaclly created get lost on refreshing...
Cld u pls tell me why
You are going to loose them since they are in memory, you refresh the browser you loose the memory..

How to fix it? Track it server side with post backs or store it in a cookie...

All of the following truths are shameless lies. But what about this tiny ad:
Rocket Oven Kickstarter - from the trailboss

This thread has been viewed 961 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jul 20, 2018 03:06:00.