getting values from ajax

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hemi19
Forum Newbie
Posts: 4
Joined: Thu Sep 17, 2009 2:13 am

getting values from ajax

Post by hemi19 »

iam getting values from ajax, how to store them in variables according to my code
__________________________________________________ ___________

<table align=center width=300 border=1> <tr> <td width=125 >Weight of <br>Empty Bottle</td>


<td align=center width=50><font size=3>[W</font><font size=1>0</font>]</td>



<td align=center>[g]</td><td><input name=one type=text size="10" value='' id='a'></td>
<tr> <td > Bottle + Dry <br>Powder</td>
<td align=center width=50><font size=3>[W</font><font size=1>1</font>]</td>

<td align=center>[g]</td><td><input name=one type=text size=10 value='' id='b'></td></tr>

<tr> <td >Specific Gravity of Liquid</td>
<td align=center width=50><font size=3>[P</font><font size=1>1</font>]</td>
<td align=center>[g/cm3]</td>
<td ><input name=one2 type=text size="10" value='' id='c'></td>
</tr>
</table>
</td>
<td width=50 >

</td>
<td>
<table align=center width=300 border=1> <tr> <td width=125 >Weight of <br>Empty Bottle</td>
<td align=center width=50><font size=3>[W</font><font size=1>2</font>]</td>
<td align=center>[g]</td><td><input name=one type=text size="10" value='' id='d'></td>
<tr> <td > Bottle + Dry <br>Powder</td>
<td align=center width=50><font size=3>[W</font><font size=1>3</font>]</td>
<td align=center>[g]</td><td><input name=one type=text size=10
value='' id="user" onblur='getContent("GET","scheduleexist.php?a="+do cument.getElementById("a").value+"&b="+document.ge tElementById("b").value+"&c="+document.getElementB yId("c").value+"& d="+document.getElementById("d").value+"&user="+do cument.getElementById("user").value,"r");'></td></tr>
<tr> <td >Specific Gravity of Liquid</td>
<td align=center width=50><font size=3>[P</font><font size=1>s</font>]</td>

echo"<td align=center>[g/cm3]</td> <td id=r> </td>
-----

__________________________________________________ __________
i want that to be stored in a php variable can i store it.
One more thing there r no submit button in this page values are generated dynamically.
User avatar
Robert07
Forum Contributor
Posts: 113
Joined: Tue Jun 17, 2008 1:41 pm

Re: getting values from ajax

Post by Robert07 »

Hello,
Since you didn't post your getContent javascript function I can only guess what values are returned. But there are usually a couple more functions that parse the results - you can take a look at my blog post at http://www.goodfeelingplace.com/the-ess ... n-an-hour/ to get a better idea of how the process works.
Regards,
Robert
Post Reply