| | |
using javascript to alter css of iframe div
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
•
•
hi
i have a parent window with an external url iframe. when the parent loads i want to set the iframe footer to display:none;. is there a way to do this? i have looked all over w/no luck.
thanks
I hope this should solve your problem:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<script language="JavaScript"> function changeCSS(){ frame = window.document.frames[0]; frame.document.getElementById("myDiv").style.background="red";//OR ..style.display="none"; } </script> <a href="javascript:changeCSS()">Click Here here to Change Iframe CSS</a> <br> <iframe src="frame.htm" name="myFrame" id="myFrame"></iframe>
frame.htm should have a div tag with the ID as "myDiv".
Regards.
Last edited by sasankasekhar; Nov 11th, 2008 at 3:25 am. Reason: Comments left out
IF SOMEONE FEELS THAT THEY HAD NEVER MADE A MISTAKE IN THEIR LIFE, THEN IT MEANS THEY HAD NEVER TRIED A NEW THING IN THEIR LIFE
![]() |
Similar Threads
- need help changing background color of an iframe (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Javascript
- Next Thread: Get all children and their childeren - not innerHTML
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxcode ajaxhelp animate api array automatically beta boarder box bug calendar captcha card cart checkbox codes column cookies createrange() css cursor date debugger decimal design developer dom download dropdown element enter error events firefox firehose focus form frameworks getselection google gwt html htmlform iframe image() images index internet java javascript jawascriptruntimeerror jquery jsfile jsp listbox maps marquee masterpage matrixcaptcha menu microsoft mimic mp4 onmouseover parameters php player post problem programming progressbar prototype rating redirect regex runtime safari scale scriptlets search select session size sql starrating text textarea toggle twitter validation variables w3c website window windowofwords windowsxp wysiwyg xml





