Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HTML form - 2 submit buttons?
Message
From
01/07/2014 12:52:17
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01602997
Message ID:
01602999
Views:
76
This message has been marked as a message which has helped to the initial question of the thread.
Have each button populate a hidden field with the type of search to make. The value gets passed back with the rest of the form data. Then on the server, you check that value and process accordingly.



>Hi everybody,
>
>We have a VFP application right now that produces HTML file displayed in a C++ application.
>
>This is what I have in the HTML right now (made changes yesterday and hadn't have a chance to test today yet)
>
>
><FORM METHOD="post" ACTION="rez://SEARCH" ID="frmAddItem" NAME="frmAddItem">
><#IF llSigCapture>
>                  <OBJECT classid=clsid:69A40DA3-4D42-11D0-86B0-0000C025864A height=0 id=SigPlus1 name=SigPlus1
>		                   style="HEIGHT: 0px; WIDTH: 0px; LEFT: 0px; TOP: 0px; VIEWASTEXT; visibility: hidden">
>                         <PARAM NAME="_Version" VALUE="131095">
>                         <PARAM NAME="_ExtentX" VALUE="4842">
>                         <PARAM NAME="_ExtentY" VALUE="1323">
>                         <PARAM NAME="_StockProps" VALUE="0"></OBJECT><BR><BR>
><#ENDIF>
><INPUT TYPE="hidden" NAME="SessionInfo" VALUE="<<This.cSessionInfo>>">
><INPUT TYPE="text"   NAME="txtSearch" ID="txtSearch" VALUE="" SIZE="10" CLASS="formtext">&nbsp;&nbsp;
><SELECT NAME="cboSearchOption">
>                <LOOP Table=csrSearchOptions><OPTION <<IIF(csrSearchOptions.Option = "All Fields", [SELECTED], [])>> VALUE="<<ALLTRIM(csrSearchOptions.Option)>>"><<ALLTRIM(csrSearchOptions.Option)>></Option></LOOP>
></SELECT>
>
><INPUT TYPE="submit" CLASS='button' VALUE="Search" TITLE = "Partial Match Search by Selected Field">
>
><INPUT TYPE="submit" CLASS='button'
>     ONCLICK="navigate('REZ://ExactMatch')"
>	 TITLE = "Exact Match Search by Selected Field"
>     VALUE="Exact Match" ID="btnExactMatch">
>
></FORM><BR>
>
>There are two problems so far.
>
>1. I added an ExactMatch button and I want it to behave the same way as Search button. So, I need to be able to read txtSearch and cboSearchOptions values back in the procedure that performs the action. I also want to be able to tell if the action was initiated by a Search button or by Exact Match button.
>
>So, this is my first problem - I don't know if this is OK to have 2 submit buttons or not and if not, how else should I pass the txtSearch and cboSearchOptions values back?
>
>2. My other little problem is display. I want the Exact Match button to be right below the Search button in my HTML. I am not sure how to get this too.
>
>Thanks a lot in advance.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform