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)">
<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