View Full Version : i have used Div within Div and tried calling it from javascript

10-31-2006, 05:53 AM
i have used Div with in Div and tryed calling it from javascript, its workin fine with IE...but in firefox its not not..it says "document.getElementById has no properties for first case " n "frames has no properties for second case " in the javascript console within firefox...

1> var myBody1=document.getElementById('invDetails').document.getElementById('Coll');

2> var myBody1=frames['invDetails'].document.getElementById('Coll');

<table border="0" width="100%">
<tr style="font-size: 10pt;">
<div id="invDetails" style=" height:88px ;width:98.5%;">
<div id="Coll" style="border:1px solid black; height:91
px; width:100%; overflow:auto; overflow-y:scroll; ">

<TABLE id="TABLE1" style="width:100%;" >

hope i can get a solution as soon as possible....


10-31-2006, 06:21 AM
Change it to:

var myBody1=document.getElementById('Coll');

it can access the inner div directly by the id and you don't have any frames.

10-31-2006, 09:52 AM
can i know what is the alternative frames which should be compatible with firefox..

var myBody1=document.getElementById('Coll');

var myBody=myBody1.getElementsByTagName('tbody')[0];

row=myBody.appendChild(frames['Coll'].document.createElement('<tr ALIGN=CENTER>')); < ---- this line works fine with IE but not with firefox it throws frames.coll has no properties....

10-31-2006, 11:12 AM
i meant alternative for FRAMES which should be compatible for both IE and Firefox.

11-22-2006, 09:41 AM
What in fact you want to do?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum