[jQuery] Working with the ajax function
Hey all, i have this:
$.ajax({
type: "POST",
url: "add.php",
data: "word": $("#word").blah.value,
})
And I get this error:
missing } after property list
http://localhost/magnet/?addWord=ryan&submit=Add
Line 17
Any idea why? And my goal is to fill out the form hit submit then
display the value on the page instantly. Will this do this?
And where i have "blah" that changes to "word" correct, here is my
form:
<form name="add" id="addWord" method="post"
action="add.php"><label>Add Word:<label>
<input type="text" size="20" name="word"/>
<input type="submit" name="submit" value="Add"/>
</form>
Any thoughts?
Thank you so much,
Ryan