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

Ads









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
Apply more than one xsl for single XML
More than one Faces Configuration file
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
Retrieve values from database using views
for writting java program why we are taking more than one class
problem in sending more than 500 values to a jsp page
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
fetch values from database into text field
fetch values from database into text field
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?
retrieve the records from one table to another table by using cursors
How to retrieve a field from SQLite to Edittext in android
How to retrieve a field from SQLite to Edittext in android
Server side validation on dynamically generated fields from more than one table on spring framework.
retrieve record from the field table
how to validate all form field values at once.
How to store two integer value in a separate file and retrieve those values
Can i insert image into struts text field
retrieve multiple valuesfrom a single field
retrieve multiple valuesfrom a single field
retrieve multiple valuesfrom a single field

Ads