Share on Google+Share on Google+

jabeen sarwar
how can retrieve more than one values in text field using ajax?
0 Answer(s)      5 years and 8 months ago
Posted in : 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>

Ads

View Answers









Related Tutorials/Questions & Answers:
Advertisements
Tutorials   
Java Spring Hibernate Struts Training Ajax java How to cascade two text boxes?? How to create runtime drag and drop form builder using asp.net mvc and jquery jsp+ajax validation JQuery-JSP AJAX example not working What is Ajax Framework How to write first example in Ajax? What are Advantages and Disadvantages of AJAX What is Ajax? how to set running watch with descending order in applycation with ajax how to set running watch with descending order in applycation with ajax jsp pages for dispatchaction for adding user to database c++ new, delete, string class using ajax i want to insert data into oracle database how to generate reports from oracle database using jsp and ajax code dynamic creation of multiple drop-down menus Ajax programming tutorials Displaying data from combobox on the web page Displaying data from combobox on the web page Displaying data from combobox on the web page Displaying data from combobox on the web page Displaying data from combobox on the web page What is Java? How to make a ajax application which take data from textarea and that page is not refreshing. how can add new line character into ajax response for java how can add new line character into ajax response for java c# c# asp.net Struts 2 + Ajax bodygaurd java Ajax mew 333 data insertion and fetch 1 my answer what is an ajax call? what is an ajax call? JSF How to easily send and receive recorders from database (in AJAX)? calculating time difference for manually entered in-time and out-time in hours and min for dynamically generated rows in jsp and display in third textfield. how to operate on select box using ajax in struts2? how to operate on select box using ajax in struts2? Auto Search box using ajax Dependant Dropdown Lists AJAX REGISTRATION FORM ajax code for jsp java i want to know how a slide will hide i want to know how a slide will hide

Ads

 
Advertisement null

Ads