Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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>


Poster: Paul Ciarelli
Dated: Monday September 29 2003 - 3:07:32 BST

Out of all the things I tried.....

Thanks Hergio, You Da Tech!