HTML - Cookie Values - Illegal Characters?
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 Similar TutorialsHello, I receive the following error when I try to set the value with sharp. How can I solve this problem ? HTML Code: <div name="palette" dojoType="dijit.ColorPalette" value="#FFFFFF"> </div> HTML Code: value="#FFFFFF" illegal character [Break on this error] (#FFFFFF) 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 am relatively new to HTML and ASP and have been asked to help update intranet and website pages for a company who very suddenly found themselves without a web developer. I took pages that are currently on the website and changed the content to show the new press release. Everything works absolutely fine in various browser, various versions of browsers and operating systems. The one thing that worries me is I did not use reserved characters anywhere, where I noticed the previous web developer did. Should I have used them or is it not needed anymore as browsers have changed? Is it may be needed for software used by the visually impaired? Examples of where she used it: New Zealand - I just used New Zealand “ and ” - where I just used " " Any help would be much appreciated! I have a problem with IE6 and 7 not rendering a special character, the double up arrow, "& u A r r ;" <a rel="nofollow" href="#top">⇑</a> content="text/html; charset=iso-8859-1"> I am using the special character as link text to get the user to the top of a very, very long page with a single click. The character renders properly in FF, OP and SA. To my dismay, I just discovered that IE renders it as a box on top of the link underline. Is there any simple way, css, magic, etc., that I can get this character to render properly? The single up arrow renders, but looks anemic, and I don't want to have "Top" appearing at the end of every paragraph. (I don't want the search engines to think I am stuffing the keyword "Top".) Two single up arrows looks strange. I'm afraid to use an image since I could encounter position problems with different browsers. While suggestions for alternative design solutions are welcome, I am really after a technical a way to use the double up arrow in IE. The page: http://www.iaps.com/list-of-internet...ns-199010.html Thanks Hello, I have a web page that is built using components. The footer of the page is a component. When building the page, the footer is added using a glob. In the footer, there is supposed to be a bunch of Korean characters. Currently, they are not displaying properly. When the glob is viewed alone, it is still incorrect. However, if the source is viewed, the Korean characters are correct in the source, but are displaying incorrectly in the page. The charset is already set to UTF-8. What could be the issue here? 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, 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! Hi 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:* Hi, I am currently doing some work on our companies website. As part of this we want to add product codes to keywords to improve rankings in Google, however most of our codes include a forward slash (/), e.g. CC/250S. Does anyone know if the forward slash is a valid symbol in the keywords field, or would this make cause problems in the code? Hi, I try to display my string "as is" in HTML page. I know the solution is escape characters. I know I can use a couple of pairs, like this Code: strResult = ReplaceCharacters(strSource, chr(38), "&") strResult = ReplaceCharacters(strSource, chr(60), "<") strResult = ReplaceCharacters(strSource, chr(62), ">") strResult = ReplaceCharacters(strSource, chr(10), "<br />") strResult = ReplaceCharacters(strSource, chr(34), """) strResult = ReplaceCharacters(strSource, chr(160), " ") which should be pretty easy to understand, just replaces characters with HTML escape characters. How about replacing a tab (chr(11)) with HTML code? Is there any escape character for that? Is there some others that I should add to my code? Hello, I have a site with UTF-8 encoding. The site uses some japanese characters. However some customer complains that they can see only small boxes instead of the japanese characters both with IE and Firefox. It is probably OS related as the problem occurs only on XP machines (at least until now). But not all XP shows the wrong characters only some of them. Any idea what to suggest to the visitors? Thanks in advance! I am reading this: Quote: Another important special character you should know about is the & character. If you'd like to have an & in your html content, use the character entity & instead of the & character itself. I don't understand the entire paragraph above, can any give an example of the above or explain in another way please? How can I limit the number of characters that will be shown from a field of a DDBB on a td ? Thanks, Ignacio Francisco Penin What is the most simple code that trims text past x characters? I dont need a ...more link or anything, just the trim. 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 |