PC Review


Reply
Thread Tools Rate Thread

How do call a function from inside an iframe?

 
 
Paul
Guest
Posts: n/a
 
      21st Sep 2005
HI! I need to call a function that is located in the parent. I need it so
that it calls when the child page in the iframe loads.

Would it be better to use an onload event in the body? if so how do I call
it from the child page?

--
Thanks in advance

Paul


 
Reply With Quote
 
 
 
 
Dr Clue
Guest
Posts: n/a
 
      21st Sep 2005
Paul wrote:
> HI! I need to call a function that is located in the parent. I need it so
> that it calls when the child page in the iframe loads.
>
> Would it be better to use an onload event in the body? if so how do I call
> it from the child page?



This should work just fine.

<iframe onload="self.foo()">

</iframe>



--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML, CSS,Javascript
--=<> http://resume.drclue.net <>=-- AJAX, SOAP, XML, HTTP
--=<> http://www.drclue.net <>=-- SERVLETS,TCP/IP, SQL
--.
 
Reply With Quote
 
Jon Spivey
Guest
Posts: n/a
 
      21st Sep 2005
Hi,
Onload fires when the whole page (including iframes) has loaded. You'd put
the function call in the body of the parent page, eg
<body onload="someFunction();">

--
Cheers,
Jon
Microsoft MVP

"Paul" <(E-Mail Removed)> wrote in message
news:de2Ye.7721$(E-Mail Removed)...
> HI! I need to call a function that is located in the parent. I need it so
> that it calls when the child page in the iframe loads.
>
> Would it be better to use an onload event in the body? if so how do I call
> it from the child page?
>
> --
> Thanks in advance
>
> Paul
>



 
Reply With Quote
 
Paul
Guest
Posts: n/a
 
      21st Sep 2005
HI! Thanks, I will try it.

Paul

"Jon Spivey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> Onload fires when the whole page (including iframes) has loaded. You'd put
> the function call in the body of the parent page, eg
> <body onload="someFunction();">
>
> --
> Cheers,
> Jon
> Microsoft MVP
>
> "Paul" <(E-Mail Removed)> wrote in message
> news:de2Ye.7721$(E-Mail Removed)...
>> HI! I need to call a function that is located in the parent. I need it so
>> that it calls when the child page in the iframe loads.
>>
>> Would it be better to use an onload event in the body? if so how do I
>> call it from the child page?
>>
>> --
>> Thanks in advance
>>
>> Paul
>>

>
>



 
Reply With Quote
 
Paul
Guest
Posts: n/a
 
      21st Sep 2005
HI! I want to simulate resizing the parent page page by using this function.

<script language="JavaScript">
function firefoxautofix(x,y,){
parent.window.resizeBy(-1,-1)
parent.window.resizeBy(+1,+1)
}
</script>

Should this function be in the head or the body?

I want to get around a small bug in firefox that does not seem to resize (
after a iframe resize script is executed) the body unless the user refreshes
the page or resizes the browser manually from left to right. So I figure
that I would try to simulate a manual resize with this script.

Would I just call it like so.

<body onload="firefoxautofix();">

--
Thanks in advance

Paul
"Paul" <(E-Mail Removed)> wrote in message
news:de2Ye.7721$(E-Mail Removed)...
> HI! I need to call a function that is located in the parent. I need it so
> that it calls when the child page in the iframe loads.
>
> Would it be better to use an onload event in the body? if so how do I call
> it from the child page?
>
> --
> Thanks in advance
>
> Paul
>



 
Reply With Quote
 
Ronx
Guest
Posts: n/a
 
      21st Sep 2005
Note that firefox has an option setting to disable scripts that resize
the browser - I believe this is the default setting.
In FireFox: Tools->Options->Web Features - Advanced button
--
Ron Symonds
Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.


"Paul" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> HI! I want to simulate resizing the parent page page by using this
> function.
>
> <script language="JavaScript">
> function firefoxautofix(x,y,){
> parent.window.resizeBy(-1,-1)
> parent.window.resizeBy(+1,+1)
> }
> </script>
>
> Should this function be in the head or the body?
>
> I want to get around a small bug in firefox that does not seem to
> resize ( after a iframe resize script is executed) the body unless
> the user refreshes the page or resizes the browser manually from
> left to right. So I figure that I would try to simulate a manual
> resize with this script.
>
> Would I just call it like so.
>
> <body onload="firefoxautofix();">
>
> --
> Thanks in advance
>
> Paul
> "Paul" <(E-Mail Removed)> wrote in message
> news:de2Ye.7721$(E-Mail Removed)...
>> HI! I need to call a function that is located in the parent. I need
>> it so that it calls when the child page in the iframe loads.
>>
>> Would it be better to use an onload event in the body? if so how do
>> I call it from the child page?
>>
>> --
>> Thanks in advance
>>
>> Paul
>>

>
>



 
Reply With Quote
 
Paul
Guest
Posts: n/a
 
      21st Sep 2005
Thanks for pointing that out. I have already get that though. that's anyways


Paul


"Ronx" <(E-Mail Removed)> wrote in message
news:%23df8b%(E-Mail Removed)...
> Note that firefox has an option setting to disable scripts that resize the
> browser - I believe this is the default setting.
> In FireFox: Tools->Options->Web Features - Advanced button
> --
> Ron Symonds
> Microsoft MVP (FrontPage)
> Reply only to group - emails will be deleted unread.
>
>
> "Paul" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> HI! I want to simulate resizing the parent page page by using this
>> function.
>>
>> <script language="JavaScript">
>> function firefoxautofix(x,y,){
>> parent.window.resizeBy(-1,-1)
>> parent.window.resizeBy(+1,+1)
>> }
>> </script>
>>
>> Should this function be in the head or the body?
>>
>> I want to get around a small bug in firefox that does not seem to resize
>> ( after a iframe resize script is executed) the body unless the user
>> refreshes the page or resizes the browser manually from left to right. So
>> I figure that I would try to simulate a manual resize with this script.
>>
>> Would I just call it like so.
>>
>> <body onload="firefoxautofix();">
>>
>> --
>> Thanks in advance
>>
>> Paul
>> "Paul" <(E-Mail Removed)> wrote in message
>> news:de2Ye.7721$(E-Mail Removed)...
>>> HI! I need to call a function that is located in the parent. I need it
>>> so that it calls when the child page in the iframe loads.
>>>
>>> Would it be better to use an onload event in the body? if so how do I
>>> call it from the child page?
>>>
>>> --
>>> Thanks in advance
>>>
>>> Paul
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How call usercontrol function if its inside a formview control? Cirene Microsoft ASP .NET 1 17th May 2008 03:17 AM
Possible to call a procedure inside a function? suomi Microsoft Excel Programming 2 3rd Jan 2007 06:35 PM
How do I call a function inside an <asp:QueryStringParameter>? ~john Microsoft ASP .NET 0 18th Oct 2006 02:41 PM
Resizing FRAMESET inside of IFRAME inside of TABLE - Bug? =?Utf-8?B?QW5kcmUgVmllbnM=?= Windows XP Internet Explorer 0 13th Oct 2004 02:43 PM
Hot to call C# function inside XSLT ? Maxim Kazitov Microsoft C# .NET 2 29th Jan 2004 08:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:16 AM.