Search Results

Search found 20513 results on 821 pages for 'form submit'.

Page 2/821 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Javascript Post Request like a Form Submit

    - by Joseph Holsten
    I'm trying to direct a browser to a different page. If I wanted a GET request, I might say document.location.href = 'http://example.com/q=a'; But the resource I'm trying to access won't respond properly unless I use a POST request. If this were not dynamically generated, I might use the HTML <form action="http://example.com/" method="POST"> <input type="hidden" name="q" value="a"> </form> Then I would just submit the form from the DOM. But really I would like JavaScript that allows me to say post_to_url('http://example.com/', {'q':'a'}); What's the best cross browser implementation? Edit I'm sorry I was not clear. I need a solution that changes the location of the browser, just like submitting a form. If this is possible with XMLHTTPRequest, it is not obvious. And this should not be asynchronous, nor use XML, so AJAX is not the answer.

    Read the article

  • Submit button not focused even though tabindex is properly set

    - by Nicsoft
    Hello, I have defined tabindex for the input fields in a form. When tabbing through the input fields the submit button is never getting the focus, some other input fields in a different form on the page gets the focus. Those are all having tabindexes higher than 3. How come? <form action="subscription.php" name="subscribe" method="post" onsubmit="return isValidEmailAndEqual()"> <p id="formlabel">E-mail</p> <input type="text" name="email1" tabindex=1> <br/> <p id="formlabel">Repeat e-mail</p> <input type="text" name="email2" tabindex=2> <br/> <input id="inputsubmit" type="submit" value="Subscribe" tabindex=3> </form> .css: input { background-color : #333; border: 1px solid #EEE; color: #EEE; margin-bottom: 6px; margin-top: 4px; padding: 1px; width : 200px; } #inputsubmit { background-color : #d7e6f1; border: 1px solid #EEE; color: #0000ff; margin-bottom: 6px; margin-top: 4px; padding: 1px; width : 200px; } #inputsubmit:hover { cursor: pointer; cursor: hand; background-color : #d7e6f1; border: 1px solid #0000ff; color: #0000ff; margin-bottom: 6px; margin-top: 4px; padding: 1px; width : 200px; } p#formlabel{ width: 100; } Thanks in advance!

    Read the article

  • Submit form from greybox window to main window

    - by LookUp Webmaster
    Hi everyone, I'm using greybox and trying the following thing: I want to make a form inside the pop-up so when the users submit's it, the request goes to the main window and the pop-up closes. I know the way to close the window is by using onclick="parent.parent.GB_hide()", but I really haven't been able to find a way to make the pop-up close and the data sent to the corresponding controller when the form is submitted. I'm using Zend FW. Thanks in advance, I really appreciate what this community does.

    Read the article

  • Refresh page in browser without resubmitting form

    - by Michael
    I'm an ASP.NET developer, and I usually find myself leaving the webpage that I'm working on open in my browser (Chrome is my browser of choice, but this question is relevant for any browser). My workflow typically goes like this: I write code, I rebuild my project in Visual Studio, and then I flip back to my browser with Alt-Tab and hit F5 to refresh the page. This is fine and dandy if a form hasn't been submitted since the page was opened. But if I've been clicking around on ASP.NET form controls, the page has posted form data a number of times, so hitting F5 causes the browser to (sensibly) pop up a confirmation message, e.g., "Confirm Form Resubmission: The page that you're looking for used information that you entered...". Sometimes I do want to resubmit the form, but more often than not, I just want to start over with the page (rather than resubmit form data). The way I usually get around this is to simply add some query string data to the URL so that the browser sees it as a fresh page request, e.g.: page.aspx becomes page.aspx? (or vice-versa). My question is: Is there a better way to quickly request a fresh version of a webpage (and not submit form data) in any of the major browsers? It seems like a no-brainer to me for web development, but maybe I'm missing something. What I'd love to see is something like the last item in this list: F5: refresh page Ctrl-F5: refresh page (and force cache refresh) Alt-F5: request fresh copy of the page without resubmitting the form

    Read the article

  • FireFox: strange behavior on submiting a form

    - by ilnur777
    Can anyone help with this strange form submiting in FireFox? So this form should be submitted after pushing "go to submit" button. There is an onclick event on the button that should submit form through JavaScript. In the form there is another button "test" without any onclick event. Following the script, the form should be submitted only after pushing the "go to submit" button, but it submits even pushing at "test" button. In the Internet Explorer it works well! But this stupid FireFox browser behaves different. Here is example of HTML page: <script> function func(){ document.form1.submit(); } </script> <form name="form1" method="post" action="somewhere.php"> <button>test</button> <input type="button" value="go to submit" onclick="func();"> </form> I have several buttons with <button onclick="...">option 1</button> options. I want to fix strange submiting a form in FireFox. Help please!

    Read the article

  • Using a checkbox input on a form to send the form data to different email addresses

    - by Cody Thomas
    I am building a form for a client. Here is the rundown. The form will be used as a request to have a staff member contact the person filling out the form. However, there is a list of staff members that will contact them depending on what the subject matter is. So, I want to create a checkbox input section on the form with each staff person's email address attached to a corresponding checkbox. So, the person filling out the form can check only the staff people necessary for their needs. Finally, when the person clicks "submit", the form will be emailed to only the staff members who were checked in the form. I'm at a loss of how to set this up.

    Read the article

  • PDF form submission

    - by Jeff
    I have a PDF form (made in Acrobat) that has button to submit via HTTP. What I want to do it have a PHP script that will take the PDF form and e-mail it to me via attachment. What I don't want: --PDF Submit via e-mail button. This requires webmail users to save the pdf and attach it, and is just too confusing for most users. I want one-click and done. --Submit via mailto:[email protected]. Does the same thing as above. If there's a pdf on the server, I know how to use PHP's mail() function to e-mail it to someone. What I don't know how to do is process the PDF once someone hits Submit within the PDF. Does that make sense? Thanks, Jeff

    Read the article

  • javascript removeChild(this) from input[type="submit"] onclick breaks future use of form.submit() un

    - by maximumduncan
    I have come across some strange behaviour, and I'm assuming a bug in firefox, when removing a input submit element from the DOM from within the click event. The following code reproduces the issue: <form name="test_form"> <input type="submit" value="remove me" onclick="this.parentNode.removeChild(this);" /> <input type="submit" value="submit normally" /> <input type="button" value="submit via js" onclick="document.test_form.submit();" /> </form> To reproduce: Click "remove me" Click "submit via js". Note that the form does not get submitted, this is the problem. Click "submit normally". Note that the form still gets submitted normally. It appears that, under Firefox, if you remove a submit button from within the click event it puts the form in an invalid state so that any future calls to form.submit() are simply ignored. But it is a javascript-specific issue as normal submit buttons within this form still function fine. To be honest, this is such a simple example of this issue that I was expecting the internet to be awash with other people exeriencing it, but so far searching has yealded nothing useful. Has anyone else experienced this and if so, did you get to the bottom of it? Many thanks

    Read the article

  • Trigger a form submit from within an AJAX callback using jQuery

    - by Yarin
    I want to perform an ajax request right before my form is submitted. I want to trigger the form submit from my ajax callback, but when I try to trigger the submit, I get the following error: Uncaught TypeError: Property 'submit' of object # is not a function Here is the entire code: <form method="post" action="http://www.google.com" > <input type="text" name="email" id="test" size="20" /> <input id="submit" name="submit" type="submit" value="Submit" /> </form> <script> function do_ajax() { var jqxhr = $.get("#", function(){ $('form').submit(); }); } $(function() { $('#submit').click(function (e) { e.preventDefault(); do_ajax(); }); }); </script> Stumped.

    Read the article

  • Problem Passing Variable to Submit Form in Firefox

    - by George
    In the following example, I have a link that sends a variable to a function which checks if the variable is true and, if so, submits a form on the page. This has been tested and works in IE, Safari, and Chrome, but not Firefox. Trying to figure out what's wrong in Firefox. The function which checks 'action' and then submits form 'login' : function submit(action) { if (action == "submit") { document.login.submit(); } } Link to pass action variable and submit form: <a href="javascript:submit('submit');">SEND FORM</a> When I remove the check and just have the following, it works fine in Firefox: function submit() { document.login.submit(); } <a href="javascript:submit();">SEND FORM</a>

    Read the article

  • Display a "Waiting Message" before the POST form send

    - by DomingoSL
    I have a upload file form, when you hit Submit it send the file to my server, but it takes a while, in the mean time i need to tell the user wait in order to get the file uploaded, because he can press Submit again because there is no menssage to prevent him. So, the user fill a few fields in the form, including a file. When he Send the form it sends the variables via POST to the same page: <form action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data" method="post"> A php script detect the page now have POST variables a do something. In the time between the send action and the page reload i need to display a mensage, how can i do that??? Thanks It will be nice if you now how to trigger that with colorbox. I know how to use it from a link but no from this POST action.

    Read the article

  • Display a "Waiting Menssage" before the POST form send

    - by DomingoSL
    I have a upload file form, when you hit Submit it send the file to my server, but it takes a while, in the mean time i need to tell the user wait in order to get the file uploaded, because he can press Submit again because there is no menssage to prevent him. So, the user fill a few fields in the form, including a file. When he Send the form it sends the variables via POST to the same page: <form action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data" method="post"> A php script detect the page now have POST variables a do something. In the time between the send action and the page reload i need to display a mensage, how can i do that??? Thanks It will be nice if you now how to trigger that with colorbox. I know how to use it from a link but no from this POST action.

    Read the article

  • Drupal 6 CCK node form redirect issue

    - by swdv
    Hi, I am having trouble with a multi-step node form for a CCK content type. I set $form_state['redirect'] to a thank you page path, but it does not get redirected upon successful submission. Here is the code following documentation on the Drupal 5.x to 6.x form API at http://drupal.org/node/144132 function rnf_form_alter(&$form, &$form_state, $form_id) { // ... $form['#submit'][] = 'rnf_regret_form_submit'; } function rnf_regret_form_submit($form, &$form_state) { $form_state['redirect'] = 'content/forget-thank-you'; } Any help would be appreciated. Thanks.

    Read the article

  • On Click alert if $.get returns a value, if not, submit the form

    - by bradenkeith
    If the submit button is clicked, prevent the default action and see if the field 'account_name' is already in use. If the $.get() returns a result, alert the user of the results. If it doesn't, submit form with id="add_account_form". My problem is that my else{} statement is not submitting the form. I get no response when submit is clicked & there is no value returned. Also I would like to change my code where it goes $("#add_account_form").submit(..) instead of .click() however, would that cause a problem when trying to submit the form later in the script? <script type="text/javascript"> $(document).ready( function () { $("#submit").click( function () { var account_name = $("input[name=account_name]").val(); $.get( "'.url::site("ajax/check_account_name").'", {account_name: account_name}, function(data){ if(data.length > 0){ confirm( "The account name you entered looks like the following:\n" +data+ "Press cancel if this account already exists or ok to create it." ); }else{ $("#add_account_form").submit(); } }); return false; }); }); </script> <p> <input type="submit" id="submit" class="submit small" name="submit" value="Submit" /> </p> </form> Thanks for your help. EDIT So anyone who runs into my problems, it's that $.get() is asynchronous, so it will always return false, or true depending on what submitForm is defined as. $.ajax() however, allows async to be set as false, which allows the function to finish before moving on. See what I mean: $(document).ready( function () { $("#add_account_form").submit( function () { var submitForm = true; var account_name = $("input[name=account_name]").val(); $.ajax({ type: "GET", async: false, url: "'.url::site("ajax/check_account_name").'", data: ({account_name: account_name}), success: function(data){ if(data.length > 0){ if(!confirm( "The account name you entered looks like the following:\n" +data+ "Press cancel if this account already exists or ok to create it." )){ submitForm = false; } } } }); if (submitForm == false ) { return false; } }); }); Thanks for your help @Dan

    Read the article

  • Mechanize Submit Form Error: Insufficient items with name '10427'

    - by maneh
    I'm trying to submit a form with Mechanize, I have tried different ways, but the problem persists. Can anyone help me on this. Thank you in advance! This is the form I want to submit: http://www.stpairways.st/ This is the code that I'm using: def stp_airways(url): import re import mechanize br = mechanize.Browser() br.open(url) print br.title() br.select_form(name = "frmbook") br.form['TypeTrajet'] = ["1"] br.form['id_depart'] = ["11967"] br.form['id_arrivee'] = ["10427"] br.form['txtDateAller'] = "5/7/2014" br.form['txtDateRetour'] = "12/7/2014" br.form['TypePassager1u1000r0b1'] = ["1"] br.form['TypePassager2u1000r0b1'] = ["0"] br.form['TypePassager3u1000r0b1'] = ["0"] br.form['CodeIsoDeviseClient'] = ["17,20,23,24,25,26,27,28,29,30,31,33,34,36,37,64,65,67,68,70,73,80,81,95,96,103,147,151,152,159,160,162,169,170TP1TPF"] br.form['CodeIsoDeviseClient'] = ["EUR"] # submit response1 = br.submit() print response1.read()

    Read the article

  • Best way to add an extra (nested) form in the middle of a tabbed form

    - by Scharrels
    I've got a web application, consisting mainly of a big form with information. The form is split into multiple tabs, to make it more readable for the user: <form> <div id="tabs"> <ul> <li><a href="#tab1">Tab1</a></li> <li><a href="#tab2">Tab2</a></li> </ul> <div id="tab1">A big table with a lot of input rows</div> <div id="tab2">A big table with a lot of input rows</div> </div> </form> The form is dynamically extended (extra rows are added to the tables). Every 10 seconds the form is serialized and synchronized with the server. I now want to add an interactive form on one of the tabs: when a user enters a name in a field, this information is sent to the server and an id associated with that name is returned. This id is used as an identifier for some dynamically added form fields. A quick sketchup of such a page would look like this: <form action="bigform.php"> <div id="tabs"> <ul> <li><a href="#tab1">Tab1</a></li> <li><a href="#tab2">Tab2</a></li> </ul> <div id="tab1">A big table with a lot of input rows</div> <div id="tab2"> <div class="associatedinfo"> <p>Information for Joe</p> <ul> <li><input name="associated[26][]" /></li> <li><input name="associated[26][]" /></li> </ul> </div> <div class="associatedinfo"> <p>Information for Jill</p> <ul> <li><input name="associated[12][]" /></li> <li><input name="associated[12][]" /></li> </ul> </div> <div id="newperson"> <form action="newform.php"> <p>Add another person:</p> <input name="extra" /><input type="submit" value="Add" /> </form> </div> </div> </div> </form> The above will not work: nested forms are not allowed in HTML. However, I really need to display the form on that tab: it's part of the functionality of that page. I also want the behaviour of a separate form: when the user hits return in the form field, the "Add" submit button is pressed and a submit action is triggered on the partial form. What is the best way to solve this problem?

    Read the article

  • Posting a textarea form with cURL

    - by Joey
    How would I go about posting a textarea form? <form method="post" action="/user/test/shoutbox/add" id="shoutPost" class="clearit"> <input name="formtoken" type="hidden" value="852f8fde54190fa5f9aa47172d492f829c1b"/> <input type="hidden" name="backto" value="/user/text/shoutbox" /> <textarea id="shoutmsg" name="message"></textarea> <input type="submit" name="submit" class="confirmButton" value="Post" id="sbPost" /> This should work right? curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_POST, 1); $postfields .= "&message=".$msg; $postfields .= "&submit=sbPost"; curl_setopt($ch, CURLOPT_POSTFIELDS,$postfields); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); $page = curl_exec($ch); but it's not posting for some reason...

    Read the article

  • how to submit a form without losing values already selected at the same form

    - by kawtousse
    Hi everyone, I am using jstl with dropdown lists. When i click submit button i success the specification but values int dropdownlists are reinitialized. So I want to submit form without loosing the values already selected in the form because I need to stay always at the same level in the form.To be more clear, user choose a value from ddl and click edit button to show other options and fill them at the same form without loosing what he has selected. I have tried to deal like that... <form action="myjsp.jsp" method="post"> <input type="Submit" value="Edit"> ...but it doesn't work. Thank you for your help.

    Read the article

  • JQUERY Ajax form, page refreshs & isn't supposed to in Safari, doesn't refresh in FF (works fine)

    - by nobosh
    I'm working on a AJAX form which lives in a JQUERY UI Dialog. It works great in FireFox, but for some reason, in safari it refreshes the page to: /? Please let me know if somethings wrong here? Thanks <div class="modal-container"> <form onsubmit="" action="" id="list-dialog-form" name="list-dialog-form"> <div id="modal-wrapper"> <br><br> <div class="modal-inputbar"> <span style="width: 100px;" class="inputbar-label"> <label>Edit List Name:</label> </span> <span style="width: 200px;" class="inputbar-input"> <input type="text" style="padding-right: 25px;" autocomplete="off" maxlength="140" id="listname" value="Untitled"> </span> </div> </div> <div id="modal-submit" class="modal-submit"> <span class="left delete-wrap"> <span onclick="deleteThisList(15);" class="delete"> </span> </span> <span style="line-height: 2em;" class="right"> <input type="hidden" value="15" id="tasklistID"> <input type="submit" value="update" id="dialogcloser"> <input type="button" onclick="$('#listeditdialog').dialog('close');" value="close" id="dialogcloser"> </span> </div> </form> </div> // Handles Updating the List Title $("#list-dialog-form").submit(function(){ // Ajax Spinner $("#listname").css("background", "url('/images/ajax-loader.gif') no-repeat scroll 98% center #FFF"); $.ajax({ url: '/ajax/listname-update/index.cfm', data: ({listname: $("#listname").val().trim(), tasklistID: $("#tasklistID").val()}), dataType: 'json', type: 'post', success: function( result ) { // Update the name in the top, project list $("#list-" + $("#tasklistID").val()).find('a').html($("#listname").val().trim()); $("#list-" + $("#tasklistID").val()).effect('highlight', {color: '#BDC1C7'}, 500); //Remove the Ajax Spinner $("#listname").css("background", "#FFF"); $("#listname").effect('highlight', {color: '#BDC1C7'}, 500); //close the dialog $('#listeditdialog').dialog('close'); } }); return false; });

    Read the article

  • jQuery: form input values turns up undefined

    - by Seerumi
    Having problem with this bit of code qith jQuery. it should pick the values from current form and then submit them, but when I try to get them with jQuery they always turn up undefined. I know the SQL results are fine since they show correctly in HTML table, so it must be my inferior javascript skills. New with jQuery and I'm at loss :( PHP/HTML: echo "<table>\n" while ($row = odbc_fetch_array($query)) { echo "<form class='catForm'>\n"; echo "<input type=hidden class='catID' name='catID' value='".$row['running_id']."'/>\n"; echo "<tr>\n"; echo "<td>".$row['running_id']."</td>\n"; echo "<td>".$row['site_id']."</td>\n"; echo "<td>".$row['main_category']."</td>\n"; echo "<td>".$row['map_name']."</td>\n"; echo "<td><input type=textfield class='bCatID' value='".$row['mapping_id']."' size=6/></td>\n"; echo "<td><input type=submit class='saveCat' value='Save'/></td>\n"; echo "<td><input type=submit class='killCat' value='Delete' /></td>\n"; echo "</tr>\n"; echo "</form>\n"; } echo "</table>"; jQuery: $(".catForm").submit(function () { var id = $(this).find('.catID').val(); var bCatID = $(this).find('.bCatID').val(); var dataString = 'id='+id+'&bCatID='+bCatID; $.ajax({ type: "POST", url: 'adminUI/bin/updateSCategories.php', dataType : 'json', data: dataString, success: function(data) { if (data.error == true) $('.failure').html("Error, save failed.").show().fadeOut(2000); if (data.error == false) $('.success').html("Saved succesfully").show().fadeOut(2000); }, error: function(XMLHttpRequest, textStatus, errorThrown) { $('.failure').html("Error, save failed.").show().fadeOut(2000); } }); return false; }); RESULT: id: undefined bCatID: undefined

    Read the article

  • Drupal FAPI: Add form elements on nodeform after validation

    - by ManuelBS
    Hi, I use Drupal 6.x. In my own module I alter each node form an add my own validation handler to it using $form['#validate'][] = 'my_own_validation_function'; Then I have the function function my_own_validation_function($form, &$form_state) { //if validation fails, i would like to rebuild the form to add additional form elements in hook_form_alter $form_state['rebuild'] = True; } My problem ist, that the validation functions does not respect my 'rebuild' = True becaus the form is never processed by hook_form_alter after validation. But I need hook_form_alter to add my additional form element. Is there a solution for my problem? Or are form_state changes in an own validation handler not respected even if I set &$form_state as a "pointer"? Thanks and cheers.

    Read the article

  • jQuery Validate on form submitted by JavaScript

    - by Daniel
    My form is submitted by a link using JavaScript, but I am also trying to validate the from justing jQuery validate. The validation doesn't work when submitted by the link, but it does if I change the link to a submit button. What am I doing wrong? My form: <form id="findmatch" method="post" action="search"> <div> <label class="formlabel">Match Type <input type="text" name="matchtype" id="matchtype" class="forminput" /> </label> <label class="formlabel">Location (postcode) <input type="text" name="location" id="location" class="forminput" /> </label> <label class="formlabel">Radius (miles) <input type="text" name="Radius" id="Radius" class="forminput" /> </label> <label class="formlabel">Keywords <input type="text" onblur="javascript:usePointFromPostcode(document.getElementById('location').value, showCompleteLatLng)" onchange="javascript:usePointFromPostcode(document.getElementById('location').value, showCompleteLatLng)" name="keywords" id="keywords" class="forminput" /> </label> <input id="lat" class="hidden" name="lat" type="text" value="" /> <input id="lon" class="hidden" name="lon" type="text" value="" /> <a href="javascript:document.getElementById('findmatch').submit();" onmouseover="javascript:usePointFromPostcode(document.getElementById('location').value, showCompleteLatLng)" class="submit">Search</a> </div> </form> And my jQuery is <script type="text/javascript"> $(document).ready(function () { $("#findmatch").validate({ rules: { location: "required", Radius: { required: true, digits: true }, keywords: "required" }, messages: { location: "Please enter your postcode", Radius: { required: "Please enter a radius", digits: "Please only enter numbers" }, keywords: "Please enter the keywords you wish to search for" } }); }); </script>

    Read the article

  • how to submit a form without loosing values already selected at the same form

    - by kawtousse
    Hi everyone, I am using jstl with dropdown lists. When i click submit button i success the specification but values int dropdownlists are reinitialized. So I want to submit form without loosing the values already selected in the form because I need to stay always at the same level in the form.To be more clear, user choose a value from ddl and click edit button to show other options and fill them at the same form without loosing what he has selected. I have tried to deal like that: but it doesn't work. think you for your help.

    Read the article

  • How to get form elements from one form to another form in drupal

    - by ugesh.gali
    I have two forms in drupal and the form values is stores in DB.The first form contanins some fields related to company by default like id conpany,name etc.The second form consists of attributes .If I add attributes to the second form the attribute field should be visible in first form. Ex If i add loaction or any other field it should visible in first form as location field.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >