I have this line:

document.cookie =textbox+this.getParameterByName("idProd")+'='+document.getElementById('name').value+'; domain=mydomain.com; expires='+dia.toGMTString()+'; path=/';

This cookie should work on the mydomain.com and all of its subdomains to read and write, correct??? Doesnt work online but works on local thats why I ask.

Thanks!

Recommended Answers

IIRC, it was something like this: document.cookie = "key=value,path=/;domain=example.com";

Jump to Post

Not sure.

Jump to Post

All 8 Replies

Noone has any idea about this?

IIRC, it was something like this: document.cookie = "key=value,path=/;domain=example.com";

Order matters?

Not sure.

Well thanks but helpful isnt exactly what I call you answer

Thank you pritaeas....

The way I have it implanted should work but nothing.......

This page states that domain should start with a dot.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.