PDA

View Full Version : sub forms refresh same page


nvysel24
10-27-2010, 06:57 AM
ok i have seen on some webpages where you can select from a combo box and then it refreshes other options on the page w/o actually refreshing the whole entire page.
Right now i have a request page that people submit movie requests and then there is a hidden link that only i know of and i click to get to my readrequests.asp page

right now it displays every request in a giant list which is sort of annoying
so i wanted to create a combo box that displays their username (which i got working) and then when i click get request it displays it below on the same page. I am able to do it if it submits to a diff page but i dont want to do that. this page pulls from a database and the current page im on is readquests.asp

** this is the form that list the username and gives a unique number to each of them
** this post it to the same page which is prob wrong
<form method="post" action="readrequests.asp">
** creates the combo drop down box
<select>
*pulls from database all requests
<%Do While not rsMakeReq.EOF%>
** gets the unique id and the username
<option value="<%Response.Write(rsMakeReq("id"))%>"><%Response.Write (rsMakeReq("Username"))%></option>
<%
'Move to the next record in the recordset
rsMakeReq.MoveNext
Loop%>
</select>
** submit button to get value
<INPUT TYPE="submit" VALUE="Show Request">
</form>
<%



%>
** this is the part of the form where i fill the request by writing the values in it and then processing it on a different page to delete the request and put it in a fulfilled database
<form method="get" action='writeanddelete.asp' >
<br>ID to delete<br>
<input type="text" name="del" size="3"value=<%Response.Write (id)%> ><br><br>
Fulfill<br>
<input type="text" name="username" size="30" value=<%Response.Write (username)%> ><br>
<input type="text" name="ip"size="30" value=<%Response.Write (ipaddress)%>> <br>
<input type="text" name="one" size="30"><br>
<input type="text" name="two" size="30"<br>
<input type="text" name="three" size="30"<br>
<br>

<input type="submit" name="submitreq" value="Fulfill Reqeust"
</form>

</div>
</div>
<div id="sidebar">
<ul>
<!--#include virtual="links.asp"-->
</ul>
</div>
<div class="clear"></div>
</div>

<div id="footer">
<p>&copy; 2010<a href ="readrequests.asp">.</a> Created by David Ginn</p>
</div>
</div>

</body>
</html>



any suggestions are examples of code that i could have?
i tried searching google but i couldnt find anything with this subject

Old Pedant
10-27-2010, 06:47 PM
It's called AJAX.

http://www.w3schools.com/asp/default.asp

Look down the list of topics on the left side to "ASP and AJAX".

nvysel24
10-28-2010, 06:26 AM
It's called AJAX.

http://www.w3schools.com/asp/default.asp

Look down the list of topics on the left side to "ASP and AJAX".

omg perfect found exactly wat i needed thanks