473,326 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Unable to Focus frame on load

Hi Everyone,

Currently I have frameset like

[HTML]<frameset framespacing="2" border="0" frameborder="0" rows="129,*,32" >
<frame name="top" scrolling="no" noresize target="contents" src="Header.jsp">
<frameset cols="157,*" >
<frame name="contents" src="Left.jsp" noresize scrolling="no" target="main">
<frame name="main" src="main.do? action=CurrentActivity" noresize >
</frameset>
<frame name="bottom" scrolling="no" noresize target="contents" src="Footer.jsp">
<noframes>
<body bgcolor=#FFFFFF >

<p>This page uses frames, but your browser doesn't support them.</p>

</body>
</noframes>
</frameset>[/HTML]

When the frameset loads, I need the focus() to be on "main" because there is onFocus & onblur behavior attached to it. If anyone has an idea please reply.
Aug 19 '07 #1
1 1824
gits
5,390 Expert Mod 4TB
hi ...

welcome to TSDN ...

with that design of the page you cannot simply use the focus()-method onload ... let me explain why: the frames are loading a document ... and every frame does that ... so you will have 4 different onload-events. the problem is now, that you don't know which is first or last (because it is an async process) ... so you have to ensure the load of all frames and after this is done you set the focus. for that, every page may register itself in the frameset when it is loaded ... lets say you declare a global variable here that acts as a counter. every page increases this var onload and asks whether all pages are loaded or not (counter == number of pages to load) and when this is true you may set the focus ;)

kind regards
Aug 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Darren Line | last post by:
Currently in my html document I use the onload command inthe body section to set the focus to a certain field. eg onload="document.form1.SerialNo.focus()" Is there a way to set the focus to...
3
by: Dai Ba Wong | last post by:
Hi: Currently I am having a problem with my webpage. My page consist of two frames, one consist of input text field and the other contains link for different pop-up windows. The problem...
4
by: Arvin Portlock | last post by:
I can't make this work! I have two frames, a table of contents frame on the left and a frame with lots of form elements in it on the right. <frameset rows="100%,*" cols="140,*"> <frame...
2
by: Darin | last post by:
I have an html page (warehouse.htm) that has 2 frames (header.aspx and checkstock.aspx). When warehouse.htm opens, and the other 2 aspx pages load, I want the cursor to be sitting on the first...
3
by: Brian Henry | last post by:
Hi, I have a bunch of forms in a DLL that I call from my main application. The one form is a login form, and I have the tab order set in the order I want it (password box first, then ok button...
5
by: Finn Stampe Mikkelsen | last post by:
Hi How can i set a focus to a textbox in my codebehind page?? I have this WebForm, that takes information from a user and 2 buttons on the form. One that takes action on the entered...
8
by: makunag | last post by:
Didn't get answer with google and in my regular forum. Came across this site and posting here. Your help will be highly appreciated ! Our application have frames - MainNav, TaskNave and Content....
1
by: vigacmoe | last post by:
Hi all, I'm trying to write a simple tkinter program, then this problem popped up. The followin code will describe the problem. ------------------------------------------ import Tkinter ...
5
by: baskarpr | last post by:
Could somebody help me ? I have a left frame and right frame in a page. There is a form in right frame which has number of text box, checkbox, radio button, some static text's. For every input item...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.