Jump to content

Search the Community

Showing results for tags 'submit'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 21 results

  1. Hi Am trying to submit the data to server, nothing is received on server. I mean "dismissed students" and "failed students " am filling and sending but not receiving on server side. How to get the data on server side. <div id="Examination" class="tabcontent"> <html> <body> <p id="exam"></p> dismissed students: <input type="text" name="index1" size="10"> <br><br> failed students: <input type="text" name="index2" size="10"> <button type="button" onclick="entry()">submit</button> <script> function entry() { var formData = new FormData(); var valid = new XMLHttpRequest(); valid.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("exam").innerHTML = this.responseText; } }; valid.open("POST", "exam.txt", true); xhttp.send(formData); } </script> I just added "formData" and i get just some junk characters not original data.How to fill the data in "formData" How to get the data, anything else is required to make it work. Thanks Avinash
  2. BACKGROUND: Now that I have finally got my responsive design to function properly. I did a little exploration of my site from my new iPhone 5 that a colleague gave me.to replace my broken "obsolete" iPhone 4. What I discovered was the unusual appearance of one of my form input controls. Although the submit button appears correctly on my still functioning "obsolete" MacBook, it does not appear correct on my new, not yet "obsolete" iPhone. When I investigate the matter with Firebug I am told that there is event bubbling. Now, I am not at all sure that this is the source of the problem. Neither, am I clear about how the bubbling is being created. This is the first time that I have encountered such an issue. TROUBLED DOCUMENT: 1) Open the Grammar Captive mainpage in your smartphone. 2) Find the text Weekly Podcasts under the Products subtitle in the navigation bar on your left and click on it. 3) Scroll to the bottom of the form located toward the bottom of the page and discover that the value of the button -- namely, Discover! -- is partially hidden. The width of the button is clearly not wide enough to display the entire value of the value attribute. QUESTION ONE: Why does the value attribute display correctly in my browser window on my "obsolete" MacBook, but not on my not yet "obsolete" iPhone? QUESTION TWO: If bubbling is the source of the problem, what must I do to fix it? Roddy
  3. I made a website using HTML and some javascript. I tried to make a contact form with PHP, but something goes wrong when submitting and I don't understand why. I followed a tutorial and can't see any mistakes (first time using PHP, so there might be a lot I can't see). Here is the HTML-code and PHP-file. I also uploaded the original, in case you prefer to open it that way.. <!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"><head> <link rel="stylesheet" type="text/css" href="sample.css"> <style type="text/css" media="all"> @import "sample.css"; </style> <title>Yan Zhou | CONTACT</title> </head> <body> <div id="container"> <div id="header_home"></div> <div id="navigatie"> <ul> <li id="linkabout"><a href="Yan Zhou - About.html"><img src="images/link_about.png" alt="ABOUT"></a></li> <li id="linkportfolio"><a href="Yan Zhou - Portfolio.html"><img src="images/link_portfolio.png" alt="PORTFOLIO"></a></li> <li id="linkcontact"><a href="Yan Zhou - Contact.html"><img src="images/link_contact.png" alt="CONTACT"></a></li> </ul> </div> <div id="supportingText"> <form action="contact_form.php"> <label for="name">Name</label> <input type="text" id="name" name="name" placeholder="I will need your name for contacting you. ^^"> <label for="company">Company</label> <input type="text" id="company" name="company" placeholder="If you contact me on behalf of a company, type it here. Otherwise type 'None'."> <label for="email">Email</label> <input type="text" id="email" name="email" placeholder="How else could I answer you?"> <label for="message">Message</label> <textarea id="message" name="message" placeholder="Who are you, where are you from, what do you wish to say? :-)" style="height:200px"> </textarea> <input type="submit" value="Submit"> </form> </div> </body></html> <?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "rakkermans@hotmail.com"; $email_subject = "Yan Zhou Website - Contactformulier"; function died($error) { // your error code can go here echo "I'm sorry, but there were error(s) found with the form you submitted. "; echo $error."<br /><br />"; echo "Please fix these errors and retry submitting.<br /><br />"; die(); } // validation expected data exists if(!isset($_POST['name']) || !isset($_POST['company']) || !isset($_POST['email']) || !isset($_POST['message'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $name = $_POST['name']; // required $company = $_POST['company']; // required $email = $_POST['email']; // required $message = $_POST['message']; // required $error_message = ""; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; if(!preg_match($email_exp,$email)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } $string_exp = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$name)) { $error_message .= 'The Name you entered does not appear to be valid.<br />'; } if(!preg_match($string_exp,$company)) { $error_message .= 'The Company you entered does not appear to be valid.<br />'; } if(strlen($message) < 2) { $error_message .= 'The message you entered does not appear to be valid.<br />'; } if(strlen($error_message) > 0) { died($error_message); } $email = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "Name: ".clean_string($name)."\n"; $email_message .= "Company: ".clean_string($company)."\n"; $email_message .= "Email: ".clean_string($email)."\n"; $email_message .= "Message: ".clean_string($message)."\n"; ?> <?php ?> The following error message appears Thanks for looking into it! Rob Yan Zhou - Contact.html contact_form.php
  4. I am trying to use the example contact form in the w3-ccs examples. The submit form processes but there is no data sent with the form. Can some one set me on the right path on how to get the data into php processing page? php process code: <?php $EmailFrom = "email@greengardensdesign.com"; $EmailTo = "email@greengardensdesign.com"; $Subject = "Possible New Job"; $Name = Trim(stripslashes($_POST['Name'])); $Address = Trim(stripslashes($_POST['Address'])); $City = Trim(stripslashes($_POST['City'])); $Email = Trim(stripslashes($_POST['Email'])); $Phone = Trim(stripslashes($_POST['Phone'])); $Message = Trim(stripslashes($_POST['Message'])); // validation $validationOK=true; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; exit; } // prepare email body text $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Address: "; $Body .= $Address; $Body .= "\n"; $Body .= "City: "; $Body .= $City; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; $Body .= "Phone: "; $Body .= $Phone; $Body .= "\n"; $Body .= "Message: "; $Body .= $Message; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=contactthanks.php\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; } ?> input form code: <form action="/contactengine.php" method="post" class="w3-container w3-card-4 w3-light-grey w3-text-blue w3-margin"> <h2 class="w3-center">Contact Us</h2> <div class="w3-row w3-section"> <div class="w3-col" style="width:50px"><i class="w3-xxlarge fa fa-user"></i></div> <div class="w3-rest"> <input class="w3-input w3-border" name="Name" type="text" placeholder="Full Name"> </div> </div> <div class="w3-row w3-section"> <div class="w3-col" style="width:50px"><i class="w3-xxlarge fa fa-car"></i></div> <div class="w3-rest"> <input class="w3-input w3-border" name="Address" type="text" placeholder="Street Address"> </div> </div> <div class="w3-row w3-section"> <div class="w3-col" style="width:50px"><i class="w3-xxlarge fa fa-car"></i></div> <div class="w3-rest"> <input class="w3-input w3-border" name="City" type="text" placeholder="City and State"> </div> </div> <div class="w3-row w3-section"> <div class="w3-col" style="width:50px"><i class="w3-xxlarge fa fa-envelope-o"></i></div> <div class="w3-rest"> <input class="w3-input w3-border" name="Email" type="text" placeholder="Email"> </div> </div> <div class="w3-row w3-section"> <div class="w3-col" style="width:50px"><i class="w3-xxlarge fa fa-phone"></i></div> <div class="w3-rest"> <input class="w3-input w3-border" name="Phone" type="text" placeholder="Phone"> </div> </div> <div class="w3-row w3-section"> <div class="w3-col" style="width:50px"><i class="w3-xxlarge fa fa-pencil"></i></div> <div class="w3-rest"> <input class="w3-input w3-border" name="Message" type="text" placeholder="Message"> </div> </div> <button class="w3-button w3-block w3-section w3-blue w3-ripple w3-padding">Send</button> </form>
  5. Hi all, Having some problems getting my HTML <form> to work correctly when I press the 'Submit' button. When I put data in the 'text' field and then press Submit, the page goes 'white' with no response, but the URL is still the same. What I'm really trying to do at this point, is to just make sure that my <form> and related GetFormData.php file are setup correct as I get ready to try to send data to my mariadb on my local test server. Have checked out a lot of forum posts, but not finding the missing link, lol. Using my test web site for fun: Here are important parts from MainPage Html file (<form> section has 5 q's, I'll pull 1st): ** This line in the <head> section: <link href="http://localhost/GetFormData.php" type="text/php" rel="stylesheet"> ** Here is <form> from <body>: <!-- This section is for: Take a quick Godzilla survey /--> <div id="survey-div"> <form id="survey-form" class="MainPgTxtBckgColor" action = "GetFormData.php" method = "post"> <fieldset id="survey-fieldset"> <legend>Take one of our quick surveys.</legend> <p> <label>1. Who is your <strong>favorite monster</strong> character (Godzilla related or not):</label> <input id="FavMonster" type = "text" value = "" /> </p> <p> <label>Press 'Submit' when you are done.</label> <input type="submit" value="Submit" name="submit_button"> </p> </fieldset> </form> </div> ** Here is contents of GetFormData.php file: <!DOCTYPE html> <html lang = "en-US"> <head> <meta charset = "UTF-8"> <title>GetFormData.php</title> </head> <body> <p> <?php // define variables and set to empty values $favmonsterErr = ""; $favmonster = ""; // verify that field is not empty if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["favmonster"])) { $favmonsterErr = "Favorite Monster is required"; } else { $favmonster = test_input($_POST["favmonster"]); // check if name only contains letters and whitespace if (!preg_match("/^[a-zA-Z ]*$/",$favmonster)) { $favmonsterErr = "Only letters and white space allowed"; } } // validate all form data function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?> </body> </html> ** Am I missing something with how <form> Submits work or am I just, missing something!
  6. I need two submit buttons in my form, first is going to show result in the same tab and another one is in another one. <submit target="_blank"> is not correct. <target="_blank"> is for <form> tag, right?
  7. I have st up a form on my website for contacting my company. It has some required fields for name, email and message but when you click the submit button, an alert pops up to confirm the form being submitted even when the required fields haven't been filled out. How can I solve this? This is the code for the form: <form name="Contact" method="put" id="contact"> First Name: <input type="type" name="First" id="first" maxlength="20" required placeholder="First Name"> <br> Last Name: <input type="type" name="Last" id="last" maxlength="25" required placeholder="Last Name"> <br> Email: <input type="email" name="Email" id="email" maxlength="25" required placeholder="Email"> <br> Message <input type="type" name="Message" id="message" maxlength="1000" required placeholder="Message"> <br> <input type="reset"> <input type="submit" onClick="alert('Thank you for contacting us. We will process it as soon as possible')"> </form>
  8. What i am trying to do is create a text box to enter in a Frequency (122.25mhz). Then on a button press have it call a function to store as a variable, drop the 2 decimal places and convert the number. And return another variable after it is all done. I can figure out how to move the decimal, and convert it. My testing is that I want to display the number to see if the conversions are working right but i cant get it to display. Here is the code. Here is the jsfiddle for it. http://jsfiddle.net/2xz6un9b/ Example 122.25 FREQE = 122.25 FREQE1 = 12225 FREQE2 = 2225 FREQE3 = 4261 FREQO = FREQE3 html <input type="text" id="FREQB"> <button onclick="FREQ()">Frequency</button><p id="FREQO"></p> Javascript function freq(){ //get value from entery var FREQE = document.getElementById("FREQB").value; //dropping 2 decimal places var FREQE1 = FREQE*100; //removing the 1 from the front var FREQE2 = FREQE1 - 10000; //converting to oct var FREQE3 = FREQE2.toString(8); document.getElementById("FREQO").innerHTML = FREQE3;}
  9. Hi all, I have a form that works fine inn all browsers except IE. The form needs to submit on enter and use ajax to handle the fom data, Here is the relevant code. Is there anything here I can do do make it work as is with IE. What makes IE not submit with Enter and how do I get around it. Thanks <div class="element"> <b>Address</b>: <form id="addressPForm"> <input type="text" id="addressForm" value="<?php echo $address; ?>"/> <input type="text" class="uidAddress" value="<?php echo $uid; ?>" style="display:none"/> <input type="submit" id="buttonXaddress"/> </form></div> $(function() { $("#buttonXaddress").click(function(e) { e.preventDefault(); var newName = $('input#addressForm').val(); var type = "address"; if(newName != '') { var id = $('input.uidAddress').val(); $.ajax({ type: "POST", url: "changeName.php", data: {newName: newName, id: id, type: type}, success: function(result){ document.getElementById("addressP").innerHTML = result; document.getElementById("addressP").style.display="inline"; document.getElementById("addressPForm").style.display="none"; } }); } });});
  10. Hi All, This is my first post! I think this site is amazing. I love the little try it yourself windows. SO cool. So my question is this: how can I make a form that has two drop down menus (the first with 2 options and the second with 3) and a submit button which upon clicking will take the user to one of 6 html pages on my website. Drop down 1: -Fairy Goddess -Inner Warrior Drop down 2: -Young Adult -20 Something -30 and up Possible outcomes: 1. Fairy Goddess - Young Adult 2. Fairy Goddess - 20 Something 3. Fairy Goddess - 30 and up 4. Inner Warrior - Young Adult 5. Inner Warrior - 20 Something 6. Inner Warrior - 30 and up I've tried to get a start by modifying this check-box & submit disclaimer code that I successfully implemented on one page. I haven't an idea how to modify the JS to match what I want to do with the HTML. Please correct and direct me to solve this! The code I have now: <SCRIPT language=JavaScript><!--//Accept terms & conditions script (by InsightEye www.insighteye.com)//Visit JavaScript Kit (http://javascriptkit.com) for this script & more.function checkCheckBox(f){if (f.agree.checked == false ){alert('Please agree to the terms by checking the box to continue.');return false;}else{return true;}}//--> </SCRIPT> followed by: <!-- Consultation form code --> <form action="fairy-goddess.html" autocomplete="on"> Choose your Guide <input list="guides" name="guide"> <datalist id="guides"> <option value="Fairy Goddess"> <option value="Inner Warrior"> </datalist><br> Choose your age group <input list="age-groups" name="age-group"> <datalist id="age-groups"> <option value="Young Adult"> <option value="20 Something"> <option value="30 & up"> </datalist><br> <input type="button" class="btn btn-default" value="Submit" onclick="document.location.href='../disclaimer.html';"></form><!-- Consultation form code --> THANKS!!
  11. I'd like to achieve the following with javascript:When you type any of the following words into the inputbox and click the submit button you'll be redirected to the corresponding page:tree => tree.phpchocolate => chocolate.phpbird => bird.phpcandle => candle.phpapple => apple.phpHowever if you type a different word than the above, you'll get a warning message. <div id="main"> <form action=""> <ul> <li><input class="inputbox" type="text" name="TypeWord" value="" placeholder="Type a word here"/></li> <li><input class="button" type="submit" name="Submit" value="Submit word"/></li> </ul> </form></div><div id="warning"> <p style="visibility:hidden;">Oops, wrong word, please try again.</p></div>   Does anyone know of a javascript that can do this?
  12. the following script to ask for confirmation before submitting a form is not working while clicking yes. please guide me find the error... <script>$(function () { 'use strict'; function confirmDialog(title, message, success) { var confirmdialog = $('<div></div>').appendTo('body') .html('<div><h6>' + message + '</h6></div>') .dialog({ modal: true, title: title, zIndex: 10000, autoOpen: false, width: 'auto', resizable: false, buttons: { Yes: function () { success(); $(this).dialog("close"); }, No: function () { $(this).dialog("close"); } }, close: function() { $(this).remove(); } }); return confirmdialog.dialog("open"); } $('form').on('submit', function (e) { e.preventDefault(); var form = this; confirmDialog('Confirm', 'Are you sure?', function () { form.submit(); }); });});</script>
  13. i'm trying to get make query relating to the date selection. and if no date is selected, i want to make default query without date selection. for this i tried this ---- // above this there is a form with two input fields for from date and to date selection with a submit buttom. action is $_SERVER['PHP_SELF']if (!isset($_POST['sort'])) { // 'sort' is the submit button name$query = "SELECT * FROM tran WHERE ssn!=0 ORDER BY date";} else { $fdate == $_POST['fdate']; // from date $tdate == $_POST['tdate']; // to date$query = "SELECT * FROM tran WHERE ssn!=0 AND date BETWEEN '$fdate' AND '$tdate' ORDER BY date";} but this is not working... any suggestion!!!?????
  14. I have been searching for days and just cant figure this out. Hope someone can help. I am fairly new to html and have been working on an application form. I finally have the form working, However - the submit button is towards to top and any attempt to move it renders the button non functioning. I know my code is messy - I'll clean that up once I know what I need to do can even be done. Thanks to anyone who can help! Here is my HTML" ​<head><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-8" http-equiv="Content-Type" /><title>CALIFORNIA SCHOOL OF LAW APPLICA</title><style type="text/css">.auto-style1 { color: #000080;}.auto-style3 { text-align: center;}.auto-style4 { font-size: large; font-family: Arial, Helvetica, sans-serif; text-align: left;}.auto-style5 { font-size: small;}.auto-style6 { font-family: Arial, Helvetica, sans-serif; font-size: large;}.auto-style7 { font-size: xx-small;}.auto-style8 { font-size: large;}.auto-style9 { font-size: small; font-family: Arial, Helvetica, sans-serif;}.auto-style10 { color: #000000;}</style></head><form method="post" action="contact.php"><body> <p><img alt="California School Of Law Logo" height="116" src="LogoFinal%20no%20text.jpg" width="162" /></p><div id="layer1" class="auto-style3" style="position: absolute; width: 347px; height: 52px; z-index: 1; left: 368px; top: 53px"> <span class="auto-style6">CALIFORNIA SCHOOL OF LAW</span><br class="auto-style6" /> <span class="auto-style6">APPLICATION</span></div><hr class="auto-style1" style="height: 4px" /><div id="layer2" class="auto-style4" style="position: absolute; width: 397px; height: 380px; z-index: 2; left: 76px; top: 170px"> <strong>Personal Information<br /> <br /> </strong><span class="auto-style5">Last Name: <input name="Text1" type="text" /><br /> <br /> First Name: <input name="Text2" type="text" /> M.I: <input name="Text3" style="width: 15px" type="text" /><br /> <br /> Name on acedemic records (if different from above) <br /> <input name="Text4" style="width: 227px" type="text" /><br /> <br /> Social Security Number: <input name="SS" size="9" style="width: 141px" type="text" /> <br /> <br /> DL State:<select name="Select1"> <option></option> <option value="CA">CA</option> <option>NV</option> <option>TX</option> </select> DL Number: <input name="Text5" type="text" /><br /> <br /> Gender: <select name="Select2"> <option></option> <option>Male</option> <option>Female</option> </select> Date of birth: <input name="Text6" style="width: 92px" type="text" /><br /> <br /> Ethnic/Racial Background: <select name="Select3"> <option></option> <option>Caucasian</option> <option>Hispanic</option> <option>Asian</option> <option>African American</option> <option>Other</option> </select><br /> <br /> Birth place: <input name="Text7" type="text" /><br /> </span></div><p> </p><p> </p><div id="layer9" class="auto-style9" style="position: absolute; width: 518px; height: 230px; z-index: 9; left: 537px; top: 1022px"> D. Have you ever been court marshaled? <select name="Select14"> <option></option> <option>YES</option> <option>NO</option> </select><br /> <br /> E. Have you ever been dishonorably disharged<br /> from Miltary service? <select name="Select15"> <option></option> <option>YES</option> <option>NO</option> </select><br /> <br /> F. Do you know of any matter which might otherwise adversly affect your admissions to law school or the state bar? <select name="Select16"> <option></option> <option>YES</option> <option>NO</option> </select><br /> <br /> </div><div id="layer8" class="auto-style8" style="position: absolute; width: 520px; height: 307px; z-index: 8; left: 11px; top: 949px"> <strong>Miscellaneous<br /> <br /> </strong><span class="auto-style9">Please answer the following questions, if you answer YES to any question please explain<br /> <br /> A. Have you ever been on probation, suspended, dismissed or formally reprimanded by any educational institution? <select name="Select11"> <option></option> <option>YES</option> <option>NO</option> </select><br /> <br /> B. Have you ever been convicted, pleaded guilty or no contest to any crime other than a minor traffic violation or juvenile offense? <select name="Select12"> <option></option> <option>YES</option> <option>NO</option> </select><br /> <br /> C. Are there any criminal charges currently pending or expected against you? <select name="Select13"> <option></option> <option>YES</option> <option>NO</option> </select><br /> <br /> Explanation: <br /> </span></div><div id="layer7" style="position: absolute; width: 1162px; height: 24px; z-index: 7; left: 9px; top: 922px"> <strong><span class="auto-style5"> <hr class="auto-style1" style="height: 4px" /></span></strong></div><div id="layer6" style="position: absolute; width: 415px; height: 205px; z-index: 6; left: 462px; top: 644px"> Email Address: <input name="Text18" style="width: 229px" type="text" /><br /> <br /> In case of emergency:<br /> <br /> Name: <input name="Text19" type="text" /><br /> <br /> Relationship: <input name="Text20" type="text" /><br /> <br /> Phone: <input name="Text21" type="text" /></div><div id="layer5" class="auto-style6" style="position: absolute; width: 431px; height: 278px; z-index: 5; left: 10px; top: 643px"> <strong>Contact Information<br /> <br /> </strong><span class="auto-style5">Street Address:</span><strong> <input name="Text12" type="text" /><br /> <br /> </strong><span class="auto-style5">City:<strong> <input name="Text13" type="text" /><br /> <br /> </strong>State:<strong> <select name="Select10"> <option></option> <option>CA</option> <option>CO</option> <option>TX</option> <option>NV</option> <option>WA</option> </select> </strong>ZIP:<strong> <input name="Text14" type="text" /><br /> <br /> </strong>Home Ph:<strong> <input name="Text15" type="text" /><br /> <br /> </strong>Work Ph<strong>: <input name="Text16" type="text" /><br /> <br /> </strong>Cell Ph:<strong> <input name="Text17" type="text" /><br /> </strong></span></div><div id="layer4" style="position: absolute; width: 1174px; height: 31px; z-index: 4; left: 5px; top: 610px"> <strong><span class="auto-style5"> <hr class="auto-style10" style="height: 4px" /></span></strong></div><div id="layer3" class="auto-style6" style="position: absolute; width: 446px; height: 422px; z-index: 3; left: 671px; top: 165px"> <strong>Status - Term Start 14WIN<br /> <br /> </strong><span class="auto-style5">Application Status:<strong> <select name="Select4"> <option></option> <option>New Student</option> <option>Returning Student</option> </select><br /> <br /> </strong>Prior Application Submitted?:<strong> <select name="Select5"> <option></option> <option>YES</option> <option>NO</option> </select><br /> <br /> </strong>LSAC Registration No.: <strong> <input name="Text8" type="text" /></strong></span><br /> <br /> <span class="auto-style5">Have you taken the LSAT?: <select name="Select6"> <option></option> <option>NO</option> <option>YES</option> </select> Score: <input name="Text9" style="width: 71px" type="text" /><br /> <br /> Are your transcripts on file with LSAC? : <select name="Select7"> <option></option> <option>YES</option> <option>NO</option> </select><br /> <br /> </span><em><span class="auto-style7"><strong>Note: You do not have to be a U.S. Citizen to attend law school or practice law in California<br /> <br /> </strong></span></em><span class="auto-style5">Are you a United States Citizen? :<strong> <em><span class="auto-style7"> <select name="Select8" style="width: 24px"> <option>YES</option> <option>NO</option> </select></span></em><br /> <br /> </strong>If NO, are you a permanent resident? :<strong> <select name="Select9"> <option></option> <option>YES</option> <option>NO</option> </select><br /> <br /> </strong>VISA Type:<strong> <input name="Text10" style="width: 166px" type="text" /><br /> <br /> </strong>Alien Number:<strong> </strong></span> <input name="Text11" style="width: 178px" type="text" /></div><p> </p><tr><td> <input type=submit name="send" value="Submit" input align="bottom" style="margin-left:550px"> </td></tr> </form></body></html>
  15. Ignotas

    PHP forms

    Hello I now I am going to ask stupid question which is not worth new topic but I can't find answer any where. Can I run function in same page after clicking submit button and how do I do it ? Thank you for your answers. New guestion How do I keep form select type values after reloading page ?
  16. Hi, I have the following codes: HTML <body> <div id="main_body"><img name="elvislogo" src="elvislogo.gif" width="229" height="32" border="0" alt="Make Me Elvis"><p>Enter your first name, last name, and email to be added to the <strong>Make Me Elvis</strong> mailing list.</p> <form method="post" action="addemail.php" id="main_form"><div class="table_row"><p><label for="firstname">First name:</label></p><p><input type="text" id="firstname" name="firstname"></p></div> <div class="table_row"><p><label for="lastname">Last name:</label></p><p><input type="text" id="lastname" name="lastname"></p></div> <div class="table_row"><p><label for="email">Email:</label></p><p><input type="text" id="email" name="email"></p></div> <div class="table_row"><p></p><p><input type="submit" name="Submit" value="Submit"></p><p></p></div> </div> </form> </body> CSS #main_form { display : table;border-spacing : 5px;border : thin dashed grey;background-color : pink; } div.table_row { display : table-row; } div.table_row p { display : table-cell; }div.table_row p:first-child { text-align : right; } div#main_body { width : 400px; margin : auto; padding : 10px; } input, textarea { margin : 5px; } I want to make the submit button centered, but I don't know how to go about this - I'd make a table row and then place the button, but I don't know how to style the centering. Successfully solved solution would be appreciated. BTW, this code is from a book.
  17. I am trying to have a link submit some form data to a lightbox ( I am using facebox) and am having some trouble. The basic code I am working with is: <form name="form" method="post" action="test.asp"><ul><li><a href="#" onclick="document.forms['form'].dept.value = 'ACC'; document.forms['form'].course.value = '115'; document.form.submit('test.asp');" rel="facebox">ACC 115 Payroll Accounting</a></li></ul><input type="hidden" value="" name="dept" id="dept"><input type="hidden" value="" name="course" id="course"></form><script type="text/javascript">$('a[rel*=facebox]').facebox({ loading_image: '/images/loading.gif', close_image: '/images/closelabel.gif' });</script> This file submits to the test.asp file which processes the XML data which the course descriptions live. <%dim dept, coursedept = "ACC"course = "115"Set objxml = Server.CreateObject("Microsoft.XMLDOM")objxml.async = falseobjxml.load (Server.MapPath("classes.xml"))set ElemClass = objxml.getElementsByTagName("class[@dept='"&dept&"' and @class='"&course&"']")set ElemTitle = objxml.getElementsByTagName("class[@dept='"&dept&"' and @class='"&course&"']/title")set ElemDescription = objxml.getElementsByTagName("class[@dept='"&dept&"' and @class='"&course&"']/description")set ElemPrereqs = objxml.getElementsByTagName("class[@dept='"&dept&"' and @class='"&course&"']/prereqs")%><!DOCTYPE html><html><head><meta charset="utf-8"><title><% Response.Write(dept&" "&course) %></title></head><body><%For i=0 To (ElemClass.length -1)%><h3><% Response.Write(ElemTitle.item(i).Text) %></h3><p><% Response.Write(ElemDescription.item(i).Text) %></p><p><% Response.Write(ElemPrereqs.item(i).Text) %></p><%nextSet objxml = Nothing%></body></html> I have gotten everything to work, except I can't seem to get the form to put the test.asp in the lightbox. Help please!!
  18. sumbin

    AJAX form submit

    hi..everyone!!!!!!!!iam trying to submit a form which has approx 10 text fields with ajax. but iam unable to write the code. please help!!!!!!!!!!!!!! in this regard thanksSuman
  19. I'm wondering is it possible to make javascript that doesn't let the user go to example action="test.php" page if javascript says so. Example im having this javascript <script type="text/javascript">var r=confirm("Click the OK button now!");if (r==true){ alert("You pressed OK!");<!-- THIS SHOULD ALLOW THE ACTION (SO IT WOULD ALLOW USER TO CONTINUE TO ACTION PHP PAGE) -->}else{ alert("You pressed Cancel!");<!-- THIS SHOULD CANCEL THE ACTION (SO IT WOULD NOT CONTINUE TO ACTION PHP PAGE) -->}</script> So if user presses OK it allows user get to the next page and if user press cancel it doesn't let Oo found cool page with info at this http://www.htmlforums.com/client-side-scripting/t-how-to-cancel-submit-action-33810.html
  20. Hey there. I'm trying to build a contact form from scratch (using the W3Schools tutorials pretty heavily), but I'm having some issues. First off, I'd like to write in a bit of code that grabs the username of the person submitting the form, and sends it along with the other submitted information. Also, if the person isn't signed in, they won't be able to use the form. I'm sure this will involve some PHP, which I will be more than happy to do, if someone could perhaps point me in the right direction? <div id="events"><form name="event-submit" action="MAILTO:someone@example.com" method="post" enctype="text/plain">Event Name:<br /> <input type="text" name="eventname" /><br />Start Date:<br /> <input type="text" name="startdate" /><br />End Date:<br /> <input type="text" name="enddate" /><br />Location:<br /> <input type="text" name="location" /><br />Description:<br /> <input type="text" name="description" size="50" /><br /><input type="submit" value="Submit" /></form></div> (And yes, I do have my actual email address for the MAILTO property, I just omitted it for this post.) My main problem right now is, the submit button isn't working. Buttons and I do not get along, it seems...Any suggestions as to what I'm doing wrong would be greatly appreciated. EDIT Okay, I apparently left off a rather important caret. The button is working just fine now, but is there any way to make the email not go through Outlook, and go directly to the email address?
  21. Hi guys, i have a bit of a PHP problem and would appreciate a bit of help. I am currently doing a project in college and it involves PHP, which i am a bit dodgy on. Basically we have to create a HTML page, with a drop box menu showing 5 music albums, and a Submit button. Here is what i have to show up the Deopdown menu in HTML: [/color]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">[/color]<html> <head><title>Album List</title></head> <form action="chosen_album.php" method="post"> <select name="albums"><option value="1">Appetite For Destruction</option><option value="2">Out Of Exile</option><option value="3">West Ryder Pauper Lunatic Asylum</option><option value="4">One By One</option><option value="5">Master Of Puppets</option> <p><input type="submit" name="submit" value="Submi" </p></select></form> </body></html> Now, when you pick an album name and hit submit, it should bring you to a page showing all the album info, track list, etc. (I have all this info from a previous project). But where im stuck is for the PHP code needed to link the HTML drop box page. This is my PHP code so far, but doesnt seem to work properly. I am using a Wamp server for my loclahost which is up and running ok, so dont think thats the problem: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head><title>Chosen Album</title></head> <?php$chosen_album = $_POST['albums'];$album_info = ''; if ($chosen_album== 1) {//appetite for destruction$album_info ='<p class="album_title">Appetite For Destruction</p><p class="artist">Artist: Guns N Roses</p><p class="track_list">Track List:</p><ol class="list"><li>Welcome to the jungle</li><li>Its so easy</li><li>Nightrain</li><li>Out ta get me</li><li>Mr Brownstone</li><li>Paradise city</li><li>My Michelle</li><li>Think about you</li><li>Sweet Child o mine</li><li>Youre crazy</li><li>Anything goes</li><li>Rocket queen</li> </ol> <iframe width="420" height="315" src="http://www.youtube.com/embed/i_gQOfF0Ymo" frameborder="0" ';}if($chosen_album==2) {//out of exile$album_info = '<p class="album_title">Out Of Exile</p><p class="artist">Artist: Audioslave</p><p class="track_list">Track List:</p><ol class="list"><li>Your Time Has Come</li><li>Out Of Exile</li><li>Be Yourself</li><li>Doesnt Remind Me</li><li>Drown Me Slowly</li><li>Heavens Dead</li><li>The Worm</li><li>Man Or Animal</li><li>Yesterday To Tomorrow</li><li>Dandelion</li><li>#1 Zero</li><li>The Curse</li><li>Like A Stone</li></ol><iframe width="420" height="315" src="http://www.youtube.com/embed/f_4MBuxMBN4" frameborder="0" allowfullscreen></iframe>';}if($chosen_album== 3) {//west ryder.......$album_info = '<p class="album_title">West Ryder Pauper Lunatic Asylum</p><p class="artist">Artist: Kasabian</p><p class="track_list">Track List:</p><ol class="list"><li>Underdog</li><li>Where Did All The Love Go?</li><li>Swarfiga</li><li>Fast Fuse</li><li>Take Aim</li><li>Thick As Thieves</li><li>West Ryder Silver Bullet</li><li>Vlad The Impaler</li><li>Ladies & Gentlemen (Roll The Dice)</li><li>Secret Alphabets</li><li>Fire</li><li>Happiness</li></ol><iframe width="560" height="315" src="http://www.youtube.com/embed/tjMnhiCUnr0" frameborder="0" allowfullscreen></iframe>';}?> (NOTE: I have only filled info for the first 3 items on the drop box to test it out)Basically, at the end i should have 1 HTML file (dropbox), 1 PHP file (album info) and 1 CSS file for styles (which im ok with.) Any help would be appreciated.
×
×
  • Create New...