HTML form onsubmit = null but sends me to a page - html

So I'm trying to figure out what sends me to another page when I submit this form. frmS.onsubmit = null. Also the submit button doesn't have an on click that sends you to another page. I want to understand how it sends me to the other page and how to stop that.
EDIT: I should add that I want it to send its info that its sending but not throw me on the next page.
EDIT2: SOLVED I've made an iframe and set the form target to that iframe. Thanks Paul Draper
<form name="frmS" method="post" action="/s.aspx?sm=1jFsQEImT6d7s5gJzLre0g%3d%3d" id="frmS">
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWDwL+raDpAgLOhOEnAqrszZoKAsv4g6IHAqDo8XkCqc7S2wcC96SjuQgC+beo3gUCi5yS5QgCsOmqpAECjce8xA0C0I38vQkCnNGksA4Cw/alsQoC1J6ZlwQMnZiKw/euXyNaAEgF3qFMFg5vlA==">
<input type="hidden" name="__VIEWSTATE" id="
__VIEWSTATE" value="">
</div>
<!--content area-->
<div id="PageContentDiv"><div style="text-align:left;"><div class="sLogo"><img class="notranslate" src="http://secure.surveymonkey.com/_resources/4485/45604485/552bd2d8-f3b6-4e1f-b1e5-3c5ea48189b9.gif" alt=""><div class="sExit"><a class="ExitBtn" target="_self" href="http://www.gazette.net/teacher">Exit this survey</a> </div><br class="clear"></div></div><h1 class="sTitle"><div style="text-align:left;float:none;"><span class="notranslate">My Favorite Teacher 2013 - Montgomery County High School</span></div></h1><div class="pTitle"><h2>2. </h2> <br class="clear"></div><div class="pgHdr"><div id="q1" class="question" style="margin:0 0 0 0;width:auto"><div class="qContent"><div class="qHeader"><abbr class="noborder" title="Question 1">1</abbr>. Please provide your name and e-mail address below. Click done below to submit your vote.</div><div class="qBody"><table cellspacing="0" cellpadding="3" border="0" style="width:100%;"><tbody><tr><td style="width:20%;font-weight:bold;"><label for="text_579095901_6719868704"><span class="hlbl">Please provide your name and e-mail address below. Click done below to submit your vote. </span>Name: (Optional)</label></td><td valign="top"><input id="text_579095901_6719868704" name="text_579095901_6719868704" type="text" size="30" value="" class="open"></td></tr><tr><td style="width:20%;font-weight:bold;"><label for="text_579095901_6719868706">Email Address: (Optional)</label></td><td valign="top"><input id="text_579095901_6719868706" name="text_579095901_6719868706" type="text" size="30" value="" class="open"></td></tr></tbody></table></div></div></div></div></div>
<!--end content area-->
<div id="panButtonBar">
<div style="text-align:center;">
<input type="submit" name="PrevButton" value="Prev" onclick="onesubmit(this);" id="PrevButton" class="btn btntext grey">
<input type="submit" name="NextButton" value="Done" onclick="onesubmit(this);" id="NextButton" class="btn btntext grey">
</div>
</div>
<div class="spacer" style="height:100px;"> </div>
<input type="hidden" name="hid_smC0l1d" id="hid_smC0l1d" value="r9nWM11rHijwX3dDZ1G8NQ_3d_3d">
<input type="hidden" name="hid_smRsL1d" id="hid_smRsL1d">
<input type="hidden" name="hid_smRs1d" id="hid_smRs1d" value="mII0H4g5XRCu4s1ZVhHXsg_3d_3d">
<input type="hidden" name="hid_smCSV" id="hid_smCSV">
<input type="hidden" name="hid_smS1d" id="hid_smS1d" value="rbQr6Wx8ieI2e98gDtyjNA_3d_3d">
<input type="hidden" name="hid_smM0D" id="hid_smM0D" value="E6uK1MhOcpBUysyKlC0vrg_3d_3d">
<input type="hidden" name="hid_smV3Rsn" id="hid_smV3Rsn" value="ryjiA1jsXxArHG3rMuiwxg_3d_3d">
<input type="hidden" name="hid_smS3CT1d" id="hid_smS3CT1d" value="IGaEFrQzyw9OHNYpBjkYsg_3d_3d">
<input type="hidden" name="hid_DC" id="hid_DC" value="UTLbMdg3R07bopsDbKUHM51JeIvWdftG8_2bHZNxxsXT_2bITWvXP9m1Zy_2fqRmNPpOx7">
<input type="hidden" name="Hidden_CollectorToken" id="Hidden_CollectorToken">
<input type="hidden" name="Hidden_Simple" id="Hidden_Simple">
<input type="hidden" name="hid_l04dez" id="hid_l04dez" value="RsDrTe_2b1IjsIQj68b5l2TrRCB0SORAXCRx0_2bpMErNSQ_3d">
<div>
</div></form>

