nested div tags javascript error
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   AMIT_WALIA
Posted On:   Thursday, October 12, 2006 11:43 PM

function open() { document.getElementById('middle').innerHTML=' '; } ]]>]]> hi I have a problem with nested div tags, folling is the code. open now the problem is i am opening a html file in middle div tag using object reference in java script. But inside administration.html i have another link which change the content of div with foot id. And i gets element 'foot' is undefined. It seems like the page in inner div tag cannot access the other elements in parent page. Please help me out. thanks in advance.    More>>

hi I have a problem with nested div tags, folling is the code.

			









now the problem is i am opening a html file in middle div tag using object reference in java script.
But inside administration.html i have another link which change the content of div with foot id.
And i gets element 'foot' is undefined. It seems like the page in inner div tag cannot access the other elements in parent page.
Please help me out.
thanks in advance.    <<Less

Re: nested div tags javascript error

Posted By:   Firat_Tiryaki  
Posted On:   Friday, October 13, 2006 04:05 AM

Try to reach the inner div by "getElementsByTagName" method like below



middleDIV=document.getElementById('middle');
innerDIV=middleDIV.getElementsByTagName("div")[0];



or send your HTML code including the nested structure of divs to get ideas.

About | Sitemap | Contact