News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

I want to place an onload in my forum

Started by largefoot, January 14, 2006, 05:46:08 PM

Previous topic - Next topic

largefoot

Hi I am new to this forum and smf,

I am loading the forum into an iframe and have written a funtion to set the height of the iframe toi the hieght of the document it calls.
I would like to call the function from the onload of the body of the page loaded into the iframe, or from somewhere that it will be called each time the page changes.

I do not know php but know ASP and programming languages.

Ideally I would like to set the height dynamically when I loaded any page of the forum or the page changed.

I am gratfull for any help anyone can give, Thanks

largefoot

Ok I really need an answer to this problem

I want to put this code in the forum so the javascript is triggered everytime the forum height changes I've looked at index.php and boardindex.php and display.php but still not sure where to place it if anyone can help I would appreciate it, nice forum by the way

echo "<script language=javascript>resize('iframeContent')</script>";

Zorac

just so you know, i had originally written my site with frames, and had smf within one of them, this caused problems with cookies for some users resulting in them not being able to stay logged in...

im guessing iframes is going to have the same problem....

my site is now written so each page is its own individual page...

largefoot

Thanks for the warning Zorac, your right when I switch to annother page in the forum from a link outside the iframe I'm no onger logged in.

Is there a way to tell the page in the href call to find the cookie?

Zorac

no idea, i just got rid of my frames, although the site looks the same to the users...

i created a php file as the header which included a the menu and advertising banner, and then just did an include on each page where i wanted it

if you have some sort of side frame, jsut use tables and includes rather than frames

Advertisement: