I'm sure someone will help with this:
Basically I got a form which on submit, it directs it to my contact_form.asp which then sends out an email to a specified address, well I got some Radio buttons on that form, and need to get the checked radio button out of a group of about 3 radio buttons.
i.e.
<input type="radio" name="group1" id="serviceDaily" value="Daily"> Daily </input>
<input type="radio" name="group1" id="serviceWeekly" value="Weekly"> Weekly</input>
<input type="radio" name="group1" id="serviceMonthly" value="Monthly"> Monthly</input>
and in my contact_form.asp I am requesting the value like:
group1 = Request("group1")
Am I doing something wrong? i.e. getting the value incorrectly? The response I'm getting is "Group1", not "Daily" as I want to.
I created a test page using the code you supplied and it works fine (see below).
Try a http debugging tool such as fiddler2 to investigate the actual parameters and values passed between the two pages.
<html>
<head></head>
<body>
<form method="post">
<input type="radio" name="group1" id="serviceDaily" value="Daily"> Daily </input>
<input type="radio" name="group1" id="serviceWeekly" value="Weekly"> Weekly</input>
<input type="radio" name="group1" id="serviceMonthly" value="Monthly"> Monthly</input>
<input type="submit" value="submit" />
</form>
</div>
<%
Dim group1
group1 = Request("group1")
Response.Write ("group1='" + group1 + "'")
%>
</body>
</html>
Related
I am building a script that is downloading a zip file and placing it on my desktop. The script works fine except the link to the zip file is taking me to a terms and condition site in order to download it.
I have the below form:
<form action="https://powhatan.iiie.disa.mil/TOUbanneraccept.asp">
<input name="HTTP_REFERER" type="hidden" value="http://iase.disa.mil/stigs/compilations/Pages/index.aspx">
<input name="HTTP_HOST" type="hidden" value="powhatan.iiie.disa.mil">
<input name="SERVER_NAME" type="hidden" value="powhatan.iiie.disa.mil">
<input name="URL" type="hidden" value="/TOUbanner.asp">
<input name="SCRIPT_NAME" type="hidden" value="/TOUbanner.asp">
<input name="PATH_INFO" type="hidden" value="/TOUbanner.asp">
<input name="Destination" type="hidden" value="">
<input name="OriginalURL" type="hidden" value="https://powhatan.iiie.disa.mil/stigs/downloads/zip/FOUO_SRG-STIG_Library_2017_04.zip">
<input name="RewriteURL" type="hidden" value="">
<input name="Accept" style="width: 150px;" type="submit" value="I ACCEPT">
</form>
I am trying to create a query string to accept the webpage terms so that my download will continue but my query string is not working. From what i researched I came up with:
https://powhatan.iiie.disa.mil/TOUbanneraccept.asp/?HTTP_REFERER=http://iase.disa.mil/stigs/compilations/Pages/index.aspx&HTTP_HOST=powhatan.iiie.disa.mil&SERVER_NAME=powhatan.iiie.disa.mil&URL=/TOUbanner.asp&SCRIPT_NAME=/TOUbanner.asp&OriginalURL=https://powhatan.iiie.disa.mil/stigs/downloads/zip/FOUO_SRG-STIG_Library_2017_04.zip&Accept=I%20ACCEPT
I even tried
https://powhatan.iiie.disa.mil/TOUbanneraccept.asp?Accept=I%20ACCEPT
When I try either one I get a Error 404 page as if the page does not exist. I have to do this because it will be included in a VBA macro.
Can anyone tell me what I am doing wrong or what may going on here?
I have 3 radio buttons in a form which have to checked by robotframework. Below is part of the html code:
<div>
<div>
<label for="doc-22-Confirm">
Confirm
<input id="doc-22-Confirm" class="radiocheckbox" type="radio" checked="checked" value="Confirm" name="data[doc-22]"/>
</label>
<label for="doc-22-Reject">
Reject
<input id="doc-22-Reject" class="radiocheckbox" type="radio" value="Reject" name="data[doc-22]"/>
</label>
</div>
<div>
<label for="doc-23-Confirm">
Confirm
<input id="doc-23-Confirm" class="radiocheckbox" type="radio" checked="checked" value="Confirm" name="data[doc-22]"/>
</label>
<label for="doc-23-Reject">
Reject
<input id="doc-23-Reject" class="radiocheckbox" type="radio" value="Reject" name="data[doc-22]"/>
</label>
</div>
</div>
Ids are dynamic. So I'm trying to check all radios with this code but it just select one of them:
click element xpath=//input[contains(#id,'Confirm')]
I even tried this:
click element xpath=//input[contains(#id,'Confirm')][1]
click element xpath=//input[contains(#id,'Confirm')][2]
click element xpath=//input[contains(#id,'Confirm')][3]
But still it doesn't work.
Try the following:
Click element xpath=(//input[contains(#id,'Confirm')])[1]
I added the '( )' , it should solve the issue.
I am trying to put a button on my shiny app which calls out external website though a form/post request. The input values will change but here is a real example.
Example:
<form action="http://toppgene.cchmc.org/CheckInput.action" method="post">
<input type="hidden" name="query" value="TOPPFUN">
<input type="hidden" id="type" name="type" value="HGNC">
<input type="hidden" name="training_set" id="training_set" value="EGFR">
<input type="submit" class="mybutton">
</form>
PS: cross posted on shiny-discuss google group link
Thanks!
-Abhi
I am trying to incorporate a reservation widget within my wordpress install and I have everything working fine except sending the data or it not populating on the other sites form. The site I am trying to send data to is an online reservation software: http://www.directinn.com/demo/
Here is how I am doing my form:
<form name="bookingform" action="http://www.directinn.com/demo" method="get" target="_blank">
<input type="text" name="date1" id="Text1" class="ftxt MyDate three columns" maxlength="10" value="" placeholder="Arrival Date"/>
<input type="text" name="date2" id="Text2" class="ftxt MyDate three columns" maxlength="10" value="" placeholder="Departure Date" />
<input type="submit" name="bookingformsubmit" class="book-now" value="Book Now">
<input type="hidden" name="arrivalDay" value="" />
<input type="hidden" name="arrivalMonth" value="" />
<input type="hidden" name="arrivalYear" value="" />
<input type="hidden" name="departureDay" value="" />
<input type="hidden" name="departureMonth" value="" />
<input type="hidden" name="departureYear" value="" />
<input type="hidden" name="numAdults" value="1" />
Any help would be greatly appreciated ;)
So they are saying if you can iFrame in their Form on your page and if you add the USERNAME for example to the URL, your USERNAME will appear on the invoice. Like this I believe:
http://www.directinn.com/iframefull.html/BOB
I do not think you can make your own form and POST to their page. I see no indication that that is possible from the link you posted of the example.
The code you have will submit a load of Query String data to the receiving site.
The target site may implement some type of cross-site posting prevention which is causing the blockage - or they may ignore your query string parameters entirely.
I have two radio buttons:
<input type="radio" name="group1" />1
<input type="radio" name="group1" />2
How do I know which one is selected when the form is posted?
The inputs should have values:
<input type="radio" name="group1" value="1" />1
<input type="radio" name="group1" value="2" />2
Then, the value will be posted on the name group1. On Asp.net you can get it using:
Request.Form["group1"]
If you are using runat="server", it can happen that name attribute is changed at client, so you will get null as value.