HTML - Creating A Cookie To Pass Data
Similar TutorialsHi There, I need some help creating a html cookie that collects information from a registration form I created in HTML. I then need to take that information and populate another form which is an invoice. So far I haven't been able to accomplish this on my own because I have the Regform.html, which already post info to a regform.php (this is what generates an email to me with the registration info). It is on that regform.php form they have the option to have a invoice created. Since I can't nest forms together I have to use this cookie method. The html cookies I have found online have not given me anything more then the generic cookie in which to place on someones pc. No knowledge of JS doesn't help. These are the fields below that need to link from the regform.html to the invoice.html form. I just realized that I have multiple lines on the invoice for multiple registrants but the same is not true on the regform. Even if I could get the first group of info to carry over, I could then edit the regform to add multiple registrants on the next lines. www.ahtcsonline.com/regform.html www.ahtcsonline.com/regform.php www.ahtcsonline.com/invoice.html Which Class: -drop down- Date of Class: # of Attendees: -drop down- Attendee Name: E-Mail: Company:* Address:* City:* State: -drop down- Zip:* Phone:* I am working on a site that will allow the user to print out a contract. However, the customer wants a way to scan the contract in and allow their OCR software to pick up the contract # and automatically store the image. I have the peice working where I have a web page display then a printable version. However, how can I ensure that the printable version always puts the data that will be OCR'd in the same spot? Is there some sort of absolute positioning that I can use? Also, I can foresee a potential problem with this with regards to different browsers and different printer settings. I just don't know what those problems might be. 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............? On my website (www.mysite.com), when a user clicks on the register link, a new window opens that takes him to another domain (www.myreg.com) where he can register. When he's finished registering, the myreg.com window is closed. The requirement is that when he's finished registering, I need the myreg.com page to set a cookie somehow for www.mysite.com . Is this possible? Cheers, James 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 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> 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 don't really know html, I have messed around with it and looked at some scripts; I have some understanding of a couple of langauges, but... lets say I'm a beginer. So... I have a website which is designed with WYSIWYG Web Builder and plan to do more advanced things with it. One of the things I plan to do is put a popup for a poll I have created on my hompage. But so users dont get annoyed by the popup everytime they visit I need a Check box; and when ticked sets a cookie to stop the popup coming up. Seen as I'm new to html code I would like the full code/script and maybe instructions please! Can you delete cookies using html? if so how? or does someone know an easy way to add a delete cookie function to my script? i need some sort of function or something that deletes logged_in preferably in a link or something so that i can chose when to delete it. script is as follows: HTML Code: <html> <head> <title>Cookies Script Test</title> <script language="javascript"> function createCookie ( name, value, expires ) { var today = new Date(); today.setTime( today.getTime() ); expires = expires * 1000 * 60 * 60 * 24; var expire_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expire_date.toGMTString() : "" ) } window.onload=createCookie( "logged_in", "YES", 1 ) </script> </head> <body> </body> </html> Thanks in advance, -uberwalla o and also if anybody knows an easy way to check to see if a cookie exists and do the following thatd be great: 1) check if it exists, and if it does null (do nothing) 2) if it doesnt exists redirect to a certain page (login.html) 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 peeps. i have a page where there is a selection box and the different choices give a different background in a certain div. please could somebody tell me how i would store that info in a cookie so that when the page changes, the background image stays the same? heres the link to my site if it helps: samsharples.com and here's the code HTML Code: <form action=""> <select onchange="changeDivImage(this.value)"> <option>Choose your favourite team</option> <option value="arsenal.png">Arsenal</option> <option value="aston_villa.png">Aston Villa</option> <option value="birmingham_city.png">Birmingham City</option> <option value="blackburn_rovers.png">Blackburn Rovers</option> <option value="bolton_wanderers.png">Bolton Wanderers</option> <option value="burnley.png">Burnley</option> <option value="chelsea.png">Chelsea</option> <option value="everton.png">Everton</option> <option value="fulham.png">Fulham</option> <option value="hull.png">Hull City</option> <option value="liverpool.png">Liverpool</option> <option value="manchester_city.png">Manchester City</option> <option value="manchester_united.png">Manchester United</option> <option value="portsmouth.png">Portsmouth</option> <option value="stoke_city.png">Stoke City</option> <option value="sunderland.png">Sunderland</option> <option value="tottenham_hotspur.png">Tottenham Hotspur</option> <option value="west_ham.png">West Ham</option> <option value="wigan_athletic.png">Wigan Athletic</option> <option value="wolverhampton_wanderers.png">Wolverhampton Wanderers</option> </select> </form> Code: function changeDivImage(url) { document.getElementById("third_col").style.backgroundImage = "url('images/" + url + "')"; } thank you in advance My page is trying to set some cookies with semi-colons in some of the values, but (in Firefox) they are not being saved correctly - the saved values are being truncated at the semi-colon... (So, for example, instead of saving the value "name;age;" in the cookie, only "name" is being being saved. Presumably, you aren't allowed semi-colons in cookie values? Does anyone know what other characters are not allowed? Thanks, James Hi, not sure weather this is the right category because it is related to phpBB but I Have tried there forums, with no luck! I think I'm in the right section though. Basically, I am building in the sessions and users of my forum into my personal site. I am using the following script to check if users are logged on: Code: <?php define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../computerhelp/'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup(); ?> Your existing page goes here <?php if ($user->data['user_id'] == ANONYMOUS) { echo 'Please login!'; } else { echo 'Thanks for logging in, ' . $user->data['username_clean']; } ?> I want to redirect visitors to a page on my site if they are not logged on, but can not figure out how to do it. Please can someone help me? 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 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! So I've got a form with some input text. In addition to the data in the input text I want to send some other data that has already been predetermined on initial page load. How would I declare the other data within the form element? Thanks Hi Experts, I am designing a webpage where based on the year selection the associated years webtable needs to be displayed in the webpage. Pls give som suggestions and if possible the code on to how to code this using HTML and Jav Script. I know I have to write afunction and then call the fn based on the input.but need your help on this. Thanks, Bsquare 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 |