Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 17th, 2007, 05:51 PM
Registered User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default iframe refresh problem

Hi,

   I have a html page. This page has an iframe. When I press the refresh button or F5, is it possible for me to refresh only the iframe. Currently, when I press the refresh button, the whole page is getting refreshed.

Thanks In Advance,


 
Old January 17th, 2007, 05:55 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You can use document.onkeypress and if the F5 key is pressed have it call a function that will just refresh your IFRAME.

if you are trying to prevent refreshing of everything except the iframe, you will also have to check for someone press CTRL + R

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile
================================================== =========
 
Old January 17th, 2007, 06:58 PM
Registered User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it worked fine with onkeydown in IE.

Thanks

 
Old January 17th, 2007, 06:59 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

NP glad you got it working.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
IFRAME Problem NEO1976 Javascript 1 July 21st, 2006 05:11 PM
IFRAME Problem NEO1976 Javascript How-To 0 July 10th, 2006 10:13 AM
iframe refresh scrolls main page down kdm260 ASP.NET 2.0 Professional 0 May 16th, 2006 02:06 PM
Cascading iframe problem nerssi HTML Code Clinic 0 June 13th, 2005 04:36 AM
how can I refresh the contents of an iframe? nerssi Javascript How-To 2 November 4th, 2004 06:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.