[FX.php List] sending more than one field with lajax
Andrew Denman
adenman at tmea.org
Wed Jan 24 14:49:52 MST 2007
Alex,
name=value[&name2=value2...] means "like the URL after ? in a GET".
Try this:
<a
href="javascript:LAJAX.post(url,updatePost,'Recipes='+document.form1['nu
mberRecipes'].value+'&Books='+document.form1['numberBooks'].value
)">Load Post Data</a>
Andrew Denman
-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Alex Gates
Sent: Wednesday, January 24, 2007 3:38 PM
To: fx.php_list at mail.iviking.org
Subject: [FX.php List] sending more than one field with lajax
Hi everyone-
I realize this is off topic, but I figured someone here may have some
experience with this.
I'm trying Lance Hallberg's LAJAX class. I'm able to get it to work
with his example, but I am having trouble figuring out the right syntax
to send multiple fields in the POST.
On the website he says "NOTE: Params should be
name=value[&name2=value2...] format."
I haven't been able to get this.
Would anyone like to help out a beginner and show me the proper syntax?
My code using:
<a
href="javascript:LAJAX.post(url,updatePost,'Recipes='+document.form1['nu
mberRecipes'].value)">Load Post Data</a><br />
<form name="form1" id="form1">
<input type="text" id="numberRecipes" name="numberRecipes" />
<input type="text" id="numberBooks" name="numberBooks" />
</form>
works just fine to send the first field, but I can't figure out how to
add the second field to the post array.
I've tried all sorts of combinations, but my little experience with
Javascript isn't helping me at all.
I thought this could do it:
<a
href="javascript:LAJAX.post(url,updatePost,'Recipes='+document.form1['nu
mberRecipes'].value , 'Books='+document.form1['numberBooks'].value
)">Load Post Data</a><
but I was wrong.
Any help would be much appreciated.
-Alex
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list