Search Results

Search found 5274 results on 211 pages for 'submit'.

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

  • Partial Submit vs. Auto Submit

    - by Frank Nimphius
    Partial Submit ADF Faces adds the concept of partial form submit to JavaServer Faces 1.2 and beyond. A partial submit actually is a form submit that does not require a page refresh and only updates components in the view that are referenced from the command component PartialTriggers property. Another option for refreshing a component in response to a partial submit is call AdfContext.getCurrentInstance.addPartialTarget(component_instance_handle_goes_here)in a managed bean. If a form contains required fields that the user left empty invoking the partial submit, then errors are shown for each of the field as the full form gets submitted. Autosubmit An input component that has its autosubmit property set to true also performs a partial submit of the form. However, this time it doesn't submit the entire form but only the component that triggers the submit plus components referenced it in their PartialTriggers property. For example, consider a form that has three input fields inpA, inpB and inpC with autosubmit=true set on inpA and required=true set on inpB and inpC. use case 1: Running the view, entering data into inpA and then tabbing out of the field will submit the content for inpA but not for inpB and inpC. Further more, none of the required field settings on inpB and inpC causes an error. use case 2: You change the configuration of inpC and set its PartialTriggers property to point to the ID of component inpA. When rerunning the sample, entering a value into inpA and tabbing out of the field will now submit the inpA and inpC fields and thus show an error for the missing required value on inpC. Internally, using autosubmit=true on an input component sets the event root to just this field, which good to have in case of dependent field validation or behavior. The event root can extended to include other components by using the Partial Triggers property on these components to point to the input field that has autosubmit=true defined. PartialSubmit vs. AutoSubmit Partial submit set on a command component submits the whole form and leaves it to the developer to decide which UI component is refreshed in response. Client side required field validation (as well as the server side equivalent) is not disabled by executed in this scenario. Setting immediate=true on the command item to skip validation doesn't help as it would also skip the model update. Auto submit is a functionality on the input components and also performs a partial form submit. However, in addition an event root is defined that narrows the scope for the submitted data and thus the components that are validated on the request. To read more about this topic, see: http://docs.oracle.com/cd/E23943_01/web.1111/b31973/af_lifecycle.htm#CIAHCFJF

    Read the article

  • JQuery .submit function will not submit form in IE

    - by Sean
    I have a form that submits some values to JQuery code,which then which sends off an email with the values from the form.It works perfectly in Firefox, but does not work in IE6(surprise!) or IE7. Has anyone any suggestions why? greatly appreciated?I saw on some blogs that it may have something to do with the submit button in my form but nothing Ive tried seems to work. Here is the form html: <form id="myform1"> <input type="hidden" name="itempoints" id="itempoints" value="200"> </input> <input type="hidden" name="itemname" id="itemname" value="testaccount"> </input> <div class="username"> Nickname: <input name="nickname" type="text" id="nickname" /> </div> <div class="email"> Email: <input name="email" type="text" id="email" /> </div> <div class="submitit"> <input type="submit" value="Submit" class="submit" id="submit" /> </div> </form> and here is my JQuery: var $j = jQuery; $j("form[id^='myForm']").submit(function(event) { var nickname = this.nickname.value; var itempoints = this.itempoints.value; var itemname = this.itemname.value; event.preventDefault(); var email = this.email.value; var resp = $j.ajax({ type:'post', url:'/common/mail/application.aspx', async: true, data: 'email=' +email + '&nickname=' + nickname + '&itempoints=' + itempoints + '&itemname=' + itemname, success: function(data, textStatus, XMLHttpRequest) { alert("Your mail has been sent!"); window.closepopup(); } }).responseText; return false; });

    Read the article

  • image submit button passing value

    - by air
    I have one image submit button like this <input id="enter" name="enter" type="image" value="Login" src="images/btn_login.jpg"/> once i click on this image i got following values enter.x=39&enter.y=11 but i want to get enter=Login on submit how to get enter value as login on submit? Thanks

    Read the article

  • Respect regular onsubmit handlers from jQuery.submit

    - by orip
    I want a jQuery form submit handler to respect any previous submit handlers, including ones added with onsubmit. I'm trying to detect the previous handler's return value but can't seem to do it: <form><input type="submit" /></form> <script type="text/javascript"> $('form')[0].onsubmit = function() { return false; }; // called first $('form').submit(function(e) { console.log(e.result); // undefined console.log(e.isDefaultPrevented()); // false console.log(e.isPropagationStopped()); // false console.log(e.isImmediatePropagationStopped()); // false }); </script> Is there a way to do this?

    Read the article

  • CSS Hidden DIV Form Submit

    - by Michael
    Using CSS, when a link is clicked it brings up a hidden DIV that contains a form. The user will then enter information and then submit the form. I'd like the hidden DIV to remain visisble, and a 'success message' to be displayed after submission. Then the user will have the option of closing the DIV. I can't get it to work without reloading the page, which causes the DIV to become hidden again. Any ideas? <body> <a href="javascript:showDiv()" style="color: #fff;">Click Me</a> <!--POPUP--> <div id="hideshow" style="visibility:hidden;"> <div id="fade"></div> <div class="popup_block"> <div class="popup"> <a href="javascript:hideDiv()"> <img src="images/icon_close.png" class="cntrl" title="Close" /> </a> <h3>Remove Camper</h3> <form method="post" onsubmit="email.php"> <p><input name="Name" type="text" /></p> <p><input name="Submit" type="submit" value="submit" /></p> </form> <div id="status" style="display:none;">success</div> </div> </div> </div> <!--END POPUP--> <script language=javascript type='text/javascript'> function hideDiv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hideshow').style.visibility = 'hidden'; } else { if (document.layers) { // Netscape 4 document.hideshow.visibility = 'hidden'; } else { // IE 4 document.all.hideshow.style.visibility = 'hidden'; } } } function showDiv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hideshow').style.visibility = 'visible'; } else { if (document.layers) { // Netscape 4 document.hideshow.visibility = 'visible'; } else { // IE 4 document.all.hideshow.style.visibility = 'visible'; } } } </script> </body>

    Read the article

  • Greasemonkey Submit Form

    - by magixx
    I'm trying to autosubmit a form with greasemonkey however I'm not sure how to do it with this button. The button seems to have the following properties a class="blue-button" href="javascript:void(0)" onclick="Form.submit(this);" and the only form I see above is <form xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://www.blizzard.com/ns/store" action="/account/management/add-game.xml" autocomplete="off" method="post"> The page is here you can use "[email protected]" and "a1a1a1a1" as a login.

    Read the article

  • Disable button after submit

    - by Chris Philpotts
    I'm trying to disable a button when a user submits a payment form and the code to post the form is causing a double post in firefox. This problem does not occur when the code is removed, and does not occur in any browser other than firefox. Any idea how to prevent the double post here? System.Text.StringBuilder sb = new StringBuilder(); sb.Append("if (typeof(Page_ClientValidate) == 'function') { "); sb.Append("if (Page_ClientValidate() == false) { return false; }} "); sb.Append("this.value = 'Please wait...';"); sb.Append("this.disabled = true;"); sb.Append(Page.GetPostBackEventReference(btnSubmit )); sb.Append(";"); btnSubmit.Attributes.Add("onclick", sb.ToString()); it's the sb.Append(Page.GetPostBackEventReference(btnSubmit )) line that's causing the issue Thanks EDIT: Here's the c# of the button: <asp:Button ID="cmdSubmit" runat="server" Text="Submit" /> here's the html This code posts twice (and disables the submit button and verifies input): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="if (typeof(Page_ClientValidate) == 'function') { if (Page_ClientValidate() == false) { return false; }} this.value = 'Please wait...';this.disabled = true;document.getElementById('ctl00_MainContent_cmdBack').disabled = true;__doPostBack('ctl00$MainContent$cmdSubmit','');" id="ctl00_MainContent_cmdSubmit" /> This code posts twice (but doesn’t disable the submit button): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="__doPostBack('ctl00$MainContent$cmdSubmit','');" id="ctl00_MainContent_cmdSubmit" /> This code posts once (but doesn’t verify the user input and doesn’t disable the submit button): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" id="ctl00_MainContent_cmdSubmit" /> This code posts once (but doesn’t disable submit button): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MainContent$cmdSubmit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_MainContent_cmdSubmit" /> This code doesn’t post at all: <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="this.disabled = true;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MainContent$cmdSubmit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_MainContent_cmdSubmit" /> Obviously it’s the disabling of the submit button that’s posing the problem. Do you have any ideas how we can disable the submit to avoid multiple clicking?

    Read the article

  • JQuery: Toggle submit button according to if terms are agreed with or not

    - by Svish
    I have a checkbox with id terms and a submit button in my form with class registration. I would like the submit button to be disabled initially, and then to be toggled on and off whenever the user toggle on and off the terms checkbox. I would also like to have a confirmation dialog pop up when the submit button is clicked and that if it is confirmed the submit button will be disabled again (to prevent duplicate clicking). I have gotten the last part and the first part working (I think), but I can't figure out how to get the toggling working. This is what I have so far: $(document).ready(function() { // Disable submit button initially $('form.registration input[type=submit]').attr('disabled', 'disabled'); // Toggle submit button whenever the terms are accepted or rejected $('#terms').change(function() { if($('#terms:checked').val() !== null) $('input[type=submit]', this).attr('disabled', ''); else $('input[type=submit]', this).attr('disabled', 'disabled'); }); // Ask for confirmation on submit and disable submit button if ok $('form.registration').submit(function() { if(confirm('Have you looked over your registration? Is everything correct?')) { $('input[type=submit]', this).attr('disabled', 'disabled'); return true; } return false; }); }); Could someone help me make this work? I'm a total JQuery newb at the moment, so any simplifications and fixes are welcome as well.

    Read the article

  • How to submit a form on pressing enter key

    - by SAMIR BHOGAYTA
    function clickButton(e, buttonid) { var bt = document.getElementById(buttonid); if (typeof bt == 'object'){ if(navigator.appName.indexOf("Netscape")(-1)){ if (e.keyCode == 13){ bt.click(); return false; } } if (navigator.appName.indexOf("Microsoft Internet Explorer")(-1)) { if (event.keyCode == 13){ bt.click(); return false; } } } } //Call this function on last text box of a form with onKeyPress="clickButton(this)"

    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

  • 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

  • why doesn't hitting enter when a SELECT is focused submit the form?

    - by Marc
    Consider the following HTML: <form action=""> <input /> <select> <option>A</option> <option>B</option> </select> <input type="submit" /> </form> If the focus is on the input (text box) and I hit enter, the form submits. But, if the focus is on the select (dropdown box) and I hit enter, nothing happens. I know I could figure out some JavaScript to override this, but I want to know why hitting enter doesn't just work? Is there something I would break by capturing the enter with JavaScript (maybe some native keyboard accessibility of the dropdown)?

    Read the article

  • Javascript onunload form submit isn't submitting data

    - by Kevin
    I currently have form that checks if a user has unsubmitted changes when they leave the page with a function called through the onunload event. Here's the function: function saveOnExit() { var answer = confirm("You are about to leave the page. All unsaved work will be lost. Would you like to save now?"); if (answer) { document.main_form.submit(); } } And here's the form: <body onunload="saveOnExit()"> <form name="main_form" id="main_form" method="post" action="submit.php" onsubmit="saveScroll()"> <textarea name="comments"></textarea> <input type="submit" name="submit2" value="Submit!"/> </form> I'm not sure what I'm doing wrong here. The data gets submitted and saved in my database if I just press the submit button for the form. However, trying to submit the form through the onunload event doesn't result in anything being stored, from what I can tell. I've tried adding onclick alerts to the submitt button and onsubmit alerts to the form elements and I can verify that the submit button is being triggered and that the form does get submitted. However, nothing gets passed stored in the database. Any ideas as to what I'm doing wrong? Thanks.

    Read the article

  • Problem in form submit through javascript

    - by Durga Dutt
    I am submitting form via javascript by using 'document.FormName.submit()' . But this is giving me error of 'submit is not a function'. I m using IE8 <script typr="text/javascript"> function submitForm() { document.theForm.submit() } </script> <body> <form name="theForm" method="post"> <input type="text" name= "name"> <input type="button" name="submit" value="submit" onclick="submitForm()"> </form> </body> Please help me ?

    Read the article

  • Auto submit form on clicking specific dropdown - jquery

    - by blasteralfred
    Hi, I have a form like below <form name="testform" id="testform" action="test.php" method="get"> <input name="field1" id="field1" type="text" value=""> <input name="field2" id="field2" type="text" value=""> <select name="dropdown" id="dropdown"> <option value="option1" selected="selected">option1</option> <option value="option2">option2</option> <option value="option3">option3</option> </select> <input type="submit" name="Submit" value="Submit" id="Submit"> </form> I want to submit the form automatically when someone click (or select) an option from the dropdown. How can I make this possible using jquery or something else or simple js. Thanks in advance... :) blasteralfred

    Read the article

  • Multiple Forms with Different Actions using Submit Buttons

    - by Adam Coulson
    I have Two forms in my index.php and am trying to get them to submit and POST their data seperatly Form 1 echo '<form action="process.php?type=news" method="post">'; echo '<table cellspacing="0"><tr><th>'; echo 'Add News to News Feed'; echo '</th></tr><tr><td>'; echo 'Title:<br /><input name="newstitle" type="text" id="add" style="height:16px;width:525px;" size="80" maxlength="186" /><br />'; echo 'Main Body Text:<br /><textarea name="newsfeed" id="add" style="width:525px;height:78px;" maxlength="2000" ></textarea>'; echo '<input style="float:right;margin-top:5px;" id="button" type="submit" value="Submit" />'; echo '</td></tr></table></from>'; And Form 2 echo '<form action="process.php?type=suggest" method="post">'; echo '<table cellspacing="0"><tr><th>'; echo 'Suggest Additions to the Intranet'; echo '</th></tr><tr><td>'; echo '<textarea name="suggest" id="add" style="width:330px;height:60px;" maxlength="800" ></textarea>'; echo '<input style="float:right;margin-top:5px;" id="button" type="submit" value="Submit" />'; echo '</td></tr></table></from>'; I want these both to post and do the action after pressing the submit button, but currently the second form submit to the first forms action How can i fix this??? EDIT: Also i am using .PHP for both the index and process page then using it to echo the forms onto the page Also here is the process.php data $type=$_REQUEST['type']; $suggest=$_POST['suggest']; $newstitle=$_POST['newstitle']; $news=mysql_real_escape_string($_POST['newsfeed']); if ($type == "news") { $sql=mysql_query("SELECT * FROM newsfeed WHERE title = ('$newstitle')"); $number_of_rows = mysql_num_rows($sql); if ($number_of_rows > 0) { echo 'This Title is Already Taken'; } else { $sql="INSERT INTO newsfeed (title, news) VALUES ('$newstitle','$news')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } header('Location: index.php'); exit; } } elseif ($type == "suggest") { $sql="INSERT INTO suggestions VALUES ('$suggest')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } header('Location: index.php'); exit; }

    Read the article

  • ajax->form submit onchage event on selectTag keeping submit button on form without click

    - by prashant
    Hi, I am using cakephp 1.1. for my project.I used ajax-form for form creation.In one form, form submitted using onchange event of selectTag taking submit button and giving submit.click for that button.But it peroperly not redirect to view file gives error "cake/libs/model/datasources/dbo_source.php" and submit that form,but I am not getting to which view it is submitting(submittied form to itself).

    Read the article

  • jQuery partial page refresh after form submit

    - by heeboir
    When using jQuery to submit a form is it possible to place the resulting page (after the submit) inside another HTML element? I'll try to make this clearer. Up to now I've been using Callback methods that among others do a document.forms['form'].submit(); whenever a form has been updated with new information and needs to be refreshed. However, this results in a full page refresh. I'm implementing Partial Page Refresh using jQuery and thought of using something like var newContent = jQuery('#form').submit(); jQuery('#div').load(newContent); However, that does not seem to work as the page is still fully refreshed. The content is correct, however the behaviour seems to be exactly the same as before - so I'm not really sure if what I want is actually possible with jQuery. Any hints and pointers would be helpful. Thanks.

    Read the article

  • Submit Form Equivalent To WML

    - by Nathan Campos
    I'm playing a little bit with WML with PHP, then I want to know what is the equivalent of this on WML: <form action="upload_file.php" method="post"enctype="multipart/form-data"> <label for="file">File:</label><br /> <input type="file" name="file" id="file" /><br /> <input type="submit" name="submit" value="Submit" /> </form>

    Read the article

  • HTML form with multiple submit options

    - by phimuemue
    Hi, I'm trying to create a small web app that is used to remove items from a MySQL table. It just shows the items in a HTML table and for each item a button [delete]: item_1 [delete] item_2 [delete] ... item_N [delete] To achieve this, I dynamically generate the table via PHP into a HTML form. This form has then obviously N [delete]-buttons. The form should use the POST-method for transfering data. For the deletion I wanted to submit the ID (primary key in the MySQL table) of the corresponding item to the executing php skript. So I introduced hidden fields (all these fields have the name='ID' that store the ID of the corresponding item. However, when pressing an arbitrary [delete], it seems to submit always just the last ID (i.e. the value of the last ID hidden field). Is there any way to submit just the ID field of the corresponding item without using multiple forms? Or is it possible to submit data from multiple forms with just one submit-button? Or should I even choose any completly different way? The point why I want to do it in just one single form is that there are some "global" parameters that shall not be placed next to each item, but just once for the whole table.

    Read the article

  • Attach jQuery dialog to Submit button in ASP.NET-MVC

    - by RememberME
    I have a submit button which has been working to submit my form in ASP.NET-MVC. I would like to attach a jQuery dialog to the button click. If the user exits out of the dialog, then I would like to exit from the submit as well. I have dialogs hooked to other buttons, but not submits. How can I do this?

    Read the article

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