Can a jsp file in an IFrame calls a javascript function outside of the IFrame

This is a discussion on "Can a jsp file in an IFrame calls a javascript function outside of the IFrame" within the JavaScript Forum section. This forum, and the thread "Can a jsp file in an IFrame calls a javascript function outside of the IFrame are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 31st, 2007, 14:29
New Member
Join Date: May 2007
Location: TORONTO
Age: 36
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Can a jsp file in an IFrame calls a javascript function outside of the IFrame

Hi:
I am using IE 6 SP2.
My resize attribute does not work <body onresize="test1();">.
When I resize my window, the resize event doesnot get call.
I have a jsp page with an iFrame called test1.jsp. The iFrame src points to a page called test2.jsp. It has a resize
attribute that calls a javascript function that is located in test1.jsp.
In the test2.jsp page, it doesn't recognize the function that is located in test1.jsp page. Is there anyway to do this.
test1.jsp:
Quote:
<html>
<head>
<script type="text/javascript">
function test1()
{
alert("test1.jsp");
}

function test3()
{
alert("test3, called from test2.jsp but code locate at test1.jsp");
}
</script>
</head>

<body onresize="test1();">
This is page 1.
<iframe src="http://localhost:7001/test2/test2.jsp" id="dataFrame" style="height:942.0px;width:100%" scrolling="YES" frameborder="1"></iframe>

</body>
</html>
Quote:
test2.jsp:
<html>
<head>
<script type="text/javascript">
function test2()
{
alert("test2.jsp");
}
</script>
</head>

<body onresize="test2();test3();">
This is page 2.

</body>
</html>
If the above is not possible, is there another way to capture the event when a popup window is resize or maximize or mimize.
I tried <body onresize="test1();"> it doesn't work. I event tried:
window.onresize=test1 and it doesn't work.
I tried <body onmove="test1();"> It partially works. When I miminize the popup window it triggers the event but when I maximize the popup
window from a smaller popup window it doesn't trigger an event.
Any hint or help or direction to an url would be greatly appreciated.
Yours,
Frustrated.
Reply With Quote

Reply

Tags
iframe, javascript

Thread Tools

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] refresh a different iframe once an iframe elsewhere has loaded cosmicbdog JavaScript Forum 1 Jan 25th, 2008 01:50
How do I place a SWF file in an iframe? phbsz Web Page Design 1 Mar 30th, 2007 08:51
Problem with iframe & Javascript - Trying to communicate with a flash movie victorpantet JavaScript Forum 1 Feb 5th, 2006 03:06
IFRAME Aligned to Right WiseWizards Web Page Design 3 Aug 3rd, 2005 22:20
<iframe> u2orange Web Page Design 10 Nov 29th, 2003 20:06


All times are GMT. The time now is 10:51.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43