I am getting error while entry in userid field. When user enter his user id, an event is fired immediately and user id is verified using AJAX method. But I am getting error 'Object doesn't support this property or method'. - <form name="myform" action="main.asp" method="post">
-
<div id="content">
-
<h2 id="pageName">Main Page</h2>
-
<div class="feature">
-
<h1>Surfing the intranet </h1>
-
<p>
-
This is a comprehensive information website on Indian Oil Corporation Limited and specially
-
dedicated to IOCL.
-
</p>
-
</div>
-
<div class="login" style="position:relative; left:50px">
-
<table border="1" cellpadding="0" cellspacing="0">
-
<tr>
-
<td bgcolor="#99FF99"><h3>Employee Login</h3></td>
-
</tr>
-
<tr>
-
<td>
-
<table bgcolor="#CCFFCC">
-
<tr>
-
<td align="right">Login :</td>
-
<td><input type="text" name="userid" id="userid" style="width:100px " onblur="userid(this.value);"/></td>
-
</tr>
-
<tr>
-
<td align="right">Password :</td>
-
<td><input type="password" name="passwd" style="width:100px "/></td>
-
</tr>
-
</table>
-
</td>
-
</tr>
-
<tr>
-
<td>
-
<table bgcolor="#CCFFCC">
-
<tr>
-
<td><a href="#">Forgot Password?</a></td>
-
<td><input type="button" style="width:65px " value="Go" onClick="login();"/></td>
-
</tr>
-
</table>
-
</td>
-
</tr>
-
</table>
-
</div>
-
</form>
The description of userid(this.val ue) is as follows - - <script type="text/javascript">
-
var xmlHttp
-
-
function userid1(str){
-
xmlHttp=GetXmlHttpObject();
-
if (xmlHttp==null) {
-
alert ("Your browser does not support AJAX!");
-
return;
-
}
-
var url="checkuser.asp?q="+str+"&sid="+Math.random();
-
xmlHttp.onreadystatechange=stateChanged;
-
xmlHttp.open("GET",url,true);
-
xmlHttp.send(null);
-
}
-
-
function stateChanged() {
-
if (xmlHttp.readyState==4) {
-
document.getElementById("login").innerHTML=xmlHttp.responseText;}
-
}
-
-
function GetXmlHttpObject(){
-
var xmlHttp=null;
-
try { xmlHttp=new XMLHttpRequest(); } // Firefox, Opera 8.0+, Safari
-
catch (e){
-
try {xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");} // Internet Explorer
-
catch (e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
-
}
-
return xmlHttp;
-
}
-
-
</script>
I think error is in line no. 21 where the function 'userid(this.va lue) is called and the error message is 'Object doesn't support this property or method'.
Thanks and regards,
Vikas
21 3898 gits 5,390
Recognized Expert Moderator Expert
try the following: - document.getElementById("login").value = xmlHttp.responseText;
instead of using innerHTML ...
kind regards
I have tried this, but get no solution.
I think login is not an <div Id >. It is a <div class=login>
So how this problem will be solved.
Thanks and regards,
Vikas
gits 5,390
Recognized Expert Moderator Expert
aaarg ... sorry i just had a quicklook and overlooked that ... the value will not work with divs ... of course.
just give your div an id="login" ... is there any reason why you didn't do that?
kind regards
Yes sir,
I have created main div with an <div id="content">
And all the div created with in this div is defined in
<div class="feature" >
<div class="login">
I have done this way. Is it wrong?
Thanks and regads,
Vikas
acoder 16,027
Recognized Expert Moderator MVP
I think error is in line no. 21 where the function 'userid(this.va lue) is called and the error message is 'Object doesn't support this property or method'.
Well, it's not surprising if you've called it userid1.
Yes I have done this also, but not getting solution. The error message is same.
Thanks and regards,
Vikas
acoder 16,027
Recognized Expert Moderator MVP
Have you added the id to the div as suggested earlier?
Yes,
I have done that way also
<div id="login">
and also
<div id="login1">
But with no hope!!!!
acoder 16,027
Recognized Expert Moderator MVP
Post the latest version of your code.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Dinçer |
last post by:
Hi,
I am trying to get user data (email data actually) from Active Directory.
What I exactly want to do is, getting the email address according to
username from the domain.
For example, when I enter my username DINCERM, it should give me
dincerm@domain.com as result.
When I do this:
===
|
by: David Messner |
last post by:
Ok I know this is simple but the statement eludes me...
I have a date field where I want the default value on the data entry form's
date field to be the last date entered. I figure I can do this with a query
but don't know what the criteria needs to be.
Any help would be appreciated,
Thanks
|
by: Alex Wisnoski |
last post by:
I have an A97 application that I am modifying. I have created an
unbound form, "zfrmTestEnterPlacements", with a subform,
"zsfrmSelectPlacement". The intent is to use a combo box on the
primary form to look up 'exhibitor-entry' data and populate a few
fields on this form. The EntryID(number-long data type) will be
passed to a textbox on the subform. The user will then use a combo
box on the subform to look up the appropriate ...
|
by: suzy |
last post by:
i am trying to write aspx login system and the login process requires a
validity check of username and password.
i have been told that raising exception is costly, but i want a custom error
message to be displayed depending on what error occurred (let's say: invalid
username, invalid password, password must contain 5 or more characters,
etc).
at the moment, my login method is returning true/false depending on whether
the login was...
|
by: p |
last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also
have Crystal 9 pro on my development machine. The web app runs fine on my
dev machine but am having problems deploying. I created the websetup and
built the MSI, have the bundled version. Copied to webserver and ran
Websetup.msi. Said I had to remove old version, which I did, then reran
WebSetup.msi and keeps giving me this error. "The installer was interrupted...
| |
by: C.Joseph Drayton |
last post by:
Hi All,
I am not sure if this is a JavaScript or PHP error. Basically what
is happening, is that I have an HTML page with the following
JavaScript. As you can see makeRequest() calls a PHP script which is
included below.
When the code is executed, I get the following error in FireFox's
JavaScript console;
|
by: MLH |
last post by:
I have a query (SQL below) that operates on values entered by users
into an unbound form to append a record to tblAdmin. I do not under-
stand the basis for the error. There are some 17 or so data entry
fields on the form housing perhaps 600-700 characters between the
lot of them. Why might Access 97 need to err on such a simple
operation?
SQL:
INSERT INTO tblAdmin (TowCompany, TowCoAddr, TowCoCity, TowCoState,
TowCoZip, TowCoCounty,...
|
by: karinmorena |
last post by:
I'm having 4 errors, I'm very new at this and I would appreciate your input. The error I get is:
Week5MortgageGUI.java:151:cannot find symbol
symbol: method allInterest(double,double,double)
Location: class Week5MortgageGUI
Week5MortgageLogic allint = logic.allInterest(amount, term, rate);
Week5MortgageGUI.java:152:cannot find symbol
symbol: method allInterest(double,double,double)
Location: class Week5MortgageGUI
|
by: DonRayner |
last post by:
This one has me stumped. I'm getting a "Type Mismatch" error on one of my forms when it's being opened. It's hapening before the forms "On Open" event, I stuck a msgbox in there to check and I'm getting the error before it opens.
The line of code that calls the form from another form is.
DoCmd.OpenForm "NonConformanceAdd",,,,acFormAdd,acDialog
I get the error, click ok, then the form opens and works exactly how it's supposed to. I even...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |