• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1993
  • Last Modified:

Hidden frame refresh without losing focus on current frame

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
bhavdeep_sachdev
Asked:
bhavdeep_sachdev
1 Solution
 
dgelinasCommented:
<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
 
bhavdeep_sachdevAuthor Commented:
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
 
devicCommented:
hi bhavdeep_sachdev,

try this:
============================================
<body onload="setTimeout('location=location.href;',5*1000);">
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
bhavdeep_sachdevAuthor Commented:
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
 
devicCommented:
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
 
bhavdeep_sachdevAuthor Commented:
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
 
umeshswamyCommented:
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
 
devicCommented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now