Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:09
Seeding the openIFrame function with initial values
Poster: Paul Ciarelli
Dated: Sunday September 28 2003 - 23:15:11 BST
I'm using an iframe on a site that I'm developing and I have it working fine except for one thing. When you first go into the site, the iframe is blank (as it is in DHTML Menu sample number 11 Opening Windows & Frames)
Here is the script:
<script>
function openIFrame(iFrameId,winURL)
{
ifId=gmobj(iFrameId)
ifId.src=winURL
}
</script>
How do I seed iFrameId and winURL with inital values so that the iframe is populated when initially going into the site.
BTY, yes I'm a rookie.
Poster: Hergio
Dated: Monday September 29 2003 - 2:19:48 BST
Iframes have a value in themselves to specify their URL. When you put them in your page you can specify it then. All the function is then doing is taking that value and changing it. Heres the code for an iframe to initially come up on your page with google in it, then your menu can update it as usual.
Code:
<iframe src="http://www.google.com" width="700" height="400" id="myiframe" name="myiframe"></iframe>
Industrial Strength JavaScript and DHTML Menus
About Us
Testimonials
Contact Us
Our Distinguished Clients
Investing in Non-Profits
Where Are We
Privacy Policy
Software Licensing Agreement
DHTML JavaScript Menu
Product Information
Page Integration
Quick Reference Guides
Embedding Into a Table or DIV
Purchase
