Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-13-2011, 03:18 PM   PM User | #1
j_robert_r
New Coder

 
Join Date: Aug 2010
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
j_robert_r is an unknown quantity at this point
Getting Feedback

I used this code from phpacademy but i cant seem to get it to work, i'm new to javascript, i'm more on the php and css side of coding. So is there an error of some sort?

This is the regular page:
Code:
<head>
<script type="text/javascript">
$(document).ready(function() {
$('#getthis').load('checkinfo.php').show();
$('#username').keyup(function() {
$.post('checkinfo.php', { username: form.username.value },
function(result) {
$('#getthis').html(result).show();
}); 
}); 
});
</script>
</head>
<body>

<form  method='post'>
Username: <input type='text' name='username' id='username' size='30' maxlength='25'> <div id='getthis'> </div>
</form>

</body>
and this is the checkinfo.php:
Code:
<?php
echo "$username = $_POST['username'];"
?>

Last edited by j_robert_r; 05-13-2011 at 11:20 PM..
j_robert_r is offline   Reply With Quote
Old 05-13-2011, 08:04 PM   PM User | #2
harbingerOTV
Senior Coder

 
Join Date: Jan 2005
Location: Memphis, TN
Posts: 1,765
Thanks: 8
Thanked 123 Times in 121 Posts
harbingerOTV will become famous soon enough
well, looks like you are trying to use jQuery. Issue is, you are not linking to jQuery in your HTML.

http://docs.jquery.com/Downloading_jQuery
__________________
Stop making things so hard on yourself.
i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis
harbingerOTV is offline   Reply With Quote
Old 05-13-2011, 11:19 PM   PM User | #3
j_robert_r
New Coder

 
Join Date: Aug 2010
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
j_robert_r is an unknown quantity at this point
Thanks, that worked, i also found out why it wasn't working in addition to what you said.
j_robert_r is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:44 AM.


Advertisement
Log in to turn off these ads.