HighDots Forums  

DIV contents not updated in Firefox when using DIV.innerHTML

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss DIV contents not updated in Firefox when using DIV.innerHTML in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mahernoz
 
Posts: n/a

Default DIV contents not updated in Firefox when using DIV.innerHTML - 12-14-2007 , 07:46 AM






Task to be Accomplished: I want to copy the contents of dvAArea (after
i change a value in the dropdown or a textbox) into the new dvBArea

Problem: In Internet explorer this code works fine but Firefox gives
the unchanged content of dvAArea (and not the current content). I want
the current content of dvAArea in Firefox after i change the values in
the dropdown or text fields.

//My Page is as follows
//I am having 2 div
<div id="dvBArea"></div>
<div id="dvAArea">
<table>
<tr>
<td>
<input id="txtA0101" name="txtA0101" type="text"></td>

<td>
<input id="txtA0102" name="txtA0102" type="text"></td>

<td>
<select id="sel0106" name="sel0106">
<option value="300">300</option>
<option value="600">600</option>
<option selected="selected" value="1200">1200</
option>
<option value="2400">2400</option>
</select>
</td>
</tr>
</table>
</div>

//and a JavaScript function CopyHTML which is raised on onclick event
of a button
<input id="btnClickMe" type="button" value="Copy"
onclick="CopyHTML()"/>

//the CopyHTML function is as follows
<script language="javascript" type="text/javascript">
function CopyHTML()
{

document.getElementById('dvBArea').innerHTML =
document.getElementById('dvAArea').innerHTML;
}


</script>


Regards,
Mahernoz


Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.