FREE tutorial,solution,RSS Feeds on Operating Systems, Programming, Web Development, Applications, Databases, Networking, Hardware, Security, SEO Free Expertsforge Membership
Join us as Moderator
Submit Article to Expertsforge.com Submit Article My Expertsforge
 
RSS Feeds, Help Help RSS Feeds
bannertop
 

JavaScript Tutorial: Setting IFRAME height/scrolling attribute dynamically using Javascript

jawahar
4/17/2007 2:20:18 PM, Views: 3678
The following code and tutorial can be used to set the IFrame scrolling attribute dynamically using Javascript

<html>
<head>
<title>Setting IFRAME Scrolling attribute using Javascript</title>
<script type="text/javascript">
function setIframeScroll(pge,iframeid, mode) { // mode can be either "yes" or "no"
         var oldIframe = document.getElementById(iframeid);
         var newIframe = oldIframe.cloneNode(true);
         newIframe.scrolling = mode;
         oldIframe.parentNode.insertBefore(newIframe, oldIframe);
         newIframe.parentNode.removeChild(oldIframe);
         document.getElementById(iframeid).src=pge;
}
</script>
</head>
<body>
<iframe id="myIframe" src="q.html" scrolling="no"></iframe>
<br />
<input type="button" value="Submit" onclick="setIframeScroll('a.html','myIframe','yes')" />
</body>
</html>
Next Steps:
Add this Tutorial to:
Blink Blink del.icio.ous Del.icio.us Digg Digg
Fark Fark Furl Furl Google Google
Reddit Reddit Simpy Simpy Spurl Spurl
Technorati Technorati Windows Live Win Live Yahoo Yahoo
Rate Me!
Avg Visitor Rating: Average Visitor Rating is 1 out of 5
Number of Ratings : 2 Votes
Rate:
Send Private MessageSend Message
Signup / Login To View the Solution or Provide Comments
Post Comment/Solution
Comment:*
        (Link Rules) 
  Use : [bold] for <b>; [/bold] for </b>; [italic] for <i>; [/italic] for </i>; [code] & [/code] for code
 
Categories
Options
JavaScript RSS Feed
Most Popular Tutorial
Most Popular Solution
Top Rated
Top Rankers
Overall
1. jawahar (1400)
Yearly -2008
1. jawahar (200)
Expertsforge Sponsors
bnrtop