473,385 Members | 2,005 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,385 software developers and data experts.

'No element found' error

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;
>>>> Start Error Message <<<<<<<
Error: no element found
Source File:
http://127.0.0.1:8000/pscripts/scr00...=tacoma&stt=47
Line: 1, Column: 1
Source Code:
^
>>>> End Error Message <<<<<<<
>>>> Start JavaScript <<<<<<<
<script language="javascript" type="text/javascript">
var result ;
var http_request = false ;
var ng= -1 ;
var reqFlag="available" ;

function makeRequest(url, parameters) {
http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType('text/xml');
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Cannot create XMLHTTP instance');
return false;
}
http_request.onreadystatechange = alertContents;
http_request.open('GET', url + parameters, false);
http_request.send(null);
}

function alertContents() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
//alert(http_request.responseText);
result = http_request.responseText;
RtVal = result;
} else {
alert('There was a problem with the request.');
}
}
}

function wrtmmbr()
{
if (vrfd=="submitted") {
alert ("Membership has been approved for "+vunm) ; return; }
if (vrfd=="yes") {
vunm = document.crnew.unm.value;
vpsswrd = document.crnew.psswrd.value;
veml = document.crnew.eml.value;
vhsnm = document.crnew.hsfname.value;
vhrnm = document.crnew.hrfname.value;
vcty = document.crnew.cty.value;
vstt = document.crnew.stt.value;

prm="?unm="+vunm+"&psswrd="+vpsswrd+"&eml="+veml+" &hsnm="+vhsnm+"&hrnm="+vhrnm+"&cty="+vcty+"&stt="+ vstt;
reqFlag="wrtProfile" ; makeRequest('pscripts/scr0003.php',prm);
vrfd="submitted" ;
alert("Your Membership has been created, please log in.");
window.open("memberlogin.html","_self"); }
}
function ProcessData()
{
switch(reqFlag)
{
case 'chkUName' :
thrspns = result.indexOf("au~~th");
if (thrspns>ng) {
} else
{
alert(tmp2+" is not available. Please try again.");
document.crnew.cunm.focus(); return ;
}
break ;
case 'chkCity' :
thrspns = result.indexOf("fou~~und");
if (thrspns<0) {
alert("We can not find a City named "+tmp2) ;
document.crnew.stt.focus(); }
break ;
case 'wrtPassword' :
return;
break ;
case 'wrtProfile' :
return;
break ;
}
}
</script>
>>>> End JavaScript <<<<<<<
>>>> Start PHP Script <<<<<<<
<?php

$host = "127.0.0.1";
$login = "root";
$pwd = "AntonMlaber";
$port = "3306";
$db = "mmbrdt";
$tblnm = "membership" ;
$lunm = $_REQUEST["unm"];
$lpsswrd = $_REQUEST["psswrd"];
$leml = $_REQUEST["eml"];
$lhsnm = $_REQUEST["hsnm"];
$lhrnm = $_REQUEST["hrnm"];
$lcty = $_REQUEST["cty"];
$lstt = $_REQUEST["stt"];
$tm = array() ;
$tm=localtime();
$tday = $tm[3];
$tmh = $tm[4] ;
$tmonth = $tmh+1 ;
$tyr = $tm[5] ;
$tyear = $tyr+1900;
$ll=$tyear."-".$tmonth."-".$tday;
$lsd=$tyear."-".$tmonth."-".$tday;
$host=$host.":".(integer)$port;
$conn=mysql_connect($host,$login,$pwd) or die();
$sql = "INSERT INTO $tblnm
(UserName,UserPassword,EmailAddress,HisFName,HerFN ame,City,State,RegDate,LastLogon,RenewalDate)
VALUES
('$lunm','$lpsswrd','$leml','$lhsnm','$lhrnm','$lc ty','$lstt','$ll','$ll','$lsd')";
mysql_select_db($db,$conn) ;
mysql_query($sql);

$sql = "SELECT UserName FROM $tblnm WHERE UserName='$lunm'";
mysql_select_db($db,$conn) ;
$ProNum = mysql_query($sql);

$host = "127.0.0.1";
$login = "root";
$pwd = "AntonMlaber";
$port = "3306";
$db = "upw";
$tblnm = "pwds" ;
$sql = "INSERT INTO $tblnm (UserID,UserName,UserPwd,LastLogon)
VALUES ('$ProNum','$lunm','$lpsswrd','$ll')";
mysql_select_db($db,$conn) ;
mysql_query($sql);

?>
>>>> End PHP Script <<<<<<<
Aug 21 '06 #1
1 5333
On Mon, 21 Aug 2006 14:46:40 -0600, "C.Joseph Drayton" <cs***@tlerma.com>
wrote:
>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;
>>>>> Start Error Message <<<<<<<
Error: no element found
Source File:
http://127.0.0.1:8000/pscripts/scr00...=tacoma&stt=47
Line: 1, Column: 1
Source Code:
^
>>>>> End Error Message <<<<<<<
It's a Javascript error, probably from your XMLHTTPRequest, and further
probably from the request returning an empty string or something non-XML.

Install a Javascript debugger, such as Firebug [1], which will help you find
what's actually going on.

[1] http://www.joehewitt.com/software/firebug/

Follow-ups set to comp.lang.javascript.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Aug 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: TimS | last post by:
I am getting a baffling File not found error (0x800A0035). I am writing asp on a windows 2000 server. I build a path and filename from several fields in a jet database using SQL commands, like...
8
by: Matt | last post by:
I am migrating from NT 4.0 (IIS 4) to 2003 Server (IIS 6). Our Intranet has numerous applications that utilize the FileSystemObject (FSO) and each one is returning a "Path not found." error. These...
1
by: Ciaran Byrne | last post by:
I would like to use the XML API supplied by ClickaTell (http://www.clickatell.com) in my code. I have a simple XML file, which I've test in their online demo and it works fine. I now want to...
1
by: Sanju | last post by:
Hi.. I have working on Windows XP Operating System.Installed J2sdk 1.4.07 and installed IBM DB2 UDB version 8.1 Then i got the following error.. The procedure entry point SQLPrepareW@12...
19
by: MLH | last post by:
I call the following Sub and Function in frmLaunch's OnOpen event code. I keep getting Property Not Found error for the AllowBypassKey setting. Failure point is line #30 in the Function (not the...
15
by: warlord | last post by:
I have a windows client app that is trying to download a file from a web server but I always get the following error when I call the GetResponse method of the Request object. The remote server...
5
by: jiangyh | last post by:
hi there: I use following source to fire outlook express,but I have a file not found error. System.ComponentModel.Win32Exception: File not found ...
1
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...
5
by: stmfc | last post by:
i dont know why pl/sql block below returns no data found error. do you have any idea about it? declare c1 varchar2(80); c2 varchar2(80); begin execute immediate 'select col2 from table1 where...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
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
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...

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.