473,395 Members | 1,624 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,395 software developers and data experts.

How to set focus on a textbox in a framed page (the page is loaded in a frame).

This is my javascript file
Expand|Select|Wrap|Line Numbers
  1. function signin_check()
  2. {
  3.     var e_id=document.getElementById("abcd");
  4.     var paswd=document.getElementById("bcd");
  5.  
  6.     if(e_id.value=="")
  7.     {
  8.         alert("Please enter your username/email address");        
  9.         e_id.focus();
  10.     }
  11.     else if(paswd.value=="")
  12.     {
  13.         alert("Please enter the password");
  14.         paswd.focus();
  15.     }
  16.     else
  17.     {
  18.         var a=document.getElementById("signinform");
  19.         a.setAttribute('action', 'home.xhtml');
  20.     }
  21.  
  22. }
  23.  
.focus() doesnt seem to work
Nov 7 '10 #1
5 2243
gits
5,390 Expert Mod 4TB
is the script located in the iframe too or is it in the parent page?
Nov 8 '10 #2
The script is in a separate .js file. The file is called from the page where the textbox is located.
Nov 8 '10 #3
gits
5,390 Expert Mod 4TB
so the js file is included in the page that is loaded in the iframe -> does any error occur in FF error console? when is the function called exactly ...
Nov 9 '10 #4
I'm not sure i understand the error console u mentioned.. And its not iframe. The frames are implemented using frameset tags. The function is called when i click on a submit button... Basically doing form checking.
Nov 11 '10 #5
gits
5,390 Expert Mod 4TB
in fiefox click on extras -> Error console ... scroll down to the and and tell what error is displayed?

kind regards
Nov 16 '10 #6

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

Similar topics

1
by: ck388 | last post by:
I am trying to open a frameset in a new window......where the frame called "main" shows the file called customerGeneral.aspx. I can't get it to work though...i always get something like...
3
by: lir | last post by:
Hi, I am trying to save a fram in a page using the execCommand("saveas") the html is save currectly but I can not save the gif on that page. How can I save the fram with the gif via...
2
by: David Cho | last post by:
My button to print a document is in one frame, but the target doc is in a different one. The button ======= <input type="submit" name="btnPrint" value="Print Application" id="btnPrint"...
3
by: Tim Streater | last post by:
I have, as it might be, this in a frame: <a href="mystuff.html">Click here</a> When I click the link, it loads mystuff.html into the frame, whereas what I want is to replace the whole window...
3
by: tshad | last post by:
Is there a way to tell it to go to the first textbox on the page? I would like the user to start off at the textbox on my page instead of having to tab down through my meu to get to it or to have...
7
by: joey.powell | last post by:
I have a home page with username and password textboxes and a login button for purposes of users being able to log in (forms authentication) directly on the site home page. I also have a dedicated...
1
by: Alex | last post by:
I need to detect if page loaded or not with a script (in a child frame). The IE has a special readyState function, is there anything similar for Mozila browsers? Is there a work around? Thank...
33
by: me2tech | last post by:
Hi, This is ram. I am developing a page(usereg.jsp) with two textboxes one for username and another for email. Since i am using this page in main.jsp using Ajax, I am removing the body part in...
1
by: colleen1980 | last post by:
Hi: Can any one please tell me that how to i pass the two textbox values in the new page. If i use the form action in the popup window page then the new page is open in the same popup window as i...
4
by: bnashenas1984 | last post by:
Hi everyone I have a chat form and I need my textfield to be the current one when the page is loaded. <form action="" method="post"> <input type="text" name="text1"> <input...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.