auto submit drop down box. (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


JeroenDortmans -> auto submit drop down box. (1/9/2002 16:06:57)

I have a drop down box made with the FP DRW which I use for querying a page. Now I use a form where this drop down box is placed in with a submit button. I want the drop down box automatically redirect to the search result page when the user selects an value in the drop down box without using the submit button. How to do this?

 




d00nson -> RE: auto submit drop down box. (1/9/2002 19:14:59)

that would depend on what the dropbox is submitting. Eg if the dropbox was providing parameters for a querystring, then u would have the form submit to that ASP page and then have something like <SELECT onchange=form1.submit> where form1 is the name of your form with the dropbox.





JeroenDortmans -> RE: auto submit drop down box. (1/10/2002 3:32:11)

With the drop down box I am submitting a value which I use to query a table on another page. Can I have more detailed information on how to code this in my page.

 




d00nson -> RE: auto submit drop down box. (1/10/2002 8:16:08)

Vague+vague!=clear solution
Can u include some of your code? If not, what is being submitted to query the table? Is the page being submitted to a DRW page? Is it expecting that value via a querystring? Is it all working and u just want to know if it will working without manually clicking on the submit button? if it is, just locate the <select></select> tag pair in ur HTML that contains the values being submitted and insert "onchange=form1.submit" so that the <select> now looks like <select onchange=form1.submit> if your form is called something other than form1, substitute that name instead.





rdouglass -> RE: auto submit drop down box. (1/10/2002 12:29:46)

This may help:

http://www.outfront.net/faq_web/#DropDown

 




JeroenDortmans -> RE: auto submit drop down box. (1/12/2002 13:40:09)

Here is the code of the page. I hope you can clear me where to insert the extra code.

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<% ' FP_ASP -- Deze ASP wordt automatisch door een FrontPage-onderdeel gegenereerd. Niet bewerken.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Nieuwe pagina 3</title>
</head>

<body>

<form method="POST" action="Relaties.asp">
<p align="center"><nobr>
<!--webbot bot="DatabaseRegionStart" s-columnnames="bedrijf_ID,bedrijfsnaam" s-columntypes="3,202" s-dataconnection="Relatiebeheer" b-tableformat="FALSE" b-menuformat="TRUE" s-menuchoice="bedrijfsnaam" s-menuvalue="bedrijfsnaam" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="Bedrijfsnaam_zoeken" s-displaycolumns="bedrijf_ID,bedrijfsnaam" s-criteria s-order="[bedrijfsnaam] +" s-sql="SELECT * FROM Bedrijfsnaam_zoeken ORDER BY bedrijfsnaam ASC" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="Geen records geretourneerd." i-maxrecords="256" i-groupsize="0" botid="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Database</span> " startspan --><!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>Het onderdeel Databaseresultaten op deze pagina kan de inhoud van de database niet weergeven. De pagina moet een bestandsnaam hebben die op .asp eindigt en de server die als host voor het web dient, moet ASP (Active Server Pages) ondersteunen.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Bedrijfsnaam_zoeken ORDER BY bedrijfsnaam ASC"
fp_sDefault=""
fp_sNoRecords="Geen records geretourneerd."
fp_sDataConn="Relatiebeheer"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="bedrijfsnaam"
fp_sMenuValue="bedrijfsnaam"
fp_iDisplayCols=2
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="11129" --><select NAME="bedrijfsnaam" SIZE="1">
<option>Kies een bedrijfsnaam</option>
<!--webbot bot="AspInclude" clientside u-incfile="_fpclass/fpdbrgn1.inc" startspan --><!--#include file="_fpclass/fpdbrgn1.inc"--><!--webbot bot="AspInclude" endspan i-checksum="62210" -->
<option><%=FP_FieldHTML(fp_rs,"bedrijfsnaam")%></option>
<!--webbot bot="AspInclude" clientside u-incfile="_fpclass/fpdbrgn2.inc" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"--><!--webbot bot="AspInclude" endspan i-checksum="62218" -->
</select><!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="TRUE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Resultaten</span> " startspan --><!--webbot bot="DatabaseRegionEnd" endspan --></nobr><input type="submit" value="Zoek!" name="B1" style="font-size: 10 px; font-family: Arial (fantasy); font-weight: bold"></p>
</form>

</body>

</html>


 




d00nson -> RE: auto submit drop down box. (1/13/2002 12:24:46)

rdouglass, I think our friend here wants to autosubmit without clicking on a "submit" button. The FAQ shows how to redirect to various URLs based on the user's selection from a selection/dropbox. At least that's how I interpreted the question. I strand to be korected

 




d00nson -> RE: auto submit drop down box. (1/13/2002 12:42:04)

<select onchange=submit() NAME="bedrijfsnaam" SIZE="1">

The parts in bold are the changes to be made. Hope this helps.

 




JeroenDortmans -> RE: auto submit drop down box. (1/13/2002 13:58:42)

Thank you d00nson very much. This was exactly what I was searching for.

 




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625