Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 20th, 2005, 08:48 AM
Registered User
Points: 1,897, Level: 17
Points: 1,897, Level: 17 Points: 1,897, Level: 17 Points: 1,897, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Mumbai, Maharastra, India.
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default Refreshing frame.

Hi,
I have divide my page in two frames.
Now i want to refresh the content of topper frame while some action is carried out on other fram.

i m using this but not working:
--------
<script language="javascript">
 parent.TopFrame['TopFrame'].location.href = "msgcount.asp"
</script>
Please guide.


Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.
Reply With Quote
  #2 (permalink)  
Old October 20th, 2005, 11:52 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi Rupen !!
 use window.parent.topframename.location.href="urasppag e.asp";
 or
         window.parent.topframename.location.reload();
Hope this will help you.

Cheers :)

vinod
Reply With Quote
  #3 (permalink)  
Old October 24th, 2005, 07:54 AM
Registered User
Points: 1,897, Level: 17
Points: 1,897, Level: 17 Points: 1,897, Level: 17 Points: 1,897, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Mumbai, Maharastra, India.
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default

I tried both but not working. Any other way or what could be wrong?

here is the main page code:
----------------------------
<frameset rows="9,91" border="0" >
       <frame src="Msgcount.asp" name="TopFrame" noResize="true" scrolling="no" marginheight="0" marginwidth="0">
        <frame src="timesheet.asp" name="MainFrame" noResize="true" scrolling="yes" marginheight="0" marginwidth="0">
 </frameset>
</head>
<body onLoad="if(history.length>0)history.go(+1)">
</body>
----------------------------
so i use:
        <script language="javascript">
            //parent.TopFrame['TopFrame'].location.href = "msgcount.asp"
            //window.parent.TopFrame.location.reload();
            window.parent.TopFrame.location.href="msgcount.asp ";
        </script>
----------------------------


Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.
Reply With Quote
  #4 (permalink)  
Old October 27th, 2005, 01:59 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii Rupen!!

Try this code
****test.html*****
<script>
function loadRefresh(frameid)
{
if(frameid==1)
{
window.parent.TopFrame.location.reload();
}
else
{
window.parent.TopFrame.location.href="t2.html"
}
}
</script>
<frameset rows="9,91" border="0" >
       <frame src="t1.html" name="TopFrame" noResize="true" scrolling="no" marginheight="0" marginwidth="0">
        <frame src="t2.html" name="MainFrame" noResize="true" scrolling="yes" marginheight="0" marginwidth="0">
 </frameset>
</head>
<body onLoad="if(history.length>0)history.go(+1)">
</body>

 ***************t1.html***************
<script>
function callParent(id)
{
 window.parent.loadRefresh(id)
}
</script>

First Frame Contents
<input type=button name=curr1 onclick="callParent(1)" value="Reload First Frame">
<input type=button name=curr2 onclick="callParent(2)" value="Reload Second Frame">

*******************t2.html*******************
<script>
function callParent(id)
{
 window.parent.loadRefresh(id)
}
</script>
<body onunload="alert('reload')">
Second Frame Contents
<input type=button name=curr1 onclick="callParent(1)" value="Reload First Frame">
<input type=button name=curr2 onclick="callParent(2)" value="Reload Second Frame">
</body>
*************

Note:-I have used alert message to show that function is called and page is reloaded again using reload() ,and location.href

Hope this will help you

Cheers :)

vinod
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set one frame src from other frame akumarp2p ASP.NET 1.x and 2.0 Application Design 2 March 13th, 2007 04:13 AM
parsing form data from frame to other frame audio-catalyst Classic ASP Basics 5 January 3rd, 2006 02:57 PM
Call right frame Page_Load event from left frame. ochanarachel Classic ASP Basics 0 January 28th, 2005 05:13 AM
refreshing XML withour refreshing the page sasidhar79 XML 1 January 12th, 2005 05:16 AM
Getting rid of click sound for refreshing frame cordel PHP How-To 4 March 29th, 2004 09:00 AM



All times are GMT -4. The time now is 01:01 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.