View Single Post
03-01-2008, 06:03 PM
#1
Seraskier is offline Seraskier
Status: I love this place
Join date: Jan 2007
Location: Charlotte
Expertise:
Software:
 
Posts: 542
iTrader: 0 / 0%
 

Seraskier is an unknown quantity at this point

Send a message via AIM to Seraskier Send a message via MSN to Seraskier

  Old  xmlHttp Problems & ASP

Hello,

I do not code in asp, but I am wanting to use it because if I use php pages for my database additions, users can run the file and do basically whatever they want....

I have this code as testing but it doesnt seem to be working...

seems to be as simple as could be, but i dont know what could be the problem.. also im going to expand it more to do what i need...
(been coding in VB.net so im kinda rusty on php, javascript; give me a break please)

index.php
Code:
<script type="text/javascript" src="username.js"></script> 

<form> 
<input type="text" onKeyUp="checkUsername(this.value)">&nbsp;
<span id="response" style="font-size:10px; font-weight:bold"></span>
</form>
username.js
Code:
function checkUsername(str)
{	
	var url = "username.asp";
		url = url + "?username=" + str;
	xmlHttp.onReadyStateChange = stateChanged;
	xmlHttp.Open("GET", url, true);
	xmlHttp.Send(null);
}

function stateChanged() 
{ 
	if (xmlHttp.readyState == 4  && xml.Status == 200)
	{ 
		document.getElementById("response").innerHTML = xmlHttp.responseText;
	}
}
username.asp
Code:
<%
username = request.QueryString("username")

response.Write(username)
%>

hmm.. help please?

Sincerely,
Jordan | Seraskier