?
Solved

Hidden frame refresh without losing focus on current frame

Posted on 2004-04-19
8
Medium Priority
?
1,986 Views
Last Modified: 2008-03-06
CURRENT SITUATION

I have a frameset with 2 frames: Frame1 and Frame2.

Frame1 is hidden. Frame2 is of 100% height.

Code in 0.asp:
<frameset rows="0,*" frameborder="0" border="0">
  <frame src="1.asp" name=Frame1>
  <frame src="2.asp" name=Frame2 >
</frameset>

I have code in Frame1 which makes it refresh every 5 secs to retrieve data from the database.

Code in 1.asp:
  <body onload="setTimeout('document.location.reload()',5*1000)">
    <!--
    My asp stuff is here
    -->
  </body>
 

Frame2 is where I have all the site Browsing going on.

On one particular page in Frame2, I have a form with text input fields.

Code in 2.asp:
  <form action="2.asp">
    input1: <input type="text" name="input1">
    <br>
    input2: <input type="text" name="input2">
    <br>
    input3: <input type="text" name="input3">
    <br>
    input4: <input type="text" name="input4">
    <br>
    input5: <input type="text" name="input5">
    <br>
    <input type=submit value="Submit">
  </form>


PROBLEM:

The problem I am facing is that when the user is on 2.asp, filling the form, and 1.asp refreshes as it is supposed to, I lose focus on Frame2 and the next time I hit Tab to go the another form field, I end up in the address bar of the browser.

Is there a way that I can keep the hidden frame refreshing every 5 secs. And the not allowing to Frame2 to lose focus, so that filling the form fields is not a problem.

All Help will be appriciated.
Thank You.
0
Comment
Question by:bhavdeep_sachdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 6

Expert Comment

by:dgelinas
ID: 10862679
<form action="2.asp" onblur="this.focus();">
    input1: <input type="text" name="input1">
    <br>
    input2: <input type="text" name="input2">
    <br>
    input3: <input type="text" name="input3">
    <br>
    input4: <input type="text" name="input4">
    <br>
    input5: <input type="text" name="input5">
    <br>
    <input type=submit value="Submit">
  </form>

0
 
LVL 1

Author Comment

by:bhavdeep_sachdev
ID: 10863266
dgelinas,

It doesn't seem to work. When the hidden frame refreshes, the next time I hit TAB, the focus still goes to the Address Bar.
0
 
LVL 25

Expert Comment

by:devic
ID: 10872631
hi bhavdeep_sachdev,

try this:
============================================
<body onload="setTimeout('location=location.href;',5*1000);">
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 1

Author Comment

by:bhavdeep_sachdev
ID: 10872977
devic,

I earlier had

    <meta http-equiv="Refresh" content="5;test1.asp">
    <!-- This worked fine except for the Click Sound every 5 secs -->

in test1.asp instead on the

    document.location.reload()

Your solution is probably the same as the meta refresh (Also makes the Click sound when the page refreshes)

I know I should have mentioned it earlier that I don't need the Click Sound.

Do you still have a better solution ? Because the Clicking sound is a Big No for me.

I will wait for a solution without the sound and if I get one, I will increase the point value of the question and split it.

Thanks for the help
And STILL LOOKING for more help.
0
 
LVL 25

Accepted Solution

by:
devic earned 1400 total points
ID: 10874169
i don't have a click sound + refresh i have deactivated :)

try maybe with js include:
========================

-----------1.asp------------
<span id=cont>&nbsp;</span>
<script id=DJS src=content.asp></script>


----------content.asp-------------

document.getElementById("cont").innerHTML="bla bla bla your asp content";
setTimeout('document.getElementById("DJS").src="content.asp?"+((new Date()).valueOf());',5000);
0
 
LVL 1

Author Comment

by:bhavdeep_sachdev
ID: 10951567
I've not had time to implement this solution but I will look into your solution. I didn't really get what I wanted, but I will still grant you points for answering.... Thanks
0
 

Expert Comment

by:umeshswamy
ID: 11247655
i have 4 frames . when i press F5 key from keyboard the entire application gets refresh.
   what i need is when refreshed using F5 only the frame 4 should be refreshed without refreshing the other 3 frames.
   thanking in advance
0
 
LVL 25

Expert Comment

by:devic
ID: 11249650
hi umeshswamy,

welcome to EE.
you need open new question:
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/help.jsp#hi3
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question