Search Results

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

Page 9/211 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Multiple forms + HAML + jQuery + Javascript submit

    - by Jay Godse
    Hi. I have a HAML page that lists some links to delete "things" that looks like this %div %a.form_submit Delete Thing 1 %form{:href=>"#", :id=>'comment_1', :method=>'post', :action=>'/thing/delete'} %input{:type=>'hidden', :name=>'thingid', :value=>'1'} %input{:type=>'submit', style='display:none'} %div %a.form_submit Delete Thing 22 %form{:href=>"#", :id=>'comment_22', :method=>'post', :action=>'/thing/delete'} %input{:type=>'hidden', :name=>'thingid', :value=>'22'} %input{:type=>'submit', style='display:none'} The intention is to have a link "Delete XX" which will delete something specific. A page could have a number of these links, and each link is for a specific "thing". I also have a piece of (unobtrusive) jQuery javascript that adds a click handler to each form as follows: $('a.form_submit').click(function(event) { $('form').submit(); event.preventDefauilt(); }); This works when there is one form on a page. However, if I have more than one form on a page, how do I ensure that clicking "Delete Thing 1" will trigger a submit() event only on the form with id='comment_1'?

    Read the article

  • [Need help]: Issue with submit button and html file input control’s Click() method

    - by somesh
    Scenario: On click of a button, we dynamically create html file input (file upload) control on the page and call that file input controls Click() method. User then selects the file from the disk. There is a “Submit” button to upload the selected file. Problem: The problem is, when clicked on “Submit” button first time, the input value from the file input control is cleared. And the request does not go to the server. When clicked second time, the request goes to server with empty file input value. Why the first click on submit button does not send the request to server. And why it clears the file input control value? Note: The issue is observed only when we call Click() method programmatically. If we let user to click browse, then in that case, the "Submit" does not clear the input value and sends request to server on first click itself. Any help would be appreciated. Thanks in advance. By the way, server side code is in asp.net and client side in java script, testing on IE. -Somesh

    Read the article

  • Class is not applying to submit button

    - by Mayur
    Hi All, I m Trying to apply a class to following submit button Code: <input type="submit" value="Submit" name="commit"> css : .confirm-button-submit { width : 79px; font : bold 12px sans-serif;; color : #000; background : url("../images/confirm-btn.png") 0 -33px no-repeat; text-decoration : none; margin-top :0px; text-align:center; border:0px; cursor : pointer; height:170px; } .confirm-button a { display : block; width : 79px; padding : 8px 0px 12px 0px; font : bold 12px sans-serif;; color : #000; background : url("../images/confirm-btn.png") 0 -33px no-repeat; text-decoration : none; margin-top :0px; text-align:center; } .confirm-button a:hover { display : block; width : 79px; padding : 8px 0px 12px 0px; font : bold 12px sans-serif;; color : #fff; background : url("../images/confirm-btn.png") 0 0 no-repeat; text-decoration : none; margin-top :0px; text-align:center; } But its not working proper what to do Thanks

    Read the article

  • on click submit button move itsplace

    - by Mayur
    Hi All, I m Using submit button for my form its work fine in all browser except ie7 when an user click on it it moved please suggest me what to do .confirm-button-submit { width : 79px; font : bold 12px sans-serif;; color : #000; background : url("../images/confirm-btn.png") 0 -33px no-repeat; text-decoration : none; margin-top :0px; text-align:center; border:0px; cursor : pointer; height:32px; padding : 8px 0px 12px 0px; } .confirm-button-submit:hover { width : 79px; font : bold 12px sans-serif;; color : #fff; background : url("../images/confirm-btn.png") 0 0 no-repeat; text-decoration : none; margin-top :0px; text-align:center; border:0px; cursor : pointer; height:32px; padding : 8px 0px 12px 0px; } i used this css please tell me what to do code: <input type="button" value="Show" name="commit" onclick="range_validation(this)" class="confirm-button-submit"/>`

    Read the article

  • document.getElementById('form_name').submit() not working properly

    - by Leahn Novash
    Ok, I will try to give the most details I can. The site is not suposed to work with IE6. It would be nice if it worked with IE8 and Chrome, but that can be done later. The site is in PHP. The form where the submit is in another PHP file that is included in position on the index.php inside of a DIV tag. If I open the form solely, the submit works correcly, but when I try to submit on the index page, the Firefox error console says that document is undefined. The form code is echoed line by line via PHP. Save the text fields for username and password, the form code is the following: <form id="entrar" action="entrar.php" method="post" onsubmit="javascript:checkvalues();"> <a href="javascript:document.getElementById('entrar').submit();">ENTRAR</a> </form> What's the big deal? What am I missing here? I know it is something very silly but I can't figure it out.

    Read the article

  • serializeArray doesn't include submit-button value

    - by guzh
    Hi, I got two submit buttons in a form. One that deletes the post, and one to edit it. I want to display a fancybox with either the edit-form or a message saying that the user deleted the post. It's all decided by which button was pushed, with a "if(isset)"-sentence in edit.php. However I can't figure out how to get the value of the button within the serializeArray.. I tried with .click(function() instead, but that didn't send anything to the fancybox.. $("#form").bind("submit", function() { $.ajax({ type : "POST", cache : false, url : "edit.php", data : $(this).serializeArray(), success: function(data) { $.fancybox(data); } }); return false; }); The form looks like this: <form method='post' action='' id="form"> <input type='submit' value='Edit' name='edit' /> <input type='submit' value='Delete' name='delete' onClick="return slett('<?php echo $oppgave->name; ?>')"/> <input name='oppgaveID' type='hidden' value='<?php echo $oppgave->id; ?>' /> </form> I would really appreciate it if someone could help me! Thanks in advance!

    Read the article

  • Facebox window closes after submit

    - by Kim Andersen
    Hi all I have a question regarding Facebox. When I click a certain link on my page, the Facebox modal window opens just fine. But inside this modal window I'd like to have a form that users can submit. When the users click the submit-button, the whole page refreshes, and my Facebox-window is closed. This makes sense to me, but I'd like it to work differently. I want to give the user a confirmation, inside of the modal window, after they have submitted the form. So when a user clicks the submit-button, a confirmation should be showed inside og the modal-window. Anybody know if this is possible? I hope that you understand my question :) Best regards Kim Andersen

    Read the article

  • multiple polls with email submit function

    - by Chris Mousdale
    I want to add a 4 sets of polls that each have around 4 radio buttons each for answers - then i would like to add an 'enter your email address' field below these polls. Finally I would like the submit button after the email field to 'submit' the data from the polls and the email address entered - so only one submit button. Just to make things even better, I would like some form of validation, that will not pass the form unless all 4 polls have a radio button pressed and a valid email. All this is then to go into a MySQL database. I have the email validation bit nailed - so thats fine.. it's the multiple polls bit thats getting me - I cannot get it to work?! Do i have to effectively add 5 forms? Any help would be greatly appreciated.

    Read the article

  • Python mechanize - two buttons of type 'submit'

    - by directedition
    I have a mechanize script written in python that fills out a web form and is supposed to click on the 'create' button. But there's a problem, the form has two buttons. One for 'add attached file' and one for 'create'. Both are of type 'submit', and the attach button is the first one listed. So when I select the forum and do br.submit(), it clicks on the 'attach' button instead of 'create'. Extensive Googling has yielded nothing useful for selecting a specific button in a form. Does anyone know of any methods for skipping over the first 'submit' button and clicking the second?

    Read the article

  • ASP.NET MVC 2 form submit route issue

    - by Tomaszewski
    Hi, i'm having this issue, in ASP.NET MVC 2 where I'm adding a drop down list on the master page and filling it with data from an abstract master controller. When an option is selected an submit button clicked, it reroutes you to a new page. so lets say the page lives on http://domain.com/landingPage i'm on: http://domain.com/landingPage i select option and submit takes me to http://domain.com/landingPage/Projects/FramedPage i select again and now the post tries to go to: http://domain.com/landingPage/Projects/landingPage/Projects/FramedPage because of the action="" i have set on the form tag. Any ideas on how to go about this? MasterPage: <form method="get" action="landingPage/Projects/FramedPage"> <%= Html.DropDownList("navigationList")%> <input id="navSubmitBtn" class="btnBlue" type="submit" value="Take Me There" /> </form> Projects Controller public ActionResult FramedPage(string navigationList) { ViewData["navLink"] = navigationList; return View(); } The problem i am having is that if I am ON that page

    Read the article

  • CSS Padding Issue w/ submit button

    - by Thomas
    This is a dumb problem but I can't seem to set the padding on a submit button properly. No matter what I input for padding, the width and height of the button never changes. Here is the css: .green_submit { color: #fff; background-color: #94c909; border-right: 1px solid #6d9307; border-bottom: 1px solid #6d9307; border-left: none; border-top: none; padding: 25px; } And the HTML: <input type="submit" class='green_submit' value="Validate" /> Any obvious problems here? How can I manipulate the padding on a submit button?

    Read the article

  • TinyMCE clearing changes on form submit

    - by DCD
    I've added a toggle button to TinyMCE (using the jQuery plugin version) that looks like: $('a.mce_show').click(function(){ // toggle all textareas $('.wysiwyg').tinymce().show(); }); $('a.mce_hide').click(function(){ // toggle all textareas $('.wysiwyg').tinymce().hide(); }); The problem is if you hide the editor, make a change and click 'submit' it'll discard the change. If you hide the editor, make a change, show the editor then click submit it'll be fine. How do I get it to submit properly without having to re-show the editor?

    Read the article

  • jQuery Validation Plugin - Enable 'Eager' Validation only after and Invalid Submit

    - by Ryan Fitzer
    By default, if a user enters a value in a field, the 'eager' validation kicks in. Is there any way to disable 'eager' validation before submit and then enable it after an invalid submit has happened? I've used $.validator.setDefaults() to initially set the onkeyup and onfocusout properties to false. In the invalidHandler method I rerun the $.validator.setDefaults(), setting onkeyup and onfocusout properties to true. No luck with this approach. Basically, I only want the 'eager' validation to take place after the user tries to submit an invalid form. Thanks for any help.

    Read the article

  • Multiple Submit Buttons problem in Struts2

    - by umesh awasthi
    Hi All, Trying to work with multiple submit buttons within a single form in struts2 application but not able to work. here is the jsp code i am using <tr> <td class="button"><input type="submit" value="Import" name="destinationImport" class="button"></td> <td class="button"><input type="submit" value="Export" name="destinationExport" class="button"></td> </tr> here is the java part private boolean destinationImport; private boolean destinationExport; and there respective setter and getter but i am sure is that Struts2 type convertor is having problem converting the String value to boolean do any one have idea how to achieve this Thanks in advance

    Read the article

  • jQuery show submit button on input field click

    - by Pjack
    Hi, I'm trying to have a comment input field that will show the submit button on a dynamically created form when you click on the input field. Similar to how facebook comments work. When you click on the input field the submit button appears and when you click off it disappears. All the comment input id's are comment_1 etc and the submit button id's are submit_1 etc. I've tried this, jQuery("#[id^='comment_']").live('click',function(event){ if(jQuery("#[id^='comment_']").val() == ""){ jQuery("#[id^='submit_']").hide(); } else { jQuery("#[id^='submit_']").show(); } }); And that won't work for some reason. Any suggestion or how it can be accomplished would be great.

    Read the article

  • check if username exists on form submit

    - by Developer
    This is my code. .js $(document).ready(function() { $("#username").focusout(function() { $.ajax({ type:'post', url:site_url()+'/client/checkUserName', data:{'username':$("#username").val()}, dataType:'json', success:function(result){ if(result != 'false'){ $('#message').text('Username exists'); } } }); }); .html <form id='form1' method="post"> <input type="text" name="username" id="username"/> <span id="message" style="color:red"></span> <input type="submit" value="submit" id="regis" class="btn"/> </form> Its working fine on focusout. How to make the form to not submit if username exists? Suppose there is a hidden field in the form say <input type="text" hidden id="type" value="<?php echo $type;?>"> Then if value exists in the hidden field then the username neednot be checked if already exists or not.

    Read the article

  • Event firing sequence for a submit button.

    - by JSTyro
    Say a submit button has a click event handler as well (yes, it's wrong, but that's really the code I'm working on). And the click handler sets a value in a field of the form that's about to be submitted. So when the submit button is clicked: What will fire first, the form submit event or the click event? Will the value set in the form field by the click event submitted to the server? I think this depends on the answer to Q1. If the form is posted first, I'm guessing it won't. Note: I'm not looking for alternatives and advice. I know what the proper way of handling this will be. Just trying to understand the sequence of events and their implications.

    Read the article

  • Submit multiple forms as one

    - by Stephen Sarcsam Kamenar
    I have two forms on the page. To the user it looks like 1 form, and I actually wish it was one form. But the way I'm trying to reuse code and include things, I can't avoid two forms in the source code... trying to act as one. I don't want to do ajax submit, I want a normal post submit, my form handler has redirects in it. How can I submit both of these, and get values that make sense on the server side. something like $_POST['form1]['whatever'] $_POST['form2]['thing'] Maybe take all the inputs from form 2, rename all of them with a prefix, and append them to form 1? I can't find a non-messy way of doing this. I don't think I need code, just a plan. Least messy idea wins.

    Read the article

  • Does a form gets closed after form.submit()?

    - by user281180
    I have the following code: $.ajax({ type: "POST", url: '<%=Url.Action("test","pepole") %>', data: $("#PeopleForm").submit(), contentType: "application/json; charset=utf-8", dataType: "html", sucess: function() { }, error: function(request, status, error) { $("#NotSelectedList").html("Error: " & request.responseText); } }); The PeopleForm is displayed in a dialog. After the submit, the dialog gets closed. Is that normal? I don`t want the dialog to get closed after the submit. How can I do that?

    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

  • JQuery - Form Submission

    - by user70192
    Hello, I have a web page that has a DIV and an IFRAME. When a user clicks a button in my DIV, I need to submit the web form that is hosted in my IFRAME. Both pages are hosted on the same server in the same directory. My code that attempts to submit the web form looks like this: $("#myIFrame").contents().find("form").submit(); When this code is called, I receive an error in IE that says: "Internet Explorer cannot display the webpage" In FireFox when I execute the code, I receive an error that says: "The connection was reset" In FireFox when I look at the error console I see: "Error: Permission denied for http://localhost:2995 to get property HTMLDocument.nodeType from ." What am I doing wrong?

    Read the article

  • return false for parent javascript function

    - by jeerose
    $("#purchaser_contact").live('submit', function(){ $.ajax({ type: "POST", url: 'ajax/contactSearch.php', data: ({ fname: $("#fname").val(), lname: $("#lname").val(), city: $("#city").val(), state: $("#state").val() }), success: function(d) { var obj = JSON.parse( d ); if(obj.result != 0){ $("#contactSearch").remove(); $("#button-wrapper").before('<div id="contactSearch">' + obj.result + '</div>'); $("#contactSearch").slideToggle('slow'); //return false from submit!! }); }); I know there are other posts on this but I couldn't figure out how to apply them properly to my situation without making it messy. How do I return false on the submit event to prevent the form from submitting if I'm within the $.ajax and success functions? Thanks.

    Read the article

  • Make jQuery AJAX have a non-javascript (non-ajax) fallback?

    - by DrAgonmoray
    I've gotten a fair amount of work done on my latest project, but I've realized there's a bit of a problem: If you don't have a Javascript-enabled browser, you can't submit any forms because every form uses AJAX to submit it. My question to you all: How can I implement some sort of "fallback" so that if they don't have Javascript enabled, they can still submit the form. Currently I have a banner along the header that says "For the optimal (and by "optimal," we mean "actually working") experience, please enable Javascript in your browser." but that seems like less than the optimal solution. Thanks!

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >