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
To get the value of more than one text box in an HTML page to a jsp page - JSP-Interview Questions
How to Display Duplicate elements from more than one List in java?
how to handle action events in case of more than one JFrame
Error in connecting to the mySQL database in TOMCAT using more than one PC (database connection pooling)
Apply more than one xsl for single XML
more than one struts-config.xml file
More than one Faces Configuration file
Implementing more than one Job Details and Triggers
how to restrict user against marking same event more than one times - JSP-Servlet
Hi.. how to write more than one sheets in a excel file... pls anybody help me....
problem in sending more than 500 values to a jsp page
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
Retrieve values from database using views
for writting java program why we are taking more than one class
Writing more than one cards in a WML deck.
how to move curosr from one text field to another automatically when the first textfield reaches its maximum length
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 data by using combo box value in jsp? - JSP-Servlet
How to retrieve a field from SQLite to Edittext in android
How to retrieve a field from SQLite to Edittext in android
Can i insert image into struts text field
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
Show text field & check input using jQuery
how to validate all form field values at once.
retrieve record from the field table
Use of "|" separator for selecting more than one path
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

Ads