Ask a Question related to Dreamweaver AppDev, Design and Development.
-
btn #1
Struggling with page redirect based on radio button andform..?
Hi - using ASP/ACCESS/VB Script
Have been struggling on this for days no, so I need som help please;
Have a form with 2 radio buttons - se below.
If radio button 2 is selected and imagefield submit clicked, then submit all
form variables to testpage 2.
If button 1 is selected and imagefield submit clicked, then only redirect to
testpage 1.
How can this be done??
Here is my form;
<form name="FormName" method="POST"
action="https://secure.contopronto.com/webshop/pay.aspx">
<div align="left">
<table width="579">
<tr>
<td colspan="2" class="tekst12bla"><label>
<input type="radio" name="1" value="Faktura">
Postoppkrav</label></td>
</tr>
<tr>
<td width="122" height="22" class="tekst12bla"><label>
<input type="radio" name="2" value="Luup">
<a href="http://www.luup.com" target="_blank"><img
src="/bilder/sig_small_luuplogo.gif" width="60" height="20" border="0"
align="absmiddle"></a></label></td>
<td width="445" class="tekst12bla"><span
class="tekst10bla">LUUP er en elektronisk lommebok som kan inneholde både
penger og kort.</span></td>
</tr>
</table>
<p><input name="ShopID" value="Testshop" type="hidden">
<input name="Language" value="NO" type="hidden">
<input name="OrderID" value="<%=Session.SessionID%>"
type="hidden">
<input name="Amount"
value=<%=Replace(WA_eCart_GrandTotal(testshop),"," ,".")%> type="hidden">
<input name="Currency" value="NOK" type="hidden">
<input name="OrderName" value="testshop - ordre"
type="hidden">
<input name="InfoTotal" value="0" type="hidden">
<input name="UrlOk"
value="http://www.testshop.no/asp/ordrebekreftelse_cp.asp" type="hidden">
<input name="UrlCancel"
value="http://www.testshop.no/asp/ordrebekreftelse.asp" type="hidden">
<input name="UrlLogo"
value="http://www.testshop.no/bilder/Steggen.gif" type="hidden">
<input name="NotificationType " value="1" type="hidden">
<input name="ResponseType" value="0" type="hidden">
</p>
<p>
<input name="imageField" type="image"
src="/bilder/knapp_sendbestilling.gif" align="bottom" width="117" height="20"
border="0">
</p>
</div>
</form>
Best regards,
Bjorn.
btn Guest
-
Radio Button Options in Dynamic ASP Page
I had a Dreamweaver "Behaviors question" for a survey I was working on. Please see survey link below:... -
radio and redirect
Why mine code ins't work?, did I do anthing incorrect here? Thanks <script language="javascript"> function redirect() if page="add" {... -
Redirect and pass form variables based on radio buttonselection?
Hi - using ASP/Access/VB Have a radio group with to radio buttons. If button 1 is selected - then pass the form variables and go to page 1 If... -
Redirect Based on What They Typed In
Imagine your web hosting provider just permitted you to type *.mydomain.com and you still get to the mydomain.com website that they host for you.... -
redirect to another page based on text in the URL of the current page
Hi JPElectron, You were looking good until you got to the code. You're trying to use client-side code for your redirects, when you should be... -
Paul Whitham TMM #2
Re: Struggling with page redirect based on radio button and form..?
At present if the button is clicked then the visitor will go to
[url]https://secure.contopronto.com/webshop/pay.aspx[/url]. It is on that page that you
need to detect which radio button was clicked and handle the redirections.
Basically you would us an IF/Else statement.
--
Regards
Paul Whitham
Macromedia Certified Professional for Dreamweaver MX2004
Valleybiz Internet Design
[url]www.valleybiz.net[/url]
Team Macromedia Volunteer for Ultradev/Dreamweaver MX
[url]www.macromedia.com/support/forums/team_macromedia[/url]
"btn" <webforumsuser@macromedia.com> wrote in message
news:d556uk$jt7$1@forums.macromedia.com...all> Hi - using ASP/ACCESS/VB Script
>
> Have been struggling on this for days no, so I need som help please;
>
> Have a form with 2 radio buttons - se below.
> If radio button 2 is selected and imagefield submit clicked, then submitto> form variables to testpage 2.
> If button 1 is selected and imagefield submit clicked, then only redirectclass="tekst12bla"><label>> testpage 1.
>
> How can this be done??
>
> Here is my form;
> <form name="FormName" method="POST"
> action="https://secure.contopronto.com/webshop/pay.aspx">
> <div align="left">
> <table width="579">
> <tr>
> <td colspan="2" class="tekst12bla"><label>
> <input type="radio" name="1" value="Faktura">
> Postoppkrav</label></td>
> </tr>
> <tr>
> <td width="122" height="22"både> <input type="radio" name="2" value="Luup">
> <a href="http://www.luup.com" target="_blank"><img
> src="/bilder/sig_small_luuplogo.gif" width="60" height="20" border="0"
> align="absmiddle"></a></label></td>
> <td width="445" class="tekst12bla"><span
> class="tekst10bla">LUUP er en elektronisk lommebok som kan inneholdetype="hidden">> penger og kort.</span></td>
> </tr>
> </table>
> <p><input name="ShopID" value="Testshop" type="hidden">
> <input name="Language" value="NO" type="hidden">
> <input name="OrderID" value="<%=Session.SessionID%>"
> type="hidden">
> <input name="Amount"
> value=<%=Replace(WA_eCart_GrandTotal(testshop),"," ,".")%> type="hidden">
> <input name="Currency" value="NOK" type="hidden">
> <input name="OrderName" value="testshop - ordre"
> type="hidden">
> <input name="InfoTotal" value="0" type="hidden">
> <input name="UrlOk"
> value="http://www.testshop.no/asp/ordrebekreftelse_cp.asp" type="hidden">
> <input name="UrlCancel"
> value="http://www.testshop.no/asp/ordrebekreftelse.asp" type="hidden">
> <input name="UrlLogo"
> value="http://www.testshop.no/bilder/Steggen.gif" type="hidden">
> <input name="NotificationType " value="1"height="20"> <input name="ResponseType" value="0" type="hidden">
> </p>
> <p>
> <input name="imageField" type="image"
> src="/bilder/knapp_sendbestilling.gif" align="bottom" width="117"> border="0">
> </p>
> </div>
> </form>
>
> Best regards,
>
> Bjorn.
>
Paul Whitham TMM Guest
-
btn #3
Re: Struggling with page redirect based on radio buttonand form..?
Hi.
Thanx for reply.
My problem is that I cant put my IF/ELSE code on this page because it is on a
secure server that belongs to a payment gateway.
I need to get this done one the page that is attached.
Can I use 2 forms on my page,
If radio 1 clicked then submit form 1
If radio 2 clicked, then submit form 2
IS this an idea? How?
Bjorn.
btn Guest
-
Paul Whitham TMM #4
Re: Struggling with page redirect based on radio button and form..?
Bjorn
While two forms are possible they would require two buttons so they are not
the answer to your problem. The radio button does not have a value if it is
not submitted so an inpage test is not available.
You are going to have to action the form to a second page. At the very start
of it have the IF statement that contains the test that will result is no
action but a redirect. Something like this
<%
if request.Form("radiobutton") = "b" then
reponse.redirect ("page2.asp")
End if
%>
Then copy all the form elements from the first page that need to go to the
gateway, but set their types to hidden and values to be
<%request.form("fieldname")%>. The form does not need a button but it does
need a name
Then modify the body tag by adding the following
onload="document.formname.submit();"
--
Regards
Paul Whitham
Macromedia Certified Professional for Dreamweaver MX2004
Valleybiz Internet Design
[url]www.valleybiz.net[/url]
Team Macromedia Volunteer for Ultradev/Dreamweaver MX
[url]www.macromedia.com/support/forums/team_macromedia[/url]
"btn" <webforumsuser@macromedia.com> wrote in message
news:d56c0f$c1u$1@forums.macromedia.com...on a> Hi.
>
> Thanx for reply.
>
> My problem is that I cant put my IF/ELSE code on this page because it is> secure server that belongs to a payment gateway.
> I need to get this done one the page that is attached.
>
> Can I use 2 forms on my page,
> If radio 1 clicked then submit form 1
> If radio 2 clicked, then submit form 2
>
> IS this an idea? How?
>
> Bjorn.
>
Paul Whitham TMM Guest



Reply With Quote

