Search Results

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

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

  • How to check if a form is submited via javascript?

    - by SteD
    I have this conventional submit button which submit a form like this: <form method="post" id="form_submit"> ... <input class="button" type="submit" name="Submit" value="Submit"> </form> And I check if the submit button is clicked using this: if(isset($_POST['Submit'])){ //update DB } Now I have a submit link using jquery: <a href="#" onclick="publish(); return false;">Submit</a> JS code: $("#form_submit").submit(); What is the alternative way here to be used here for if(isset($_POST['Submit'])) since I'm submitting the form using javascript?

    Read the article

  • Frequency to submit sitemap to search engines

    - by user577691
    i have went live with my site and being new to search engines and SEO fields not sure what should be the best way to handle sitemap.xml. I have created sitemap.xml and submitted it to Google using webmaster tool Yahoo/Bing using Bing Webmater Ask.com now since site will get updated every 2-3 times per week i am not sure what should be the best approach. Do i need to submit sitemap.xml again If i need to submit sitemap.xml again and again what should be the frequency to submit that Please suggest the best approach

    Read the article

  • jquery form validation, and submit-on-change

    - by Bee
    I want to make all my settings forms across my site confirm that changes are saved, kinda like facebook does if you make changes in a form and then try to navigate away without saving. So I'm disabling the submit button on the forms only enabling if the values change. I then prompt the user to hit save before they leave the page in the case that they do have changes pending. var form = $('form.edit'); if(form.length > 0) { var orig_str = form.serialize(); $(':submit',form).attr('disabled','disabled'); form.on('change keyup', function(){ if(form.serialize() == orig_str) { setConfirmUnload(false); $(':submit',form).attr('disabled','disabled'); } else { setConfirmUnload(true); $(':submit',form).removeAttr('disabled') } }); $('input[type=submit]').click(function(){ setConfirmUnload(false); }); } function setConfirmUnload(on) { window.onbeforeunload = (on) ? unloadMessage : null; } function unloadMessage() { return 'If you navigate away from this page without saving your changes, they will be lost.'; } One of these forms needs some additional validation which I do using jQuery.validate library. e.g. if i wanted to ensure the user can't double submit the form on accident by double clicking on submit or somesuch (the actual validation in question is for a credit-card form and not this simple): $('form').validate({ submitHandler: function(form) { $(':submit', form).attr('disabled','disabled'); form.submit(); } }); Unfortunately both bits are trying to bind to submit button and they're interfering with each other such that the submit button remains disabled no matter what I do and it is impossible to submit the form at all. Is there some way to chain the validations together or something? Or some other way to avoid re-writing the validation code to repeat the "did you change anything in the form" business?

    Read the article

  • Good places to submit a business profile?

    - by Rob
    We have a new graphic/web design site that we've created and we'd like to give it a boost in terms of back links. What are the obvious places to submit a website to achieve some good back links? And what would be the recurring work load (if any) that those back links would need? Are there any good industry specific websites we could submit a profile to? E.g Twitter, would need constant interaction and new content with back links to the website. UPDATE: I've always felt it's worth it but after several years trying to submit different websites, I've never successfully managed to get a site into DMOZ!!

    Read the article

  • Wicket : Can a Panel or Component react on a form submit without any boilerplate code?

    - by MRalwasser
    I am currently evaluating Wicket and I am trying to figure out how things work. I have a question regarding form submit and panels (or other components). Imagine a custom wicket panel which contains a text field, doing as-you-type validation using ajax. This panel is added to a form. How can the Panel react a form submit (let's say because javascript/ajax is unavailable)? I am currently only aware of one solution: calling a panel's method inside the Form onSubmit() method. But this seems not like a "reusable" approach here, because I have to add boilerplate code to every form's onSubmit() which contains the panel (and every developer which use the panel must know this). So here comes my question: Is there any way that a Panel/Component can "detect" a form submit in some way? Or is there any other solution beside this? Thank you.

    Read the article

  • Disable escape in Zend Form Element Submit

    - by Joaquín L. Robles
    I can't disable escaping in a Zend_Form_Element_Submit, so when the label has special characters it won't display it's value.. This is my actual Zend Form piece of code: $this->submit = new Zend_Form_Element_Submit('submit'); $this->submit->setLabel('Iniciar Sesión'); $this->submit->setIgnore(true); $this->addElement($this->submit); I've tried $this->submit->getDecorator('Label')->setOption('escape', false); but I obtain an "non-object" error (maybe submit isn't using the "Label" Decorator).. I've also tried as suggested $this->submit->setAttrib('escape', false); but no text will be shown either.. Any idea? Thanks

    Read the article

  • jQuery validation with submit handler

    - by James
    I setup the form validation using jQuery validation plug-in's validate method and I have a submit handler that modifies the input element's value (I use YUI editor and it needs saveHTML() call to copy the iframe's content to the textarea element.). When submitting the form, I want the validator to validate the form after executing my submit handler. But it doesn't execute my submit handler if it is registered after the validate call. For example, <form id="form1" action="/test"> <input type="text" name="txt1" id="txt1" /> <input type="submit" value="submit" /> $(document).ready(function() { $("#form1").submit(function() { $("#txt1").val("123456"); }); $("#form1").validate({ rules: { txt1: { maxlength: 5 } } }); }); The form is validated after my submit handler so submit is canceled. $(document).ready(function() { $("#form1").validate({ rules: { txt1: { maxlength: 5 } } }); $("#form1").submit(function() { $("#txt1").val("123456"); }); }); However if I change the order the form is validated before my submit handler.

    Read the article

  • Safari and Chrome back button changes hidden and submit values in forms

    - by OverClocked
    The following problem happens on both Safari and Chrome, so probably a WebKit issue. Page A: a page that requires you to login to see, contains a form that has a type=submit button, with name=submit, and value=a Page B: some other page Page C: ask user to login page, contains a form with a type=submit button, with name=submit and value=c User visits page A, then page B. Then idles and the user's login session times out. User hits back button to go back to page A. Browser redirects user to page C. On Safari and Chrome, when C is rendered, the form on page C has the type=submit button, name=submit, but value shows up as "a". If you reload while on page C, "c" appears as the value of the name=submit button. The same problem appears with type=hidden input fields; when user hits back button, their values are also changed to some other value from some other form. Also, this problem also shows up w/o the redirect, with just submit then back. In this case the previous page renders with incorrect values for hidden and submit CGI variables. So far the only fix I can come up with is use Javascript to reset the type=hidden and type=submit variable values, after page C loads, to make sure the values are correct. But that's not clean and universally applicable. Short of WebKit fixing this error, has anyone ran into a better workaround? Thanks.

    Read the article

  • How to find the submit button in a specific form in jQuery

    - by leifg
    I try to get jQuery object of a submit button in a specific form (there are several forms on the same page). I managed to get the form element itself. It looks something like this: var curForm = curElement.parents("form"); The current Element has the context HTMLInputElement. The several techniques I tried to get the according submit element of the form: var curSubmit = curForm.find("input[type='submit']"); var curSubmit = $(curForm).find("input[type='submit']"); var curSubmit = curForm.find(":submit"); var curSubmit = $(curForm).find(":submit"); var curSubmit = $(curSubmit, "input[type='submit']"); the result is always the same (and very strange). The result that I get is the same element as "curElement". So how can I get the right submit button?

    Read the article

  • Silicon Valley Code Camp 2012 - Submit Your Talks

    - by arungupta
    Silicon Valley Code Camp follows three rules: Given by/for the community Always free Never occur during work hours I've spoken there at 2011, 2010, 2009, 2008, and 2007 and have again submitted a talk this year as well, and will submit more! Its one of the best organically grown code camps with the attendance constantly growing over the past 6 years. Here is a chart that shows how the number of conferences attendees that registered and attended and the sessions delivered over past 6 years. If you wonder why there is such a big gap between "registered" and "attended" that's because this event is FREE! Yes, 100% free. If you are in and around Silicon Valley then you have no reason to not participate/speak at SVCC. You have the opportunity to meet all the local JUG leaders and the community "rockstars" :-) Date: Oct 6/7, 2012 Venue: Foothill College, 12345, El Monte Road, Los Altos Hills, CA Submit today or register!

    Read the article

  • JSF submit dataTable and openpopup window after? is this possible?

    - by raimun
    Is it possible to just submit a dataTable instead of the entire form and then open a popupwindow after the submit? My dataTable has textboxes in it and the popup window is actually dependent on the data/values found in these textboxes. Since the user can change the values of the textboxes, I am required to get the latest values from the dataTables before the popup is opened. the popup is opened through a button found in each row of the datatable. i am using JSF2. thanks.

    Read the article

  • Why doesn't my form post when I disable the submit button to prevent double clicking?

    - by John MacIntyre
    Like every other web developer on the planet, I have an issue with users double clicking the submit button on my forms. My understanding is that the conventional way to handle this issue, is to disable the button immediately after the first click, however when I do this, it doesn't post. I did do some research on this, god knows there's enough information, but other questions like Disable button on form submission, disabling the button appears to work. The original poster of Disable button after submit appears to have had the same problem as me, but there is no mention on how/if he resolved it. Here's some code on how to repeat it (tested in IE8 Beta2, but had same problem in IE7) My aspx code <%@ Page Language="C#" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <script language="javascript" type="text/javascript"> function btn_onClick() { var chk = document.getElementById("chk"); if(chk.checked) { var btn = document.getElementById("btn"); btn.disabled = true; } } </script> <body> <form id="form1" runat="server"> <asp:Literal ID="lit" Text="--:--:--" runat="server" /> <br /> <asp:Button ID="btn" Text="Submit" runat="server" /> <br /> <input type="checkbox" id="chk" />Disable button on first click </form> </body> </html> My cs code using System; public partial class _Default : System.Web.UI.Page { protected override void OnInit(EventArgs e) { base.OnInit(e); btn.Click += new EventHandler(btn_Click); btn.OnClientClick = "btn_onClick();"; } void btn_Click(object sender, EventArgs e) { lit.Text = DateTime.Now.ToString("HH:mm:ss"); } } Notice that when you click the button, a postback occurs, and the time is updated. But when you check the check box, the next time you click the button, the button is disabled (as expected), but never does the postback. WHAT THE HECK AM I MISSING HERE??? Thanks in advance.

    Read the article

  • Is posible to submit multipart/form-data without refresh page in jQuery?

    - by bugbug
    I want to upload picture from "my_form" in jQuery, I tried submit() function it alway redirect to SavePicture.jsp. Is posible to sumbit this form without refresh any page? This is my html code <form action="SavePicture.jsp" method="post" id="my_form" enctype="multipart/form-data"> <input name="file" type="file" id="file" size="35"> <input type="button" onClick="upload()" value="upload"></input> </form> And my script function upload{ jQuery("form#my_form").submit(); }

    Read the article

  • Checking form input data on submit with pure PHP [migrated]

    - by Leron
    I have some experience with PHP but I have never even try to do this wit pure PHP, but now a friend of mine asked me to help him with this task so I sat down and write some code. What I'm asking is for opinion if this is the right way to do this when you want to use only PHP and is there anything I can change to make the code better. Besides that I think the code is working at least with the few test I made with it. Here it is: <?php session_start(); // define variables and initialize with empty values $name = $address = $email = ""; $nameErr = $addrErr = $emailErr = ""; $_SESSION["name"] = $_SESSION["address"] = $_SESSION["email"] = ""; $_SESSION["first_page"] = false; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["name"])) { $nameErr = "Missing"; } else { $_SESSION["name"] = $_POST["name"]; $name = $_POST["name"]; } if (empty($_POST["address"])) { $addrErr = "Missing"; } else { $_SESSION["address"] = $_POST["address"]; $address = $_POST["address"]; } if (empty($_POST["email"])) { $emailErr = "Missing"; } else { $_SESSION["email"] = $_POST["email"]; $email = $_POST["email"]; } } if ($_SESSION["name"] != "" && $_SESSION["address"] != "" && $_SESSION["email"] != "") { $_SESSION["first_page"] = true; header('Location: http://localhost/formProcessing2.php'); //echo $_SESSION["name"]. " " .$_SESSION["address"]. " " .$_SESSION["email"]; } ?> <DCTYPE! html> <head> <style> .error { color: #FF0000; } </style> </head> <body> <form method="POST" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> Name <input type="text" name="name" value="<?php echo htmlspecialchars($name);?>"> <span class="error"><?php echo $nameErr;?></span> <br /> Address <input type="text" name="address" value="<?php echo htmlspecialchars($address);?>"> <span class="error"><?php echo $addrErr;?></span> <br /> Email <input type="text" name="email" value="<?php echo htmlspecialchars($email);?>"> <span class="error"><?php echo $emailErr;?></span> <br /> <input type="submit" name="submit" value="Submit"> </form> </body> </html>

    Read the article

  • How to prevent jQuery FancyBox from closing immediately after submit?

    - by Dimitri
    Hi! I'm loading an inline registration form in a FancyBox from jQuery. However after submitting the form, the box immediately closes while there is some feedback that I want to show the user in the FancyBox itself. This feedback is generated on the server side and is printed in the FancyBox. How can I make the box only closing when their is no feedback anymore? I was thinking about using ajax to just refresh the FancyBox itself and not the whole page after refreshing. But I just can't figure out how this ajax $.ajax({type, cache, url, data, success}); works... Also it seems like there's no reaction from the 'submit bind' in the javascript. I hope someone can help me with this problem. I paste my code below. If any questions, plz ask.. Thx in advance! This is the javascript: <script type="text/javascript"> $(document).ready(function() { $("#various1").fancybox({ 'transitionIn' : 'none', 'transitionOut' : 'none', 'scrolling' : 'no', 'titleShow' : false, 'onClosed' : function() { $("#registration_error").hide(); } }); }); $("#registration_form").bind("submit", function() { if ($("#registration_error").val() != "Registration succeeded!") { $("#registration_error").show(); $.fancybox.resize(); return false; } $.fancybox.showActivity(); $.ajax({ type : "POST", cache : false, url : "/data/login.php", data : $(this).serializeArray(), success : function(data) { $.fancybox(data); } }); return false; }); This is the inline form that I show in the FancyBox: <div style="display: none;"> <div id="registration" style="width:227px;height:250px;overflow:auto;padding:7px;"> <?php echo "<p id=\"registration_error\">".$feed."</p>"; ?> <form id="registration_form" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> <p> <label for="username">Username: </label> <input type="text" id="login_name" name="username" size="30" /> </p> <p> <label for="password">Password: </label> <input type="password" id="pass" name="pw" size="30" /> </p> <p> <label for="repeat_password">Repeat password: </label> <input type="password" id="rep_pass" name="rep_pw" size="30" /> </p> <p> <input type="submit" value="Register" name="register" id="reg" /> </p> <p> <em></em> </p> </form> </div> </div>

    Read the article

  • jQuery append breaks my HTML form (with submit button)

    - by JimFing
    I'm trying to create a form with a submit button via jQuery using append(). So the following: out.append('<form name="input" action="/createuser" method="get">'); out.append('Username: <input type="text" name="user" />'); out.append('<input type="submit" value="Submit" />'); out.append('</form>'); However, clicking on submit, nothing happens! However if I do the following: var s = '<form name="input" action="/createuser" method="get">' + 'Username: <input type="text" name="user" />' + '<input type="submit" value="Submit" />' + '</form>'; out.html(s); Then the submit button works fine! I'm happy to use the 2nd method, but would rather know what the problem is here. Thanks

    Read the article

  • jQuery.Form wont submit

    - by kim
    Im´trying to submit a form without refreshing the page, but I´m having a problem. When I click submit the page refreshes and anothing gets posted. Here is the code, what am I doing wrong? (I´m a newbie) jQuery 1.4.2 and the jQuery Form Plugin 2.43 is present. tnx $(document).ready(function() { var options = { target: '#output2', url: https://graph.facebook.com/<%=fbUid%>/feed, type: post, clearForm: true // clear all form fields after successful submit //dataType: null // 'xml', 'script', or 'json' (expected server response type) //resetForm: true // reset the form after successful submit // $.ajax options can be used here too, for example: //timeout: 3000 }; // bind to the form's submit event $('#fbPostStatus').submit(function() { // inside event callbacks 'this' is the DOM element so we first // wrap it in a jQuery object and then invoke ajaxSubmit $(this).ajaxSubmit(options); // !!! Important !!! // always return false to prevent standard browser submit and page navigation return false; }); });

    Read the article

  • What to use instead of if(isset($_POST['submit'])) for this.form.submit()?

    - by paracaudex
    I want to run a particular block of PHP if the user submits a form. It works if I use a submit button with name="submit" and: <?php if(isset($_POST['submit'])) { code to run } ?> I don't know anything about javascript, and I want the code to run if the user changes a dropdown menu. If I make the first line of the dropdown <select name="dropdownname" onchange="this.form.submit()"> the form appears (I haven't tested it) to submit if the user changes the dropdown choice. However, if I do this, the if(isset($_POST['submit'])) PHP code doesn't run. Is there a PHP if statement I can write that will respond to the form being submitted even though it's being submitted by a change in the dropdown and not a submit button?

    Read the article

  • 3 Easy Ways to Submit a Sitemap

    Submitting a sitemap is one of the effective SEO practices even if it is coded in HTML or XML. If you have a new website and you want it to be indexed immediately by popular search engines, create and submit a sitemap. Here are the 3 easy ways to do it.

    Read the article

  • Chrome: On pressing Enter on a Textbox of a <form> Submits page without calling onClick of submit bu

    - by X-eCuTeR
    Hi Folks, I have a scenario in which I have 2 Submit Buttons in a form for going back and forward. Both the buttons have different JavaScript associated with it. It is working great if we press these buttons to navigate. But when in Google Chrome, when someone press enter on any of the text box within the Form it does not calls the onClick of the button. Is there any work around for that. Thanks

    Read the article

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