how can retrieve more than one values in text field using ajax?

how can retrieve more than one values in text field using ajax?

im using php and ajax. Problem is that i want to search seat numbers bases of batch and semester condition on onchange event eg. if i search batch 2008 and semester first then in mysql db retrieve seat numbers 1,2,3,4 in text boxes problem in while loop why if write this so it is unsuccessful

while($row=mysql_fetch_array($result))
{

echo "<input name='seat' type='text' value=".$row['Seat_Number'].">";

}

error on this line Seat Numbers Warning: mysqlfetcharray(): supplied argument is not a valid MySQL result resource in E:\software\wamp\www\result_db\findseatno.php on line 23

but if i write this code with option menu it is successful

echo "<b> Seat Numbers</b>";
echo "<select name='seat'> 
<option>Select seat numbers</option>";

while($row=mysql_fetch_array($result))
{

echo "<option value>".$row['Seat_Number']."</option>";

}
echo "</select>";

plz solve this problem if i search in text field so what i do?

entermarks.php

<div align="left"><strong>Batch</strong> : 
      <select name="batch" onChange="getSeat(this.value,this.value,this.value);getSeat(document.fm.degree.selectedIndex,document.fm.batch.selectedIndex,document.fm.semester.selectedIndex);">
        <option value="">Select Batch</option>
        <option value="2008">2008</option>
        <option value="2009">2009</option>
</select>
      <br />
    </div>

<div align="left"><strong>Semester</strong> : 
      <select name="semester" onChange="getSeat(this.value,this.value,this.value);getSeat(document.fm.degree.selectedIndex,document.fm.batch.selectedIndex,document.fm.semester.selectedIndex);">
        <option value="">Select Semester</option>
        <option value="first">first</option>
        <option value="second">second</option>
</select>
      <br />
    </div>

<div id="seatdiv">
      <div align="left"><strong>Seat Numbers</strong> 

     <input name="seat" type="text" id="seat"/ >

      </div>
      </div>
View Answers









Related Tutorials/Questions & Answers:
how can retrieve more than one values in text field using ajax?
Can a Class extend more than one Class?
Advertisements
Deployment on Server that can be used simultaneously by more than one user
How to get more than one value from ajax
How to Display Duplicate elements from more than one List in java?
how to handle action events in case of more than one JFrame
To get the value of more than one text box in an HTML page to a jsp page - JSP-Interview Questions
Apply more than one xsl for single XML
more than one struts-config.xml file
Error in connecting to the mySQL database in TOMCAT using more than one PC (database connection pooling)
More than one Faces Configuration file
how to restrict user against marking same event more than one times - JSP-Servlet
Implementing more than one Job Details and Triggers
Hi.. how to write more than one sheets in a excel file... pls anybody help me....
how to read the values for text and csv files and store those values into database in multiple rows..means one value for one row
how can i store text box values as it is in database table
for writting java program why we are taking more than one class
problem in sending more than 500 values to a jsp page
Retrieve values from database using views
how to move curosr from one text field to another automatically when the first textfield reaches its maximum length
Writing more than one cards in a WML deck.
fetch values from database into text field
fetch values from database into text field
using getText() to retrieve text from an array of text fields with loop.
how to retrieve text and images from mysql database and show on html page using jsp servlet
J query event for selecting the more than one div in tablet browser(Select and drag)?
How to write more than 65536 rows in single excel file but more than 1 sheets?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How to retrieve a field from SQLite to Edittext in android
How to retrieve a field from SQLite to Edittext in android
How to retrieve data by using combo box value in jsp? - JSP-Servlet
Server side validation on dynamically generated fields from more than one table on spring framework.
retrieve the records from one table to another table by using cursors
how to validate all form field values at once.
Can i insert image into struts text field
retrieve record from the field table
Show text field & check input using jQuery
retrieve multiple valuesfrom a single field
retrieve multiple valuesfrom a single field
retrieve multiple valuesfrom a single field
retrieve multiple valuesfrom a single field
retrieve multiple valuesfrom a single field
retrieve multiple valuesfrom a single field
How to store two integer value in a separate file and retrieve those values

Ads