The first line sends you to another page -
<form name="frmS" method="post" action="/s.aspx?sm=1jFsQEImT6d7s5gJzLre0g%3d%3d" id="frmS">
You're being sent to the URL specified in the action attribute of your form.

You are getting a redirect response from your server (assuming that the action on your form is your current page; if not, you are going there).
If you want to submit a form without navigating, create an iframe, and set the target attribute of your form to the iframe.

Related

To where does a form in an IFRAME POST?

I got this form inside an iframe and want to know where the post actually goes. When I go to the network tab, it only shows the src of the iframe and not where the POST request was sent.
<iframe id="popupOverlay_iframe" name="popupOverlayWindow" src="/cgi-bin/admin/radio_contact.cgi?action=add&member_org_id=46757"></iframe>
The page inside this iframe contains the following:
<form name="add_member" method="post" onsubmit="return submitForm(this);" _lpchecked="1">
<label>
<input type="text" name="email.email" id="email.email" value="" class="init_focus" placeholder="Email:">
</label>
<input type="hidden" name="action" id="action" value="add">
<input type="hidden" name="step" id="step" value="email">
<input type="hidden" name="type" id="type" value="employee">
<input type="hidden" name="member_org_id" id="member_org_id" value="46757">
<input type="submit" name="submit" id="submit" value="Next">
<input type="hidden" name="redirect" id="redirect" value="https://stagemms.nationalmediacalls.com/cgi-bin/admin/radio_detail.cgi?action=show&id=46757">
</form>
On submit, the JavaScript function submitForm is called and its result is returned.
If submitForm and thus the snippet returns false, the form won't be submitted. (The JS might do it's own request.)
If submitForm and thus the snippet returns true, the form will be posted to the current page (/cgi-bin/admin/radio_contact.cgi?action=add&member_org_id=46757) because no action was specified.
In this situation, you should have seen something like this in your network tab:
(/foo.html is url of the outside page, and /foo.cgi?action=add&member_org_id=46757 is the url of the page in the iframe.)

Go to a link by using it's parameters?

I have a url and the button doesn't work right so i'm having to input the values into the url. I know it's possible to take the values and put them into the url to get to the page. How is this done? For example
<form method="get" action="https://example.url.com/courses/enrol/manual/manage.php" id="enrolusersbutton-1">
<div>
<input type="submit" value="Enroll users">
<input type="hidden" name="enrolid" value="276">
<input type="hidden" name="id" value="92">
</div>
</form>

Wufoo: Your submission is missing the secure POST key

There was a problem with your submission.
Your submission is missing the secure POST key.
when I am redirected on Wufoo then got the warning or error
I have attached screenshot related error
HTML
<form name="Wufoo Button" accept-charset="UTF-8"
enctype="multipart/form-data" method="post"
action="https://subdomainname.wufoo.com/forms/sponsorchild/">
<!-- Dollars -->
<input id="Field127" name="Field127" type="hidden" t-att-value="Field127" />
<!-- Cents -->
<input id="Field127-1" name="Field127-1" type="hidden" t-att-value="Field1271" />
<!-- Child name and file number -->
<input id="Field125" name="Field125" type="hidden" t-att-value="Field125" />
<input id="saveForm" name="saveForm" class="submit" type="submit" value="Submit" />
</form>
Not sure if you're still stuck on this but I found the answer.
You need to keep this bit of HTML at the end of the form (you can just hide it with css). The value acts as the key:
<li class="hide">
<label for="comment">Do Not Fill This Out</label>
<textarea name="comment" id="comment" rows="1" cols="1"></textarea>
<input type="hidden" id="idstamp" name="idstamp" value="[WUFOO VALUE IS HERE]" />
</li>

How to send an html form with values filled

