473,406 Members | 2,273 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,406 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 2331
C.Joseph Drayton said the following on 8/21/2006 4:45 PM:
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;
If the JS console is showing an error, then it is a JS error, but that
error may be caused by PHP generated code. Go figure.

Start adding alerts to your function to see when it errors out.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 21 '06 #2

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

Similar topics

3
by: Rutger Claes | last post by:
Code and problem are from PHP5: When I execute the following piece of code, the DomException is thrown with a message: Not Found Exception. I assume this means that the node I extracted from the...
1
by: UndoMiel | last post by:
Hi, I have a situation where i would like to validate the occurance of certain elements, based on the value of an attribute. What is the "best" way to handle such validations? I am fairly new...
0
by: James Hebben via .NET 247 | last post by:
I am trying to generate C# classes for a specific element in aschema using the XSD.EXE tool. Assume an XSD file that definesan element, Foo, containing an element, Bar. The Bar elementcontains a...
3
by: Robert | last post by:
I have a number of web projects converted from 1.1 to 2.0 in VS2005. I am methodically seeing the error below: The element 'compilation' has invalid child element 'compilers'. List of...
27
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res =...
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...
0
by: qwix | last post by:
Hi, after hours spent Googling I'm undone. What I need is to create a XML schema allowing some element to contain any XHTML element(s). This is my XML file I'm trying to validate according to...
1
by: Elmo Watson | last post by:
Just switched from Beta2 to RC1 - I get this error for all the Ajax stuff (UpdatePanel, UpdateProgress, etc) as well as many others any time I open HTML source view on any page in the site. The...
3
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On...
6
by: =?Utf-8?B?TXIuIFNtYXJ0?= | last post by:
Error Type: (0x8002802B) Element not found. //global.asa, line 28 The above is what I always get when I tried to log on to my website. I am still developing it using localhost. So the very...
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
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
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...
0
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.