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

accessing page - enabling "sign in" button from login page

suppose there are 2 files "1.html" and "login.html".
from "1.html" i am opening second page "login.html". "1.html" contain one button with value "signin". when i clicked on that button login form will be displayed and i disabled that button using document.form.button_name.disabled=true;

but if login failed or cancel the login form, then how can i enabled that button again from "login.html".
Feb 8 '08 #1
5 1487
acoder
16,027 Expert Mod 8TB
Post your code. Why are you disabling the button in the first place?
Feb 8 '08 #2
Post your code. Why are you disabling the button in the first place?
Hi,
<button name="SignIN" onClick="getSignin()">Sign-In</button> to call the function "getSignin"

Expand|Select|Wrap|Line Numbers
  1. function getSignin()
  2.         {
  3.             x = (1280 - 290)/2, y = (800 - 150)/2;
  4.  
  5.             if (screen)
  6.               {
  7.                 y = (screen.availHeight - 150)/2;
  8.                 x = (screen.availWidth - 290)/2;
  9.             }
  10.  
  11.                    window.open("http://localhost/ForumCreation/3.html","Login", "width=290,height=150,screenX="+x+",screenY="+y+",top="+y+",left="+x);
  12.             document.form12.SignIN.disabled = true;
  13.         }   
here, i am disabling that SignIN button. if not here then, how can i disabled that button from second place?
Feb 11 '08 #3
acoder
16,027 Expert Mod 8TB
Right, I see you're opening a popup window. From the child window, use window.opener.document.forms["form12"].elements["signIN"].disabled = false.
Feb 11 '08 #4
Right, I see you're opening a popup window. From the child window, use window.opener.document.forms["form12"].elements["signIN"].disabled = false.
Sorry, but its not working. i thing I'm doing something wrong:

[HTML]<center>
User Name: <input type="text" name="name"><p></p>
&nbsp; Password: <input type="password" name="psswd">
<p></p><input type="image" src="Classic2.GIF" onClick="getValue()">
<input type="image" src="Classic.gif" onClick="exit()">
</center>

<script language="JavaScript">
function getValue()
{
var str1 = document.Forum.name.value;
var str2 = document.Forum.psswd.value;
var url = "4.jsp?name="+str1+"&psswd="+str2+"&status=log in";
window.open(url,"_blank");
window.close();
}
function exit()
{
window.opener.document.forms["form12"].elements["signIN"].disabled = false;
window.close();
}
</script>[/HTML]

When i clicked on cancel, then exit function called by that event. after that nothing is happened. i used jsp for database connection. when it called jsp file there i check that username and password. how can i check that username and password without opening that jsp page? there is no need of open that page. again if login failed how can i enabled sign-in button from first page? i am not getting that ajax for database connectivity.
Feb 12 '08 #5
acoder
16,027 Expert Mod 8TB
window.opener should be in the popup window, but now you mention that you want to avoid opening the window and want to use Ajax. Is that correct?
Feb 12 '08 #6

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

Similar topics

2
by: VB Programmer | last post by:
I created a page which I am using to prevent the user from hitting the BACK button. I'll call it my "Auto Jump" page. When it is called it basically auto-redirects to a page specified in the...
3
by: niju | last post by:
Hi there, I have three web pages (A,B,C). I need to prevent users accessing page B and C without accessing A. What would be the best way to achieve this rule? Many Thanks Niju
1
by: kambakht | last post by:
I am using an iframe in my index.aspx thus all the webforms in application navigate in this iframe. While main appication links are present on the top of page above iframe, in main window. These...
1
by: kambakht | last post by:
I am using an iframe in my index.aspx thus all the webforms in application navigate in this iframe. While main appication links are present on the top of page above iframe, in main window. These...
1
by: iamvani | last post by:
hi , i am creating a sign in page but it is not completed .can u help me create a signin page using java(swing).or jsp
0
by: parameswar | last post by:
Hi Friends I Have Worked In J2ee (struts).for Example I Am Creating A Login Page In J2ee I Have To Create A Context Directory,then I Have To Configure My Struts.config File,server.xml File In Conf...
1
by: vinodkreddy1 | last post by:
how to Set default Focus to a button in login page that contains more that two button on Enter key pressed in Mozilla. Control.focus() working in IE but not in Mozilla Can any one help me down...
3
by: Charlotte | last post by:
Hello, info: I'me a rookie with IIS I have on a WinXP Pro the IIS installed, so I can test some pages before uploading to the hostserver online on the hostserver is a possibility (with the...
1
by: =?Utf-8?B?VEo=?= | last post by:
Hi, Environment : Asp.net 2.0 / C# As you know, there is a "Remember me" check box in Login control is VS.NET 2005. It allows you to get in the page without logging it if user closes browser,...
3
by: sravani2 | last post by:
Hi, I created the sign in page with username,password fields.and along with those fields i put the check box remember and select that one untill we sign out the page the username and password are...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.