HTML - Pass Values Without Submit
I am wanting to create a booking form for my website, before you can make a booking you have to be able to check is available in your area. So I am wanting to be able use one form where you can enter all the required details and when you enter a postcode you click check, which will give a pop up box saying if someone is available or not.
The problem I have found is if I use a link then the PHP code doesn't get any values from the form, if I use a submit button it does pass the value but the popup only comes up for a split second. Here is the code for the form as I said if I click the Check Button, it passes the value but only shows the pop up for a second, If you click "Find Driver" first it shows the Pop up but it is blank as It doesn't get the value from the form. If you click check and then Find driver it works fine, but I am wanting to find a solution by only using one click. HTML Code: <div id="form"> <form name="f1" method="post"/> <p> ID: <br/> <input name="ID" type="text" value="Leave Blank" /> </p> <p> Name: <br/> <input name="Name" type="text" /> </p> <p> Address: <br/> <input name="Address" type="text" /> </p> <p> Postcode:<br/> <input name="Postcode" id="Postcode" type="text" /> <input type='Submit' value='Check' onclick="popup('popUpDiv')" /> <p><a href="#" onclick="popup('popUpDiv')">Find Driver</a></p> </p> <p> Telephone: <br/> <input name="Telephone" type="text" /> </p> <p> Mobile: <br/> <input name="Mobile" type="text" /> </p> <p> AltTelephone: <br/> <input name="AltTelephone" type="text" /> </p> <p> Email: <br/> <input name="Email" type="text" /> </p> <p> Date: <br/> <input name="Date" type="text" /> </p> <p>Notes: <br/> <input name="Notes" type="text" /> </p> <p> CompanyNotes: <br/> <input name="CompanyNotes" type="text" /> </p> <p> Payment: <br/> <input name="Payment" type="text" value="Leave Blank for 0" /> </p> <p> <input type="submit" Value='Book' onclick="f1.action='insert.php'; return true " /> <!--<div id="wheel"><a href="instructorSearch.php"onClick="return popup(this, 'notes')"><img id="mainLogo" src="im/wheel.png" alt="Driving School Logo" /></a></div> !--> </p> <p><input type="submit" Value='Enquire' onclick="f1.action='insertEnquire.php'; return true " /> </form> Similar TutorialsHey there guys, my first time... Site looks pretty good. Well my problem is that I don't know how to make a submit button that sends certain information. For example: I make a button on a page ("<input type="submit" name="B1" value="Login">) but i don't know how to make a hyperlink for it. At the same time i want the hyperlink to be: "username:password@www.site.com" Where user name is, I want a the text box text. (<input type="text" size="22" name="T1">) and for the password the other text box 2. So if textbox 1 is "john" and textbox 2 is "long", when the submit button is pressed, the hyperlink jumps to: "john:long@www.site.com" Thanks, I really hope you guys could help me out.... Cool Just some background info, I have dynamically created submit buttons depending on how many records are in the database (in this case, statuses stored in the db). I need these buttons to have a value pulled from the db which is purely used for processing the form, which I have done, but I also need the button to display an image. My problem is, the buttons are displaying the image as well as their values! I don't want the values to display, I just need them to have a value that I can pass through to the processing page so that it knows which button was clicked, hence which record to modify. Can anyone please help? HI everyone, I am in process of creating a sample page. I need to pass values from one HTML page and i should get those values in other page. For example i have used two sample pages like, sample.html l<html> <head> <title> My first page </title> </head> <body> <a href="sample1.html" id="1001">Welcome to html </a> </body> </html> sample1.html <html> <head> <title> My second page </title> </head> <body> <a href="sample1.html">Sample HTML page values came here</a></body> </html> I have used those two sample pages and i need to get the value of id="1001" in sample 1.html page could anyone help me to solve this problem. Thanks in advance Regards, Martin I want to pass the value from 'event.clientX' of the html line: "alert(event.clientX)" to a javascript. Right there on the same page. How can I do that? regards, ab good grief, hunting around I run across the fascinating information that 'alert' IS javascript ! Then how come this works: <html> <head> <title>Event</title> </head> <body onclick="alert(event.clientX + ' x ' + event.clientY)"> </body> </html> ? Javascript can be embedded in html and doesn't need that "<script language="javascript">" business? god almighty, what's going on............? Hi! I would like to know how do I pass a variable in my URL to the next page. HTML Code: For example, my URL is: http://www.mysite.com?source=google I'm using this form code to go to the next page: <form action="http://www.mysite.com/next-page.html" method="get" name="form"> <input type="text" name="zipcode" maxlength="5" id="zipcode" /> <br /> <input type="submit" id="button" value="Go"/> </form> So the next page URL will be: http://www.mysite.com/next-page.html?zipcode=11111 I want that the variable "google" will be also in this URL: http://www.mysite.com/next-page.html?zipcode=11111&source=google How I do that? Thanks, Steve Hi, I know how to make a username and password input form, and the submit button that is not the problem. My problem is that I have designed a background in PS.http://photoupload.org/uploads/13269813681.jpg And before anyone *****es at my for putting 'Shrimps' yes I know it is wrong. But this is for a gaming team I am in, and none of them are English. And they think that Shrimps sounds and looks better than Shrimp even though Shrimp is the correct plural. Anyway Back to the matter at hand. If you look at the background I designed, in the top left it has two boxes which is where I want to put the user and pass forms. But I don't want the boxes that naturaly come with the forms. And for the life of my I can't figure it out, I don't know weather it is HTML, XML or CSS, any help on how to get rid of the boxes that come with that would be highly appreciated, Thanks //Dave Hi created the following code: Code: <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>validation</title> </head> <body> <ul> <li><a href="#">item1</a></li> <li><a href="#">item2</a></li> <ul> <li><a href="#">item2a</a></li> <li><a href="#">item2b</a></li> </ul> </ul> </body> </html> unfortunately it doesn't pass validation. Apparently, a "ul" elenent cannot be inserted into another "ul". So, how do i create a cascading menu? Thanks Hi all! I'm trying to pass an array as a hidden field from a form in the URL of the browser but it's not working. Can you tell me what is wrong with this...it's my first attempt so be gentle The form HTML is <form name="filter" action="http://www.myurl.com" method="get"> <input type="hidden" name="main_page" value="index" /> <input type="hidden" name="Flt_Grade[]" value="100" /> <select name="filter_id" onchange="this.form.submit()"> <option value="1">Most Popular</option> <option value="2" selected="selected">Price: Low to High</option> <option value="3">Price: High to Low</option> <option value="4">Title</option> <option value="6">Date Added: Newest</option> <option value="7">Date Added: Oldest</option> </select> </form> I would expect, when option 4 in the dropdown is selected the URL to be http://www.myurl.com&main_page=index...00&filter_id=4 Where %5B = [ and %5D = ] But what I actually get is http://www.myurl.com&main_page=index...e=&filter_id=4 The Flt_Grade array is not passed properly. Can this be done so the hidden field is passed in the URL as an array? Thank you! Hey everyone! So after ruling out more complex Java implementations of passing a string onto the end of a static link, I'm attempting to do the same using <form> and onclick but am having difficulties. What I am trying to do is simple. There will be a form box where the user enters their ZIP CODE and then clicks a button 'Go'. Once clicked, I'd like to open a separate window (or possibly leave everything in the same window-not important) where the 'zip code' string (ie: 12345) is attached to the end of a static link (ie www.website.com/zip= ) to direct the user to the link 'www.website.com/zip=12345' I realize this is a simple idea, but thus far tutorials have lost me. This is the code that I have, but I admit it is a mess and might just be a better idea to ignore it: Code: <form> <input type="text" maxlength="8" name="zip" style="color:#555555;" value="Your ZIP" class="cleardefault" onclick="http://www.t-mobile.com/coverage/pcc.aspx?zip="+zip"> <input type="button" value="Go!" onclick="http://www.t-mobile.com/coverage/pcc.aspx?zip="+zip" > </form> Again, I know this is very n00bish and annoying, but if you could help I'd greatly appreciate the time! Hi, I am trying to accurately code a swf header into my website. I don't have the knowledge to arrange the code so it passes html validation. The following link will take you to the site and validation results. http://validator.w3.org/check?uri=ht...sale.net.au%2F And here a link to the website http://www.bikesforsale.net.au Any help or guidance will be gratefully received Cheers Ron hiii all, i am making 2 html pages. one is parent window and another is child window but i want, when i click on a link of child window , parent page will load but with diff frame on parent page i am able to reload the parent pag but the same form will appear so how can i load diff form when parent page is reload?? please mention code for both child and parent page and i am using html e\with java script please reply thanks My html problem keeps failling, with all my image codes.. shown for 10 errors which are all for the images what's wrong? Here is the code: <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- New Perspectives on HTML and XHTML 5th Edition Tutorial 2 Case 2 Fiddler Home Page Author: Date: 2-16-2011 Filename: home.htm Supporting files: fiddler.jpg --> <title>, ITSE 1411 Lab Project 2, Tutorial 2 Case 2, Due 02/23/2011</title> </head> <body> <div> <img src="fiddler.jpg" alt="Fiddler on the Roof" /> <hr /> <a href="home2.htm"><img src="home.jpg" alt="home" /></a> <a href="slide1txt.htm"<img src="start.jpg" alt="start" /></a> <a href="slide1txt.htm"<img src="back.jpg" alt="back" /></a> <a href="slide2txt.htm"<img src="forward.jpg" alt="forward" /></a> <a href="slide6txt.htm"<img src="end.jpg" alt="end" /></a> <br /> <a href="slide1txt.htm"<img src="thumb1.jpg" alt="slide1" style="border-width: 5" /></a> <a href="slide2txt.htm"<img src="thumb2.jpg" alt="slide2" style="border-width: 0" /></a> <a href="slide3txt.htm"<img src="thumb3.jpg" alt="slide3" style="border-width: 0" /></a> <a href="slide4txt.htm"<img src="thumb4.jpg" alt="slide4" style="border-width: 0" /></a> <a href="slide5txt.htm"<img src="thumb5.jpg" alt="slide5" style="border-width: 0" /></a> <a href="slide6txt.htm"<img src="thumb6.jpg" alt="slide6" style="border-width: 0" /></a> </div> <hr /> <div> <img src="slide1.jpg" alt="slide1" /> </div> <blockquote> <p><i>Do You Love Me?</i> sung by Deb Ingalls and Thomas Gates</p> </blockquote> </body> </html> I am to this forum and to html. In fact, i am learning html as i go. I am currently encountering a problem a submit.php When visitors to the page sign up they get an email with the requested info, however, I do not get an email with their info. I providing the code on here for my submit.php. Please help me identify and fix the problem. Thanks Don S. http://www.stocktraderspress.com/trial.php http://www.stocktraderspress.com/submit.php PHP Code: /******************************** * Send the user email message... ********************************/ $mail = new PHPMailer(); $mail->Host = "mail.stocktraderspress.com"; // Set the mail hostname here $mail->Mailer = "smtp"; $mail->SMTPAuth = true; $mail->Username = "stocktraderspress@stocktraderspress.com"; // Set the email account username here $mail->Password = ""; // Set the email account password here $mail->From = 'info@stocktraderspress.com'; $mail->FromName = 'STP Website'; $mail->AddAddress($_POST['em']); $mail->AddBCC; $mail->WordWrap = 100; $mail->Subject = 'Thank you for your interest in Stock Traders Press'; $mail->Body = $body; $mail->IsHTML(true); $mail->AltBody = @strip_tags($body); // This is a 'text-only' version of the message... if(!$mail->Send()) { echo "Mailer error: ". $mail->ErrorInfo; //exit; } /********************************* * Create database message body... *********************************/ $text = "<p>Email: ".$_POST['em']."<br>"; $text .= "First Name: ".$_POST['fn']."<br>"; $text .= "Last Name: ".$_POST['ln']."<br>"; $text .= "Phone: ".$_POST['ph']."<br>"; $text .= "Address Line 1: ".$_POST['ad']."<br>"; $text .= "Address Line 2: ".$_POST['ap']."<br>"; $text .= "City: ".$_POST['ct']."<br>"; $text .= "State / Province: ".$_POST['st']."<br>"; $text .= "Country: ".$_POST['cn']."<br>"; $text .= "Selected Offers: ".@implode(',',$_POST['selected_offers'])."<br>"; $text .= "Years In Market ".$_POST['years']."<br>"; $text .= "Portfolio Size: ".$_POST['portfolio']."<br>"; $text .= "Broker Type: ".$_POST['broker']."v"; $text .= "Mailing List: ".$_POST['yes']."<br>"; /******************************* * Create database email... *******************************/ $mail = new PHPMailer(); $mail->Host = 'mail.stocktraderspress.com'; // Set the mail hostname here $mail->Mailer = 'smtp'; $mail->WordWrap = 100; $mail->SMTPAuth = true; $mail->IsHTML(true); $mail->Username = 'stocktraderspress@stocktraderspress.com'; // Set the email account username here $mail->Password = 'stock###'; // Set the email account password here $mail->From = 'info@stocktraderspress.com'; $mail->FromName = 'STP Website'; $mail->AddAddress('clientservices@stocktraderspress.com'); $mail->AddAddress('chriscastaldo@aol.com'); $mail->AddBCC(''); $mail->AddReplyTo('clientservices@stocktraderspress.com'); $mail->Subject = 'Thank you for your interest in Stock Traders Press'; $mail->Body = 'The following request has been submitted'.$text; $mail->AltBody = @strip_tags($body); // This is a 'text-only' version of the message... if(!$mail->Send()) { //echo "Mailer error: ". $mail->ErrorInfo; //exit; } hi again i need some help how i can do auto submit in the loop (for) i need every time setvalue to input text and submit() <input type="text" name="text" id="Tes" size="12" /> i have this code but it doesnt work <script language =javascript > for ( f = 0 ; f<=100 ; f++ ) { document .getElementById ("Tes").value = f ; document .forms ["lname"].submit(); } </script> so please ned some help I currently have a set of buttons which change colour and use a gradient using css. eg: Code: <input class="button yellow small" name="previous" type="submit" value="previous" /> What i want is to have the word previous be replaced with an image of an arrow. I found a website which illustrated how to achieve putting an image on a button using the button tage: http://neozilon.com/html/set-image-as-a-submit-button However, using the button tags in the past has resulted in odd behaviours as some browsers read the button tag differently to others.... So, is it possible to put an image on the input/submit tag and still have it depress properly when pressed? buddies... i have a form... which have two buttons CANCEL and SUBMIT, As i fill the form and i press enter it goes to CANCEL not going to SUBMIT. Buddies pls help me out....... thnxs.... I'm looking for a way that I can allow users, that visit my website, to submit a graphic (.jpg,.gif,etc) either to my inbox or a specified folder on the server. Is this possible? I plan on using it under the "Your Screens" link. - http://www.v0dk4.com/main.shtml |