Jump to content

Search the Community

Showing results for tags 'url parameter'.



More search options

  • 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 1 result

  1. I'm trying to erase completely a cookie that is set if a particular URL parameter is present.I've tried: function delete_cookie( name ) {document.cookie = name + '=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';} And it sets the cookie value to null but the cookie itself or at least the name of the cookie stays in the browser so that when the same URL is opened again, it will not update the cookie value from null to XXX nor is a second cookie with the URL value created.For the new cookie to be setup again I have to right-click on the cookie name (in Chrome) and choose delete. This way the cookie name and its value null are truly erased otherwise it stays with null value.How can I completely erase the cookie file and not just set it to null with javascript?I should mention that I also have the following function to grab the cookie from the URL parameter and to keep it from the first page until the final page (where it should be deleted after the cookie value is added as the value of an external URL parameter to an external within the final page). The second page will turn the original link into a session where the URL parameter is no longer visible.The link would be: http://xxxx.test.yyyy/index.html?myparameter[zzzzzz]=ddddd Here is the code for it:function URLparam(name) {return unescape((RegExp(name + '(?:[d+])?=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]);}$(document).ready(function () {if (URLparam("MyParameter") !== null && !get_cookie ("MyCookie")) {set_cookie ("MyCookie", URLparam("MyParameter"));} Any ideas?
×
×
  • Create New...