Search Results

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

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

  • 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

  • JavaScript To Clear Form Field On Submit Before Form Submission To Perl Script

    - by Russell C.
    We have a very long form that has a number of fields and 2 different submit buttons. When a user clicks the 1st submit button ("Photo Search") the form should POST and our script will do a search for matching photos based on what the user entered in the text input ("photo_search_text") next to the 1st submit button and reload the entire form with matching photos added to the form. Upon clicking the 2nd submit button ("Save Changes") at the end of the form, it should POST and our script should update the database with the information the user entered in the form. Unfortunately the layout of the form makes it impossible to separate it into 2 separate forms. I checked the entire form POST and unfortunately the submitted fields are identical to the perl script processing the form submission no matter which submit button is clicked so the perl script can't differentiate which action to perform based on which submit button is pushed. The only thing I can think of is to update the onclick action of the 2nd submit button so it clears the "photo_search_text" field before the form is submitted and then only perform a photo search if that fields has a value. Based on all this, my question is what does the JavaScript look that could clear out the "photo_search_text" field when someone clicks on the 2nd submit button? Here is what I've tried so far none of which has worked successfully: <input type="submit" name="submit" onclick="document.update-form.photo_search_text.value='';" value="Save Changes"> <input type="submit" name="submit" onsubmit="document.update-form.photo_search_text.value='';" value="Save Changes"> <input type="submit" name="submit" onclick="document.getElementById('photo_search_text')='';" value="Save Changes"> We also use JQuery on the site so if there is a way to do this with jQuery instead of plain JavaScript feel free to provide example code for that instead. Lastly, if there is another way to handle this that I'm not thinking of any and all suggestions would be welcome. Thanks in advance for your help!

    Read the article

  • how to list out the submited data in same page where form submitted?

    - by OM The Eternity
    I have a form with 3 text values and one image.. I want to save these values such that i can display these records in the list below.. how can i do that... I am using osCommerce For example: <form method="post" id="fm-form" action ="" enctype="multipart/form-data"> <label>Name:</label> <input type="text" id="fm-name" name="fm-name" value="" /> <label>Email:</label> <input type="text" id="fm-email" name="fm-email" value="" /> <label>Birthdate:</label> <input type="text" id="fm-birthdate" name="fm-birthdate" value="" /> <input type="file" id="fm-image" name="fm-image"/> <input type="submit" id="fm-submit" value="Save it"> </form> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr > <td align="center" class="productListing-heading">Product(s)</td> <td align="center" class="productListing-heading">Edit</td> <td align="center" class="productListing-heading">Delete</td> </tr> <?php for($i=0;$i<$count_image;$i++){?> <tr> <td align="left" class="productListing-data1"> <?php echo tep_image(DIR_WS_IMAGES . $file_realname, $save_image[$i], '110', '110');?> </td> <td align="center" class="productListing-data1">Edit</td> <td align="center" class="productListing-data1">Delete</td> </tr> <tr><td>&nbsp;</td></tr> <?php }?> </table> In the above format as the form is submitted the image has to be stored in a count_image array variable... and the on its count, the list below the form is displayed.. but i cannot get it worked.. could u pls help in doing this...

    Read the article

  • Form graphics not set when form loads

    - by Jimmy
    My form has a group box which contains two overlapping rectangles. The form's other controls are two sets of four numeric up down controls to set the rectangles' colors. (nudF1,2,3 and 4 set the rectangle that's in front, and nudB1,2,3 and 4 set the rectangle that's behind.) Everything works fine, except that the rectangles do not display the colors set in the numeric up downs when the form first loads. The numeric up down controls' ChangeValue events all call the ShowColors() method. The form's Load event calls the csColorsForm_Load() method. Any suggestions? namespace csColors { public partial class csColorsForm : Form { public csColorsForm() { InitializeComponent(); } private void csColorsForm_Load(object sender, EventArgs e) { this.BackColor = System.Drawing.Color.DarkBlue; SetColors(sender, e); } private void SetColors(object sender, EventArgs e) { Control control = (Control)sender; String ctrlName = control.Name; Graphics objGraphics; Rectangle rect1, rect2; int colorBack, colorFore; objGraphics = this.grpColor.CreateGraphics(); // If calling control is not a forecolor control, paint backcolor rectangle if (ctrlName.Substring(0,4)!="nudF") { colorBack = int.Parse(SetColorsB("nudB"), NumberStyles.HexNumber); SolidBrush BrushB = new SolidBrush(Color.FromArgb(colorBack)); rect1 = new Rectangle(this.grpColor.Left, this.grpColor.Top, this.grpColor.Width, this.grpColor.Height); objGraphics.FillRectangle(BrushB, rect1); } // Always paint forecolor rectangle colorFore = int.Parse(SetColorsB("nudF"), NumberStyles.HexNumber); SolidBrush BrushF = new SolidBrush(Color.FromArgb(colorFore)); rect2 = new Rectangle(this.grpColor.Left, this.grpColor.Top, this.grpColor.Width, this.grpColor.Height); objGraphics.FillRectangle(BrushF, rect2); objGraphics.Dispose(); } private string SetColorsB(string nam) { string txt=""; for (int n = 1; n <= 4; ++n) { var ud = Controls[nam + n] as NumericUpDown; int hex = (int)ud.Value; txt += hex.ToString("X2"); } return txt; } private void btnClose_Click(object sender, EventArgs e) { this.Close(); } } }

    Read the article

  • Problem retrieving values from Zend_Form_SubForms - no values returned

    - by anu iyer
    I have a Zend_Form that has 4 or more subforms. /** Code Snippet **/ $bigForm = new Zend_Form(); $littleForm1 = new Form_LittleForm1(); $littleForm1->setMethod('post'); $littleForm2 = new Form_LittleForm2(); $littleForm2->setMethod('post'); $bigForm->addSubForm($littleForm1,'littleForm1',0); $bigForm->addSubForm($littleForm2,'littleForm2',0); On clicking the 'submit' button, I'm trying to print out the values entered into the forms, like so: /** Code snippet, currently not validating, just printing **/ if($this-_request-getPost()){ $formData = array(); foreach($bigForm->getSubForms() as $subForm){ $formData = array_merge($formData, $subForm->getValues()); } /* Testing */ echo "<pre>"; print_r($formData); echo "</pre>"; } The end result is that - all the elements in the form do get printed, but the values entered before posting the form don't get printed. Any thoughts are appreciated...I have run around circles working on this! Thanks in advance!

    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

  • Three Checkboxes, One must be selected to enable submit button, needs Jquery?

    - by Jamie
    I have between 1-three checkboxes and by default they are all disabled. In order for the submit button to be active ove checkbox minumum must be selected. Can someone help me with a jquery snippet to achieve this? My markup looks like this and the site used jquery 1.42. Please and thankyou! <form action="/cart/add" method="post" id="pform"> <h3 class="goudy">Make your selection:</h3> <ul id="variants"> <li> <input type="checkbox" name="id[]" value="39601622" id="radio_39601622" style="vertical-align: middle;" class="required" /> <label for="radio_39601622[]">$38.00 - Original Antique Photo</label> </li> <li> <input type="checkbox" name="id[]" value="39601632" id="radio_39601632" style="vertical-align: middle;" class="required" /> <label for="radio_39601632[]">$8.99 - SCAN</label> </li> <li> <input type="checkbox" name="id" value="39777962" id="radio_39777962" style="vertical-align: middle;" class="required" /> <label for="radio_39777962">$2.99 - Rigid Sleeve</label> </li> </ul> <div class="buttons clearfix"> <input type="image" src="../images/add-to-cart.png" name="add" value="Add to Cart" id="add" class="send-to-cart" /> </div> </form>

    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

  • adding Form Validation Javacript of jquery???

    - by user634599
    How can I add inline Validation to make sure a choice of radio input must be selected <script type="text/javascript"> function choosePage() { if(document.getElementById('weightloss').form1_option1.checked) { window.location.replace( "http://google.com/" ); } if(document.getElementById('weightloss').form1_option2.checked) { window.location.replace( "http://yahoo.com/" ); } } </script> <form id="weightloss"> <input type="radio" id="form1_option1" name="weight-loss" value="5_day" class="plan"> <label for="form1_option1"> 5 Day - All Inclusive Price</label><br> <input type="radio" id="form1_option2" name="weight-loss" value="7_day"> <label for="form1_option2"> 7 Day - All Inclusive Price</label><br> <input type="button" value="Place Order" alt="Submit button" class="orange_btn" onclick="choosePage()"> </form>

    Read the article

  • Javascript form validation - multiple form fields larger than 0

    - by calebface
    function negativeValues(){ var myTextField = document.getElementById('digit'); if(myTextField.value < 0) { alert("Unable to submit as one field has a negative value"); return false; } } Above is a Javascript piece of code where every time a field id 'digit' has a value that's less than 0, than an alert box appears either onsubmit or onclick in the submit button. There are about 50 fields in the form that should be considered 'digit' fields where they shouldn't be anything less than 0. What should I change with this Javascript to ensure that all 'digit' like fields have this alert box pop up? I cannot use jquery/mootools for validation - it has to be flat Javascript. Thanks.

    Read the article

  • Enable submit button javascript ( asp page )

    - by Filipe Costa
    Good morning. By default, and i don't know why, when the page ends the rendering, i get the submit button disabled. <input type="submit" class="buttonColor" disabled="disabled" id="MyMatrix_ctl10_Form_btnSubmit" value="Enviar" name="MyMatrix$ctl10$Form$btnSubmit"> I need some way to enable it, or else i can't submit the form. How can i do it? Thanks.

    Read the article

  • Using input type="submit" to change content

    - by Conti
    Okay, I'm pretty sure I'm missing something very obvious here, but I just couldn't find a proper solution so far. What I'm trying to do is simple: Have a user write something into a form, have him submit the form, and write that input into a textarea on the same page. This is my code: <html><head></head> <body> <form name='registration'> <label for="input">Input:</label> <input type="text" id="input"/> <input type="submit" id="submit" value="Submit" onclick="execute()"/> </form> <div id="results"> <span>Result</span> <span><textarea cols="30" rows="5" id="resulttext" readonly="readonly"></textarea> </span> </div> <script> function execute() { var result = document.getElementById("input").value document.getElementById("resulttext").value=result; } </script> </body> </html> Now what happens if I enter something into the form is that the textarea briefly shows my input before reverting back to showing nothing. My guess is that the textarea field is only changed for the duration of the execute() function. When I change input type="submit" to a <button> everything works as intended, but I'm pretty sure I'm not supposed to do that.

    Read the article

  • saving value selected in a list when submit button is cliked

    - by kawtousse
    Hi everyone, In my JSP I have a dropdownlist and a submit button when clicking the submit button I loose the value already selected in my list. I am using the jstl because i need to construct other table corresponding the value selected in my list.For that I must call a submit button but the problem; it reset the value selected I want to know if there is a way to save the value selected in my list even I click a submit button. I work with JSP and eclipse environment. Think you for your help.

    Read the article

  • onclick form submit, open jQuery loading image until form submit complete

    - by Jackson
    Hi Team, Can you offer a bit of advice. I am using a hosted SAAS CMS solution that enables you to create basing apps with a web apps system. I have created a form for members to submit a bunch of images and content to their own area. Everything is working great except if the images being submitted via the form are large, it takes ages for the form to submit and go to the thank you page. I am already using jQuery UI to split the form in to 5 steps and using the jQuery facebox plugin for instructional popups. My question is, what would be the best way to display a loading gif (in facebox or in another suggested overlay) while the form is being submitted? Thanks for your help! Jack

    Read the article

  • Submit WordPress form password programmatically

    - by songdogtech
    How can I let a user access a WordPress protected page with a URL that will submit the password in the form below? I want to be able to let a user get to a password protected WordPress page without needing to type the password, so when they go to the page, the password is submitted by a POST URL on page load. This not intended to be secure in any respect; I'll need to hardcode the password in the URL and the PHP. It's just for simplicity for the user, and once they're in, the cookie will let them in for 10 more days. I will select the particular user with separate PHP function that determines their IP or WordPress login status. I used Wireshark to find the POST string: post_password=mypassword&Submit=Submit but using this URL mydomain.com/wp-pass.php?post_password=mypassword&Submit=Submit gives me a blank page. This is the form: <form action="http://mydomain.com/wp-pass.php" method="post"> Password: <input name="post_password" type="password" size="20" /> <input type="submit" name="Submit" value="Submit" /></form> This is wp-pass.php: <?php require( dirname(__FILE__) . '/wp-load.php'); if ( get_magic_quotes_gpc() ) $_POST['post_password'] = stripslashes($_POST['post_password']); setcookie('wp-postpass_' . COOKIEHASH, $_POST['post_password'], time() + 864000, COOKIEPATH); wp_safe_redirect(wp_get_referer()); ?> What am I doing wrong? Or is there a better way to let a user into a password protected page automatically?

    Read the article

  • Submit WordPress form programmatically

    - by songdogtech
    How can I let a user access a WordPress protected page with a URL that will submit the password in the form below? I want to be able to let a user get to a password protected WordPress page without needing to type the password, so when they go to the page, the password is submitted by a POST URL on page load. This not intended to be secure in any respect; I'll need to hardcode the password in the URL and the PHP. It's just for simplicity for the user, and once they're in, the cookie will let them in for 10 more days. I will select the particular user with separate PHP function that determines their IP or WordPress login status. I used Wireshark to find the POST string: post_password=mypassword&Submit=Submit but using this URL mydomain.com/wp-pass.php?post_password=mypassword&Submit=Submit gives me a blank page. This is the form: <form action="http://mydomain.com/wp-pass.php" method="post"> Password: <input name="post_password" type="password" size="20" /> <input type="submit" name="Submit" value="Submit" /></form> This is wp-pass.php: <?php require( dirname(__FILE__) . '/wp-load.php'); if ( get_magic_quotes_gpc() ) $_POST['post_password'] = stripslashes($_POST['post_password']); setcookie('wp-postpass_' . COOKIEHASH, $_POST['post_password'], time() + 864000, COOKIEPATH); wp_safe_redirect(wp_get_referer()); ?> What am I doing wrong? Or is there a better way to let a user into a password protected page automatically?

    Read the article

  • Cannot clear the form after Submit using the Validation plugin in jQuery

    - by novellino
    Hello, I an quite new to jQuery and I have a problem while trying to create a form. I am using the Validation plugin for validate the email (one the form's field). When I click the Submit button I want to call my own function because I want to save the data in an XML file. This is my button: (as I understood the plugin uses "submit" for understand the button) <input type="submit" name="submit" class="submit" id="submit_btn" value="Send"/> and here is the script for the validation: <script type="text/javascript"> $(document).ready(function() { //this is my form $("#contactForm").validate(); /*save the valid data in the xml*/ $(".submit").click(function() { var email = $("input#email").val(); var subject = $("input#subject").val(); var message = $("textarea#message").val(); if (email == "" || !$("#contactForm").valid()) { return false; } var dataString = 'email='+ email + '&subject=' + subject + '&message=' + message; //alert("DATA: " +dataString); $.ajax({ type: "POST", url: "SaveData.jsp", data: dataString, success: function(data){} }); return false; }); }); </script> In general it works ok but I have two basic problems. When I click the button in the beginning having all the form empty, I get no message for the field required. Also when the data are valid and I am doing the submit, the form does not become clear after the submit. If I deleted this script code, these actions are working properly but I can not save the data! Does anyone know what is wrong? Thanks a lot!

    Read the article

  • how find out the form is submit in JSP?

    - by user261002
    I am trying to create a an online exam with JSP. I want to get the questions one by one and show them on the screen, and create a "Next" button then user is able to to see the next question, but the problem is that I dont know how to find out that the user has clicked on the "Next" button, I know how to do it in PHP : if($_SERVER['REQUEST_METHOD']=='GET') if($_GET['action']=='Next') but I dont know how to do it in JSP. Please help me this is piece of my code: String result = ""; if (database.DatabaseManager.getInstance().connectionOK()) { database.SQLSelectStatement sqlselect = new database.SQLSelectStatement("question", "question", "0"); ResultSet _userExist = sqlselect.executeWithNoCondition(); ResultSetMetaData rsm = _userExist.getMetaData(); result+="<form method='post'>"; result += "<table border=2>"; for (int i = 0; i < rsm.getColumnCount(); i++) { result += "<th>" + rsm.getColumnName(i + 1) + "</th>"; } if (_userExist.next()) { result += "<tr>"; result += "<td>" + _userExist.getInt(1) + "</td>"; result += "<td>" + _userExist.getString(2) + "</td>"; result += "</tr>"; result += "<tr>"; result += "<tr> <td colspan='2'>asdas</td></tr>"; result += "</tr>"; } result += "</table>"; result+="<input type='submit' value='next' name='next'/></form>"; }

    Read the article

  • My form submit button is not showing correctly

    - by JackR
    I have created an form that submits the contents to email. I have used the exact same coding in many other websites, but for my new website http://www.peterevansfuneraldirectors.co.uk/contact-us.html the submit button is just a grey square with text, rather than the usual button. Also the hand doesn't come up on hover. My form code is... <form action="php/FormToEmail.php" method="post" name="ContactForm" id="ContactForm" onsubmit="MM_validateForm('name','','R','email','','RisEmail','message subject','','R','message','','R');return document.MM_returnValue" > <div class="form-text"> <b>Name<span class="purple">*</span></b><br /> <input name="name" type="text" id="name" size="35" style="height:23px; background-color:#FFF; color:#000; border: 1px solid #CCC;" /> </div><br /> <div class="form-text"> <b>Email<span class="purple">*</span></b><br /> <input name="email" type="text" id="email" size="35" style="height:23px; background-color:#FFF; color:#000; border: 1px solid #CCC;" /> </div><br /> <div class="form-text"> <b>Message Subject<span class="purple">*</span></b><br /> <input name="message subject" type="text" id="message subject" size="35" style="height:23px; background-color:#FFF; color:#000; border: 1px solid #CCC;" /> </div><br /> <div class="form-text"> <b>Message<span class="purple">*</span></b><br /> <textarea name="message" type="text" id="message" rows="8" cols="55" style="background-color:#FFF; color:#000; border: 1px solid #CCC;" ></textarea> </div><br /> <div class="submit-button"> <input type="submit" name="submit" value="Submit" /> </div> </form> Thanks in advance! Jack.

    Read the article

  • 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

  • HTML Form Upload PDF with other form contents using PHP

    - by Sev
    I have a HTML form with fields such as name, address, notes, etc. I also have a field to upload a PDF. The uploaded PDF get's stored on the file system. How can I accomplish this if possibly the PDF files are larger than 2 MBs? Also, for some reason, the uploading of the PDF (< 2 MBs) works fine in Chrome, but not in IE. In IE, the upload doesn't even begin, but in Chrome, it completes fine. Form header looks like: method='post' ENCTYPE='multipart/formdata' edit: the ini setting didn't help The HTML <input type='text' name='user' /> <input type='file' name='userfile' /> The basic PHP ( I do some preg matching above, that I haven't included) $uploaddir = 'uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "File uploading failed.\n"; }

    Read the article

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