Basically i have a html form as string
<form class="form login_form" action="https://app.box.com/api/oauth2/authorize?response_type=code&redirect_uri=http://localhost:8080/&client_id=6n8aeye40bowhwz&state=V8eTbbtXbsV" method="post" name="login_form">
<ul class="container error_container basic_list basic_list_sm hidden"><li class="data plm warning ram pas man"><div class="media pvs"><div class="img icon"><div class="sprite_signup_login_icon_error"></div></div><div class="bd"></div></div></li></ul>
<div class="field_set login_fields fw center">
<div class="login_user_inputs"><label for="login" class="field_label user_login_field">Email Address</label><div class="user_login_field text_input_with_sprite text_input_with_sprite_16x16 mbm"><input id="login" class="text_input login_email ram field_element " name="login" type="email" title="Email Address" placeholder="Email Address" value="email#gmail.com"> <label class="icon" for="login" title="Email Address"></label></div><label for="password" class="field_label user_password_field">Password</label><div class="user_password_field text_input_with_sprite text_input_with_sprite_16x16 mbm"> <input id="password" class="text_input login_password ram field_element" name="password" title="Password" placeholder="Password" type="password" autocapitalize="off" autocomplete="off" autocorrect="off" value="passwordstring"> <label class="icon" for="password" title="Password"></label></div> </div> <div class="login_submit_div"><input class="btn btn-primary mhn login_submit fw pvm ram" title="Authorize" value="Authorize" type="submit" name="login_submit"></div> <input type="hidden" name="dologin" value="1" /> <input type="hidden" name="client_id" value="99hxwc5z7wz" /><input type="hidden" name="response_type" value="code" /><input type="hidden" name="redirect_uri" value="http://localhost:8080/" /><input type="hidden" name="scope" value="root_readwrite manage_groups manage_enterprise_properties manage_app_users manage_managed_users" /><input type="hidden" name="folder_id" value="" /><input type="hidden" name="file_id" value="" /> <input type="hidden" name="state" value="Licg8fhDiFyobsV" /> <input type="hidden" name="reg_step" value="" /><input type="hidden" name="submit1" value="1" /><input type="hidden" name="folder" value="" /><input type="hidden" name="login_or_register_mode" value="login" /><input type="hidden" name="new_login_or_register_mode" value="" /><input type="hidden" name="__login" value="1"><input type="hidden" name="redirect_url" value="/api/oauth2/authorize?response_type=code&redirect_uri=http://localhost:8080/&client_id=99hxwc5z7p9g3z&state=LichV8eTbbtXbsV"><input type="hidden" name="request_token" value="5d6b31164f15f58bebff206db0aa595eaa90f5f9b857860f8ac3e64c85a5b5f4"> <input type="hidden" id="_pw_sql" name="_pw_sql" value=""/>
</div>
<div class="sso_switch option_sso mts pvs phm hidden">
Use Single Sign On (SSO)
Use Box account credentials
</div>
</form>
and now i want to submit this form to the url specified in action parameter of form tag. Same as it will be submitted from a browser. And condition is i should not use beego webserver for this.
Thanks in advance
If I understand you correctly, you have to work with an HTML form as opposed to just the input values, and you want to send the input contained in that form to some other server for processing, and you also want to do this programmatically with Go as opposed to clicking on a button inside a browser.
If I got that right, what you have to do is first get the input values, action url, and method from the form. You can do that by using golang.org/x/net/html for example.
After you have all the necessary values you'll have to encode the input values into a valid application/x-www-form-urlencoded string which you can do using the net/url package.
Then all you have to do is to create an http request with http.NewRequest using the form method and action url as it's first two arguments and the urlencoded string as it's last body argument. (You can use strings.NewReader to turn a string into an io.Reader.)
Finally call http.Client.Do on the http.DefaultClient with the newly created request as it's argument.
It's possible that there are some 3rd party packages that do most of this work for you, so if you want to avoid doing this yourself try searching through github.

Form not taking action

I have a problem with a form. It is not sending any action (page not even refreshing on click). If I copy the form in another document locally it has no problem, all working well, mail message being sent. Here is the code of the form:
<form method='post' name='ContactForm' id='contactForm' action='contact_main.php'>
<p>Your name:</p>
<input type="text" class="input-box" name="user-name" placeholder="Please enter your name.">
<p>Email address:</p>
<input type="text" class="input-box" name="user-email" placeholder="Please enter your email address.">
<p>Subject:</p>
<input type="text" class="input-box" name="user-subject" placeholder="Purpose of this message.">
<p class="right-message-box">Message:</p>
<textarea class="input-box right-message-box message-box" name="user-message" placeholder="Your message."></textarea>
<button type='submit' class='myinputbtn' name='submitf' id="submitf">Send your message</button>
<div id='message_post'></div>
<input type="hidden" name="contact">
</form>
Clicking the submit button results in... nothing!
Please let me know if I need to edit my question before downrating. Thanks!
Use
<input type="submit" ...
instead of a button (which is used with Javascript, not for form submitting)