473,805 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Client Side Cookies IIS, HELP!

OK,

I created a .htm page within a new Web solution:
--------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Menu</title>
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="http://schemas.microso ft.com/intellisense/ie5">
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1">
<meta name=ProgId content=VisualS tudio.HTML>
<meta name=Originator content="Micros oft Visual Studio .NET 7.1">

<style>
<!--
#foldheader{cur sor:pointer;cur sor:hand ; font-weight:bold ;
list-style-image:url(fold. gif)}
#foldinglist{li st-style-image:url(list. gif)}
//-->
</style>
<script language="JavaS cript1.2">
<!--

//Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/02)
//For full source code and more DHTML scripts, visit
http://www.dynamicdrive.com
//This credit MUST stay intact for use

var head="display:' '"
img1=new Image()
img1.src="fold. gif"
img2=new Image()
img2.src="open. gif"

var ns6=document.ge tElementById&&! document.all
var ie4=document.al l&&navigator.us erAgent.indexOf ("Opera")==-1

function checkcontained( e){
var iscontained=0
cur=ns6? e.target : event.srcElemen t
i=0
if (cur.id=="foldh eader")
iscontained=1
else
while (ns6&&cur.paren tNode||(ie4&&cu r.parentElement )){
if (cur.id=="foldh eader"||cur.id= ="foldinglist") {
iscontained=(cu r.id=="foldhead er")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentEleme nt
}

if (iscontained){
var foldercontent=n s6? cur.nextSibling .nextSibling : cur.all.tags("U L")[0]
if (foldercontent. style.display== "none"){
foldercontent.s tyle.display=""
cur.style.listS tyleImage="url( open.gif)"
}
else{
foldercontent.s tyle.display="n one"
cur.style.listS tyleImage="url( fold.gif)"
}
}
}

if (ie4||ns6)
document.onclic k=checkcontaine d

//-->
</script>

</head>
<body MS_POSITIONING= "GridLayout ">
<font face="Verdana">

<ul>
<li id="foldheader" >News</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.cnn.com">CN N</a></li>
<li><a href="http://www.abcnews.com ">ABC News</a></li>
<li><a href="http://www.news.bbc.co .uk">BBC News</a></li>
</ul>

<li id="foldheader" >Webmaster</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">Dynamic Drive</a></li>
<li><a href="http://www.javascriptk it.com">JavaScr ipt Kit</a></li>
<li><a href="http://www.freewarejav a.com">Freeware java.com</a></li>
</ul>

<li id="foldheader" >Nested Example</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">outer 1</a></li>
<li><a href="http://www.dynamicdriv e.com">outer 2</a></li>
<li id="foldheader" >Nested</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">nested 1</a></li>
<li><a href="http://www.dynamicdriv e.com">nested 2</a></li>
</ul>
<li><a href="http://www.dynamicdriv e.com">outer 3</a></li>
<li><a href="http://www.dynamicdriv e.com">outer 4</a></li>
</ul>
</ul>

</font>

<p align="center"> <font face="Arial" size="-2">Free DHTML scripts provided
by<br>
<a href="http://www.dynamicdriv e.com">Dynamic Drive</a></font></p>

<script language="JavaS cript1.2">
<!--

function get_cookie(Name ) {
//Get cookie routine by Shelley Powers
var search = Name + "="
var returnvalue = "";
if (document.cooki e.length > 0) {
offset = document.cookie .indexOf(search )
// if cookie exists
if (offset != -1) {
offset += search.length
// set index of beginning of value
end = document.cookie .indexOf(";", offset);
// set index of end of cookie value
if (end == -1) end = document.cookie .length;
returnvalue=une scape(document. cookie.substrin g(offset, end))
}
}
return returnvalue;
}

var foldercontentar ray=new Array()
var c=0

if (ns6){
for (i=0;i<document .getElementsByT agName("UL").le ngth;i++){
if (document.getEl ementsByTagName ("UL")[i].id=="foldingli st"){
foldercontentar ray[c]=document.getEl ementsByTagName ("UL")[i]
c++
}
}
}

if (get_cookie(win dow.location.pa thname) != ''){
var openresults=get _cookie(window. location.pathna me).split(" ")
for (i=0 ; i < openresults.len gth ; i++){
if (ns6){
foldercontentar ray[openresults[i]].style.display= ''

foldercontentar ray[openresults[i]].previousSiblin g.previousSibli ng.style.lis
tStyleImage="ur l(open.gif)"
}
else{
foldinglist[openresults[i]].style.display= ''


document.all[foldinglist[openresults[i]].sourceIndex -1].style.listStyl eImag
e="url(open.gif )"
}
}
}

if (ns6||ie4){
var nodelength=ns6? c-1 : foldinglist.len gth-1
var nodes=new Array(nodelengt h)
var openones=''
}

function checkit(){
for (i=0 ; i <= nodelength ; i++){
if
((ns6&&folderco ntentarray[i].style.display= ='')||(ie4&&fol dinglist[i].style.
display==''))
openones=openon es + " " + i
}
document.cookie =window.locatio n.pathname+"="+ openones
}

if (ns6||ie4)
window.onunload =checkit
//-->
</script>

</body>
</html>
--------------------------------------------------------

When I compile it, or run it straight from IIS, it will not keep cookie
state for the menu selection (not-working).

When I open the webroot folder directly from the C drive (windows explorer)
and dclick the .htm file, it opens and it keeps cookie state on the menus
(working)

What do I have to configure in order to make this work when I run the page
from IIS??

Thanks!

-Todd
Nov 17 '05 #1
33 2478
"Todd" <ts****@smithda ta.net> wrote in message
news:OW******** ******@TK2MSFTN GP12.phx.gbl...
OK,

I created a .htm page within a new Web solution:


....

Todd,

IIS has nothing to do with cookies.

The difference you may be seeing would be between requesting the page via a
http: url and requesting it via a file: URL (which I believe is what happens
when you just double click in Windows Explorer). In particular, the domain
of the cookie may not match.

There's no way I'm going to read such a large amount of code looking for
this problem. I recommend that you isolate this problem down to just the
cookie issue and see if that helps you. If not, then please post the much
smaller reproducer and I'll be glad to take a look.

Maybe someone else with more patience can see the problem right away?
--
John Saunders
Internet Engineer
jo***********@s urfcontrol.com
Nov 17 '05 #2
Todd,

When I run this code on my machine I get the same result both ways "dclick"
or browse it
I can not go through the entire code but what are the bad simptoms??
"Todd" <ts****@smithda ta.net> wrote in message
news:OW******** ******@TK2MSFTN GP12.phx.gbl...
OK,

I created a .htm page within a new Web solution:
--------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Menu</title>
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="http://schemas.microso ft.com/intellisense/ie5">
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1">
<meta name=ProgId content=VisualS tudio.HTML>
<meta name=Originator content="Micros oft Visual Studio .NET 7.1">

<style>
<!--
#foldheader{cur sor:pointer;cur sor:hand ; font-weight:bold ;
list-style-image:url(fold. gif)}
#foldinglist{li st-style-image:url(list. gif)}
//-->
</style>
<script language="JavaS cript1.2">
<!--

//Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/02)
//For full source code and more DHTML scripts, visit
http://www.dynamicdrive.com
//This credit MUST stay intact for use

var head="display:' '"
img1=new Image()
img1.src="fold. gif"
img2=new Image()
img2.src="open. gif"

var ns6=document.ge tElementById&&! document.all
var ie4=document.al l&&navigator.us erAgent.indexOf ("Opera")==-1

function checkcontained( e){
var iscontained=0
cur=ns6? e.target : event.srcElemen t
i=0
if (cur.id=="foldh eader")
iscontained=1
else
while (ns6&&cur.paren tNode||(ie4&&cu r.parentElement )){
if (cur.id=="foldh eader"||cur.id= ="foldinglist") {
iscontained=(cu r.id=="foldhead er")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentEleme nt
}

if (iscontained){
var foldercontent=n s6? cur.nextSibling .nextSibling : cur.all.tags("U L")[0]
if (foldercontent. style.display== "none"){
foldercontent.s tyle.display=""
cur.style.listS tyleImage="url( open.gif)"
}
else{
foldercontent.s tyle.display="n one"
cur.style.listS tyleImage="url( fold.gif)"
}
}
}

if (ie4||ns6)
document.onclic k=checkcontaine d

//-->
</script>

</head>
<body MS_POSITIONING= "GridLayout ">
<font face="Verdana">

<ul>
<li id="foldheader" >News</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.cnn.com">CN N</a></li>
<li><a href="http://www.abcnews.com ">ABC News</a></li>
<li><a href="http://www.news.bbc.co .uk">BBC News</a></li>
</ul>

<li id="foldheader" >Webmaster</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">Dynamic Drive</a></li>
<li><a href="http://www.javascriptk it.com">JavaScr ipt Kit</a></li>
<li><a href="http://www.freewarejav a.com">Freeware java.com</a></li>
</ul>

<li id="foldheader" >Nested Example</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">outer 1</a></li>
<li><a href="http://www.dynamicdriv e.com">outer 2</a></li>
<li id="foldheader" >Nested</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">nested 1</a></li>
<li><a href="http://www.dynamicdriv e.com">nested 2</a></li>
</ul>
<li><a href="http://www.dynamicdriv e.com">outer 3</a></li>
<li><a href="http://www.dynamicdriv e.com">outer 4</a></li>
</ul>
</ul>

</font>

<p align="center"> <font face="Arial" size="-2">Free DHTML scripts provided
by<br>
<a href="http://www.dynamicdriv e.com">Dynamic Drive</a></font></p>

<script language="JavaS cript1.2">
<!--

function get_cookie(Name ) {
//Get cookie routine by Shelley Powers
var search = Name + "="
var returnvalue = "";
if (document.cooki e.length > 0) {
offset = document.cookie .indexOf(search )
// if cookie exists
if (offset != -1) {
offset += search.length
// set index of beginning of value
end = document.cookie .indexOf(";", offset);
// set index of end of cookie value
if (end == -1) end = document.cookie .length;
returnvalue=une scape(document. cookie.substrin g(offset, end))
}
}
return returnvalue;
}

var foldercontentar ray=new Array()
var c=0

if (ns6){
for (i=0;i<document .getElementsByT agName("UL").le ngth;i++){
if (document.getEl ementsByTagName ("UL")[i].id=="foldingli st"){
foldercontentar ray[c]=document.getEl ementsByTagName ("UL")[i]
c++
}
}
}

if (get_cookie(win dow.location.pa thname) != ''){
var openresults=get _cookie(window. location.pathna me).split(" ")
for (i=0 ; i < openresults.len gth ; i++){
if (ns6){
foldercontentar ray[openresults[i]].style.display= ''

foldercontentar ray[openresults[i]].previousSiblin g.previousSibli ng.style.lis tStyleImage="ur l(open.gif)"
}
else{
foldinglist[openresults[i]].style.display= ''


document.all[foldinglist[openresults[i]].sourceIndex -1].style.listStyl eImag e="url(open.gif )"
}
}
}

if (ns6||ie4){
var nodelength=ns6? c-1 : foldinglist.len gth-1
var nodes=new Array(nodelengt h)
var openones=''
}

function checkit(){
for (i=0 ; i <= nodelength ; i++){
if
((ns6&&folderco ntentarray[i].style.display= ='')||(ie4&&fol dinglist[i].style. display==''))
openones=openon es + " " + i
}
document.cookie =window.locatio n.pathname+"="+ openones
}

if (ns6||ie4)
window.onunload =checkit
//-->
</script>

</body>
</html>
--------------------------------------------------------

When I compile it, or run it straight from IIS, it will not keep cookie
state for the menu selection (not-working).

When I open the webroot folder directly from the C drive (windows explorer) and dclick the .htm file, it opens and it keeps cookie state on the menus
(working)

What do I have to configure in order to make this work when I run the page
from IIS??

Thanks!

-Todd

Nov 17 '05 #3
Todd,

When I run this code on my machine I get the same result both ways "dclick"
or browse it
I can not go through the entire code but what are the bad simptoms??
"Todd" <ts****@smithda ta.net> wrote in message
news:OW******** ******@TK2MSFTN GP12.phx.gbl...
OK,

I created a .htm page within a new Web solution:
--------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Menu</title>
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="http://schemas.microso ft.com/intellisense/ie5">
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1">
<meta name=ProgId content=VisualS tudio.HTML>
<meta name=Originator content="Micros oft Visual Studio .NET 7.1">

<style>
<!--
#foldheader{cur sor:pointer;cur sor:hand ; font-weight:bold ;
list-style-image:url(fold. gif)}
#foldinglist{li st-style-image:url(list. gif)}
//-->
</style>
<script language="JavaS cript1.2">
<!--

//Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/02)
//For full source code and more DHTML scripts, visit
http://www.dynamicdrive.com
//This credit MUST stay intact for use

var head="display:' '"
img1=new Image()
img1.src="fold. gif"
img2=new Image()
img2.src="open. gif"

var ns6=document.ge tElementById&&! document.all
var ie4=document.al l&&navigator.us erAgent.indexOf ("Opera")==-1

function checkcontained( e){
var iscontained=0
cur=ns6? e.target : event.srcElemen t
i=0
if (cur.id=="foldh eader")
iscontained=1
else
while (ns6&&cur.paren tNode||(ie4&&cu r.parentElement )){
if (cur.id=="foldh eader"||cur.id= ="foldinglist") {
iscontained=(cu r.id=="foldhead er")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentEleme nt
}

if (iscontained){
var foldercontent=n s6? cur.nextSibling .nextSibling : cur.all.tags("U L")[0]
if (foldercontent. style.display== "none"){
foldercontent.s tyle.display=""
cur.style.listS tyleImage="url( open.gif)"
}
else{
foldercontent.s tyle.display="n one"
cur.style.listS tyleImage="url( fold.gif)"
}
}
}

if (ie4||ns6)
document.onclic k=checkcontaine d

//-->
</script>

</head>
<body MS_POSITIONING= "GridLayout ">
<font face="Verdana">

<ul>
<li id="foldheader" >News</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.cnn.com">CN N</a></li>
<li><a href="http://www.abcnews.com ">ABC News</a></li>
<li><a href="http://www.news.bbc.co .uk">BBC News</a></li>
</ul>

<li id="foldheader" >Webmaster</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">Dynamic Drive</a></li>
<li><a href="http://www.javascriptk it.com">JavaScr ipt Kit</a></li>
<li><a href="http://www.freewarejav a.com">Freeware java.com</a></li>
</ul>

<li id="foldheader" >Nested Example</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">outer 1</a></li>
<li><a href="http://www.dynamicdriv e.com">outer 2</a></li>
<li id="foldheader" >Nested</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">nested 1</a></li>
<li><a href="http://www.dynamicdriv e.com">nested 2</a></li>
</ul>
<li><a href="http://www.dynamicdriv e.com">outer 3</a></li>
<li><a href="http://www.dynamicdriv e.com">outer 4</a></li>
</ul>
</ul>

</font>

<p align="center"> <font face="Arial" size="-2">Free DHTML scripts provided
by<br>
<a href="http://www.dynamicdriv e.com">Dynamic Drive</a></font></p>

<script language="JavaS cript1.2">
<!--

function get_cookie(Name ) {
//Get cookie routine by Shelley Powers
var search = Name + "="
var returnvalue = "";
if (document.cooki e.length > 0) {
offset = document.cookie .indexOf(search )
// if cookie exists
if (offset != -1) {
offset += search.length
// set index of beginning of value
end = document.cookie .indexOf(";", offset);
// set index of end of cookie value
if (end == -1) end = document.cookie .length;
returnvalue=une scape(document. cookie.substrin g(offset, end))
}
}
return returnvalue;
}

var foldercontentar ray=new Array()
var c=0

if (ns6){
for (i=0;i<document .getElementsByT agName("UL").le ngth;i++){
if (document.getEl ementsByTagName ("UL")[i].id=="foldingli st"){
foldercontentar ray[c]=document.getEl ementsByTagName ("UL")[i]
c++
}
}
}

if (get_cookie(win dow.location.pa thname) != ''){
var openresults=get _cookie(window. location.pathna me).split(" ")
for (i=0 ; i < openresults.len gth ; i++){
if (ns6){
foldercontentar ray[openresults[i]].style.display= ''

foldercontentar ray[openresults[i]].previousSiblin g.previousSibli ng.style.lis tStyleImage="ur l(open.gif)"
}
else{
foldinglist[openresults[i]].style.display= ''


document.all[foldinglist[openresults[i]].sourceIndex -1].style.listStyl eImag e="url(open.gif )"
}
}
}

if (ns6||ie4){
var nodelength=ns6? c-1 : foldinglist.len gth-1
var nodes=new Array(nodelengt h)
var openones=''
}

function checkit(){
for (i=0 ; i <= nodelength ; i++){
if
((ns6&&folderco ntentarray[i].style.display= ='')||(ie4&&fol dinglist[i].style. display==''))
openones=openon es + " " + i
}
document.cookie =window.locatio n.pathname+"="+ openones
}

if (ns6||ie4)
window.onunload =checkit
//-->
</script>

</body>
</html>
--------------------------------------------------------

When I compile it, or run it straight from IIS, it will not keep cookie
state for the menu selection (not-working).

When I open the webroot folder directly from the C drive (windows explorer) and dclick the .htm file, it opens and it keeps cookie state on the menus
(working)

What do I have to configure in order to make this work when I run the page
from IIS??

Thanks!

-Todd

Nov 17 '05 #4
Dan
if your machine name has an underscore in it that can also
cause problems.

Dan

-----Original Message-----
OK,

I created a .htm page within a new Web solution:
--------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
<head>
<title>Menu</title>
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="htt p://schemas.microso ft.com/intellisense/ie5">
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1"><meta name=ProgId content=VisualS tudio.HTML>
<meta name=Originator content="Micros oft Visual Studio .NET 7.1">
<style>
<!--
#foldheader{cu rsor:pointer;cu rsor:hand ; font- weight:bold ;list-style-image:url(fold. gif)}
#foldinglist{l ist-style-image:url(list. gif)}
//-->
</style>
<script language="JavaS cript1.2">
<!--

//Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/02)//For full source code and more DHTML scripts, visit
http://www.dynamicdrive.com
//This credit MUST stay intact for use

var head="display:' '"
img1=new Image()
img1.src="fold .gif"
img2=new Image()
img2.src="open .gif"

var ns6=document.ge tElementById&&! document.all
var ie4=document.al l&&navigator.us erAgent.indexOf ("Opera") ==-1
function checkcontained( e){
var iscontained=0
cur=ns6? e.target : event.srcElemen t
i=0
if (cur.id=="foldh eader")
iscontained= 1
else
while (ns6&&cur.paren tNode||(ie4&&cu r.parentElement )){
if (cur.id=="foldh eader"||cur.id= ="foldinglist") {
iscontained=(c ur.id=="foldhea der")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentEleme nt
}

if (iscontained){
var foldercontent=n s6? cur.nextSibling .nextSibling : cur.all.tags("U L")[0]if (foldercontent. style.display== "none"){
foldercontent. style.display=" "
cur.style.list StyleImage="url (open.gif)"
}
else{
foldercontent. style.display=" none"
cur.style.list StyleImage="url (fold.gif)"
}
}
}

if (ie4||ns6)
document.oncli ck=checkcontain ed

//-->
</script>

</head>
<body MS_POSITIONING= "GridLayout ">
<font face="Verdana">

<ul>
<li id="foldheader" >News</li>
<ul id="foldinglist " style="display: none" style=& {head};> <li><a href="http://www.cnn.com">CN N</a></li>
<li><a href="http://www.abcnews.com ">ABC News</a></li> <li><a href="http://www.news.bbc.co .uk">BBC News</a></li> </ul>

<li id="foldheader" >Webmaster</li>
<ul id="foldinglist " style="display: none" style=& {head};> <li><a href="http://www.dynamicdriv e.com">Dynamic Drive</a></li> <li><a href="http://www.javascriptk it.com">JavaScr ipt Kit</a></li> <li><a href="http://www.freewarejav a.com">Freeware java.com</a></li
</ul>

<li id="foldheader" >Nested Example</li>
<ul id="foldinglist " style="display: none" style=& {head};> <li><a href="http://www.dynamicdriv e.com">outer 1</a></li> <li><a href="http://www.dynamicdriv e.com">outer 2</a></li> <li id="foldheader" >Nested</li>
<ul id="foldinglist " style="display: none" style=& {head};> <li><a href="http://www.dynamicdriv e.com">nested 1</a></li> <li><a href="http://www.dynamicdriv e.com">nested 2</a></li> </ul>
<li><a href="http://www.dynamicdriv e.com">outer 3</a></li> <li><a href="http://www.dynamicdriv e.com">outer 4</a></li> </ul>
</ul>

</font>

<p align="center"> <font face="Arial" size="-2">Free DHTML scripts providedby<br>
<a href="http://www.dynamicdriv e.com">Dynamic Drive</a></font></p>
<script language="JavaS cript1.2">
<!--

function get_cookie(Name ) {
//Get cookie routine by Shelley Powers
var search = Name + "="
var returnvalue = "";
if (document.cooki e.length > 0) {
offset = document.cookie .indexOf(search )
// if cookie exists
if (offset != -1) {
offset += search.length
// set index of beginning of value
end = document.cookie .indexOf(";", offset);
// set index of end of cookie value
if (end == -1) end = document.cookie .length;
returnvalue=une scape(document. cookie.substrin g (offset, end)) }
}
return returnvalue;
}

var foldercontentar ray=new Array()
var c=0

if (ns6){
for (i=0;i<document .getElementsByT agName("UL").le ngth;i++) {if (document.getEl ementsByTagName ("UL") [i].id=="foldingli st"){foldercontenta rray[c]=document.getEl ementsByTagName ("UL") [i]c++
}
}
}

if (get_cookie(win dow.location.pa thname) != ''){
var openresults=get _cookie (window.locatio n.pathname).spl it(" ") for (i=0 ; i < openresults.len gth ; i++){
if (ns6){
foldercontentar ray[openresults[i]].style.display= ''

foldercontenta rray[openresults [i]].previousSiblin g.previousSibli ng.style.listStyleImage="u rl(open.gif)"
}
else{
foldinglist[openresults[i]].style.display= ''


document.all[foldinglist[openresults[i]].sourceIndex - 1].style.listStyl eImage="url(open.gi f)"
}
}
}

if (ns6||ie4){
var nodelength=ns6? c-1 : foldinglist.len gth-1
var nodes=new Array(nodelengt h)
var openones=''
}

function checkit(){
for (i=0 ; i <= nodelength ; i++){
if
((ns6&&folderc ontentarray[i].style.display= ='')|| (ie4&&foldingli st[i].style.display=='') )
openones=openon es + " " + i
}
document.cookie =window.locatio n.pathname+"="+ openones
}

if (ns6||ie4)
window.onunloa d=checkit
//-->
</script>

</body>
</html>
--------------------------------------------------------

When I compile it, or run it straight from IIS, it will not keep cookiestate for the menu selection (not-working).

When I open the webroot folder directly from the C drive (windows explorer)and dclick the .htm file, it opens and it keeps cookie state on the menus(working)

What do I have to configure in order to make this work when I run the pagefrom IIS??

Thanks!

-Todd
.

Nov 17 '05 #5
Guys, I don't think its problems with the source code.

When I open the page via http://localhost/Menu.htm each time I expand a menu
and refresh the page, the menus always default to all being closed - not
writing to the document.cookie (stateless)

When I open the page via C:\Inetpub\wwwr oot\Menu.htm each time I expand a
menu and refresh the page, the menus keep state, code writes to the
document.cookie .

All I am trying to do is add/implement a static tree navigation menu into an
ASP.NET application I have coded - and I want to keep the navigation state
(which menus the user has expanded, etc) on the client, not the server..

It was not a problem in the asp environment, but seems to be killing me in
asp.net
hehe

I can't figure out why it will not write to the document.cookie when I call
the page via http...
"MS News (MS ILM)" <sq**********@h otmail.com> wrote in message
news:Or******** ******@TK2MSFTN GP12.phx.gbl...
Todd,

When I run this code on my machine I get the same result both ways "dclick" or browse it
I can not go through the entire code but what are the bad simptoms??
"Todd" <ts****@smithda ta.net> wrote in message
news:OW******** ******@TK2MSFTN GP12.phx.gbl...
OK,

I created a .htm page within a new Web solution:
--------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Menu</title>
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="http://schemas.microso ft.com/intellisense/ie5">
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1">
<meta name=ProgId content=VisualS tudio.HTML>
<meta name=Originator content="Micros oft Visual Studio .NET 7.1">

<style>
<!--
#foldheader{cur sor:pointer;cur sor:hand ; font-weight:bold ;
list-style-image:url(fold. gif)}
#foldinglist{li st-style-image:url(list. gif)}
//-->
</style>
<script language="JavaS cript1.2">
<!--

//Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/02)
//For full source code and more DHTML scripts, visit
http://www.dynamicdrive.com
//This credit MUST stay intact for use

var head="display:' '"
img1=new Image()
img1.src="fold. gif"
img2=new Image()
img2.src="open. gif"

var ns6=document.ge tElementById&&! document.all
var ie4=document.al l&&navigator.us erAgent.indexOf ("Opera")==-1

function checkcontained( e){
var iscontained=0
cur=ns6? e.target : event.srcElemen t
i=0
if (cur.id=="foldh eader")
iscontained=1
else
while (ns6&&cur.paren tNode||(ie4&&cu r.parentElement )){
if (cur.id=="foldh eader"||cur.id= ="foldinglist") {
iscontained=(cu r.id=="foldhead er")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentEleme nt
}

if (iscontained){
var foldercontent=n s6? cur.nextSibling .nextSibling : cur.all.tags("U L")[0] if (foldercontent. style.display== "none"){
foldercontent.s tyle.display=""
cur.style.listS tyleImage="url( open.gif)"
}
else{
foldercontent.s tyle.display="n one"
cur.style.listS tyleImage="url( fold.gif)"
}
}
}

if (ie4||ns6)
document.onclic k=checkcontaine d

//-->
</script>

</head>
<body MS_POSITIONING= "GridLayout ">
<font face="Verdana">

<ul>
<li id="foldheader" >News</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.cnn.com">CN N</a></li>
<li><a href="http://www.abcnews.com ">ABC News</a></li>
<li><a href="http://www.news.bbc.co .uk">BBC News</a></li>
</ul>

<li id="foldheader" >Webmaster</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">Dynamic Drive</a></li>
<li><a href="http://www.javascriptk it.com">JavaScr ipt Kit</a></li>
<li><a href="http://www.freewarejav a.com">Freeware java.com</a></li> </ul>

<li id="foldheader" >Nested Example</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">outer 1</a></li>
<li><a href="http://www.dynamicdriv e.com">outer 2</a></li>
<li id="foldheader" >Nested</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">nested 1</a></li>
<li><a href="http://www.dynamicdriv e.com">nested 2</a></li>
</ul>
<li><a href="http://www.dynamicdriv e.com">outer 3</a></li>
<li><a href="http://www.dynamicdriv e.com">outer 4</a></li>
</ul>
</ul>

</font>

<p align="center"> <font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://www.dynamicdriv e.com">Dynamic Drive</a></font></p>

<script language="JavaS cript1.2">
<!--

function get_cookie(Name ) {
//Get cookie routine by Shelley Powers
var search = Name + "="
var returnvalue = "";
if (document.cooki e.length > 0) {
offset = document.cookie .indexOf(search )
// if cookie exists
if (offset != -1) {
offset += search.length
// set index of beginning of value
end = document.cookie .indexOf(";", offset);
// set index of end of cookie value
if (end == -1) end = document.cookie .length;
returnvalue=une scape(document. cookie.substrin g(offset, end))
}
}
return returnvalue;
}

var foldercontentar ray=new Array()
var c=0

if (ns6){
for (i=0;i<document .getElementsByT agName("UL").le ngth;i++){
if (document.getEl ementsByTagName ("UL")[i].id=="foldingli st"){
foldercontentar ray[c]=document.getEl ementsByTagName ("UL")[i]
c++
}
}
}

if (get_cookie(win dow.location.pa thname) != ''){
var openresults=get _cookie(window. location.pathna me).split(" ")
for (i=0 ; i < openresults.len gth ; i++){
if (ns6){
foldercontentar ray[openresults[i]].style.display= ''

foldercontentar ray[openresults[i]].previousSiblin g.previousSibli ng.style.lis
tStyleImage="ur l(open.gif)"
}
else{
foldinglist[openresults[i]].style.display= ''


document.all[foldinglist[openresults[i]].sourceIndex -1].style.listStyl eImag
e="url(open.gif )"
}
}
}

if (ns6||ie4){
var nodelength=ns6? c-1 : foldinglist.len gth-1
var nodes=new Array(nodelengt h)
var openones=''
}

function checkit(){
for (i=0 ; i <= nodelength ; i++){
if

((ns6&&folderco ntentarray[i].style.display= ='')||(ie4&&fol dinglist[i].style.
display==''))
openones=openon es + " " + i
}
document.cookie =window.locatio n.pathname+"="+ openones
}

if (ns6||ie4)
window.onunload =checkit
//-->
</script>

</body>
</html>
--------------------------------------------------------

When I compile it, or run it straight from IIS, it will not keep cookie
state for the menu selection (not-working).

When I open the webroot folder directly from the C drive (windows

explorer)
and dclick the .htm file, it opens and it keeps cookie state on the menus (working)

What do I have to configure in order to make this work when I run the page from IIS??

Thanks!

-Todd


Nov 17 '05 #6
Dan
if your machine name has an underscore in it that can also
cause problems.

Dan

-----Original Message-----
OK,

I created a .htm page within a new Web solution:
--------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
<head>
<title>Menu</title>
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="htt p://schemas.microso ft.com/intellisense/ie5">
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1"><meta name=ProgId content=VisualS tudio.HTML>
<meta name=Originator content="Micros oft Visual Studio .NET 7.1">
<style>
<!--
#foldheader{cu rsor:pointer;cu rsor:hand ; font- weight:bold ;list-style-image:url(fold. gif)}
#foldinglist{l ist-style-image:url(list. gif)}
//-->
</style>
<script language="JavaS cript1.2">
<!--

//Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/02)//For full source code and more DHTML scripts, visit
http://www.dynamicdrive.com
//This credit MUST stay intact for use

var head="display:' '"
img1=new Image()
img1.src="fold .gif"
img2=new Image()
img2.src="open .gif"

var ns6=document.ge tElementById&&! document.all
var ie4=document.al l&&navigator.us erAgent.indexOf ("Opera") ==-1
function checkcontained( e){
var iscontained=0
cur=ns6? e.target : event.srcElemen t
i=0
if (cur.id=="foldh eader")
iscontained= 1
else
while (ns6&&cur.paren tNode||(ie4&&cu r.parentElement )){
if (cur.id=="foldh eader"||cur.id= ="foldinglist") {
iscontained=(c ur.id=="foldhea der")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentEleme nt
}

if (iscontained){
var foldercontent=n s6? cur.nextSibling .nextSibling : cur.all.tags("U L")[0]if (foldercontent. style.display== "none"){
foldercontent. style.display=" "
cur.style.list StyleImage="url (open.gif)"
}
else{
foldercontent. style.display=" none"
cur.style.list StyleImage="url (fold.gif)"
}
}
}

if (ie4||ns6)
document.oncli ck=checkcontain ed

//-->
</script>

</head>
<body MS_POSITIONING= "GridLayout ">
<font face="Verdana">

<ul>
<li id="foldheader" >News</li>
<ul id="foldinglist " style="display: none" style=& {head};> <li><a href="http://www.cnn.com">CN N</a></li>
<li><a href="http://www.abcnews.com ">ABC News</a></li> <li><a href="http://www.news.bbc.co .uk">BBC News</a></li> </ul>

<li id="foldheader" >Webmaster</li>
<ul id="foldinglist " style="display: none" style=& {head};> <li><a href="http://www.dynamicdriv e.com">Dynamic Drive</a></li> <li><a href="http://www.javascriptk it.com">JavaScr ipt Kit</a></li> <li><a href="http://www.freewarejav a.com">Freeware java.com</a></li
</ul>

<li id="foldheader" >Nested Example</li>
<ul id="foldinglist " style="display: none" style=& {head};> <li><a href="http://www.dynamicdriv e.com">outer 1</a></li> <li><a href="http://www.dynamicdriv e.com">outer 2</a></li> <li id="foldheader" >Nested</li>
<ul id="foldinglist " style="display: none" style=& {head};> <li><a href="http://www.dynamicdriv e.com">nested 1</a></li> <li><a href="http://www.dynamicdriv e.com">nested 2</a></li> </ul>
<li><a href="http://www.dynamicdriv e.com">outer 3</a></li> <li><a href="http://www.dynamicdriv e.com">outer 4</a></li> </ul>
</ul>

</font>

<p align="center"> <font face="Arial" size="-2">Free DHTML scripts providedby<br>
<a href="http://www.dynamicdriv e.com">Dynamic Drive</a></font></p>
<script language="JavaS cript1.2">
<!--

function get_cookie(Name ) {
//Get cookie routine by Shelley Powers
var search = Name + "="
var returnvalue = "";
if (document.cooki e.length > 0) {
offset = document.cookie .indexOf(search )
// if cookie exists
if (offset != -1) {
offset += search.length
// set index of beginning of value
end = document.cookie .indexOf(";", offset);
// set index of end of cookie value
if (end == -1) end = document.cookie .length;
returnvalue=une scape(document. cookie.substrin g (offset, end)) }
}
return returnvalue;
}

var foldercontentar ray=new Array()
var c=0

if (ns6){
for (i=0;i<document .getElementsByT agName("UL").le ngth;i++) {if (document.getEl ementsByTagName ("UL") [i].id=="foldingli st"){foldercontenta rray[c]=document.getEl ementsByTagName ("UL") [i]c++
}
}
}

if (get_cookie(win dow.location.pa thname) != ''){
var openresults=get _cookie (window.locatio n.pathname).spl it(" ") for (i=0 ; i < openresults.len gth ; i++){
if (ns6){
foldercontentar ray[openresults[i]].style.display= ''

foldercontenta rray[openresults [i]].previousSiblin g.previousSibli ng.style.listStyleImage="u rl(open.gif)"
}
else{
foldinglist[openresults[i]].style.display= ''


document.all[foldinglist[openresults[i]].sourceIndex - 1].style.listStyl eImage="url(open.gi f)"
}
}
}

if (ns6||ie4){
var nodelength=ns6? c-1 : foldinglist.len gth-1
var nodes=new Array(nodelengt h)
var openones=''
}

function checkit(){
for (i=0 ; i <= nodelength ; i++){
if
((ns6&&folderc ontentarray[i].style.display= ='')|| (ie4&&foldingli st[i].style.display=='') )
openones=openon es + " " + i
}
document.cookie =window.locatio n.pathname+"="+ openones
}

if (ns6||ie4)
window.onunloa d=checkit
//-->
</script>

</body>
</html>
--------------------------------------------------------

When I compile it, or run it straight from IIS, it will not keep cookiestate for the menu selection (not-working).

When I open the webroot folder directly from the C drive (windows explorer)and dclick the .htm file, it opens and it keeps cookie state on the menus(working)

What do I have to configure in order to make this work when I run the pagefrom IIS??

Thanks!

-Todd
.

Nov 17 '05 #7
Guys, I don't think its problems with the source code.

When I open the page via http://localhost/Menu.htm each time I expand a menu
and refresh the page, the menus always default to all being closed - not
writing to the document.cookie (stateless)

When I open the page via C:\Inetpub\wwwr oot\Menu.htm each time I expand a
menu and refresh the page, the menus keep state, code writes to the
document.cookie .

All I am trying to do is add/implement a static tree navigation menu into an
ASP.NET application I have coded - and I want to keep the navigation state
(which menus the user has expanded, etc) on the client, not the server..

It was not a problem in the asp environment, but seems to be killing me in
asp.net
hehe

I can't figure out why it will not write to the document.cookie when I call
the page via http...
"MS News (MS ILM)" <sq**********@h otmail.com> wrote in message
news:Or******** ******@TK2MSFTN GP12.phx.gbl...
Todd,

When I run this code on my machine I get the same result both ways "dclick" or browse it
I can not go through the entire code but what are the bad simptoms??
"Todd" <ts****@smithda ta.net> wrote in message
news:OW******** ******@TK2MSFTN GP12.phx.gbl...
OK,

I created a .htm page within a new Web solution:
--------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Menu</title>
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="http://schemas.microso ft.com/intellisense/ie5">
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1">
<meta name=ProgId content=VisualS tudio.HTML>
<meta name=Originator content="Micros oft Visual Studio .NET 7.1">

<style>
<!--
#foldheader{cur sor:pointer;cur sor:hand ; font-weight:bold ;
list-style-image:url(fold. gif)}
#foldinglist{li st-style-image:url(list. gif)}
//-->
</style>
<script language="JavaS cript1.2">
<!--

//Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/02)
//For full source code and more DHTML scripts, visit
http://www.dynamicdrive.com
//This credit MUST stay intact for use

var head="display:' '"
img1=new Image()
img1.src="fold. gif"
img2=new Image()
img2.src="open. gif"

var ns6=document.ge tElementById&&! document.all
var ie4=document.al l&&navigator.us erAgent.indexOf ("Opera")==-1

function checkcontained( e){
var iscontained=0
cur=ns6? e.target : event.srcElemen t
i=0
if (cur.id=="foldh eader")
iscontained=1
else
while (ns6&&cur.paren tNode||(ie4&&cu r.parentElement )){
if (cur.id=="foldh eader"||cur.id= ="foldinglist") {
iscontained=(cu r.id=="foldhead er")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentEleme nt
}

if (iscontained){
var foldercontent=n s6? cur.nextSibling .nextSibling : cur.all.tags("U L")[0] if (foldercontent. style.display== "none"){
foldercontent.s tyle.display=""
cur.style.listS tyleImage="url( open.gif)"
}
else{
foldercontent.s tyle.display="n one"
cur.style.listS tyleImage="url( fold.gif)"
}
}
}

if (ie4||ns6)
document.onclic k=checkcontaine d

//-->
</script>

</head>
<body MS_POSITIONING= "GridLayout ">
<font face="Verdana">

<ul>
<li id="foldheader" >News</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.cnn.com">CN N</a></li>
<li><a href="http://www.abcnews.com ">ABC News</a></li>
<li><a href="http://www.news.bbc.co .uk">BBC News</a></li>
</ul>

<li id="foldheader" >Webmaster</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">Dynamic Drive</a></li>
<li><a href="http://www.javascriptk it.com">JavaScr ipt Kit</a></li>
<li><a href="http://www.freewarejav a.com">Freeware java.com</a></li> </ul>

<li id="foldheader" >Nested Example</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">outer 1</a></li>
<li><a href="http://www.dynamicdriv e.com">outer 2</a></li>
<li id="foldheader" >Nested</li>
<ul id="foldinglist " style="display: none" style=&{head};>
<li><a href="http://www.dynamicdriv e.com">nested 1</a></li>
<li><a href="http://www.dynamicdriv e.com">nested 2</a></li>
</ul>
<li><a href="http://www.dynamicdriv e.com">outer 3</a></li>
<li><a href="http://www.dynamicdriv e.com">outer 4</a></li>
</ul>
</ul>

</font>

<p align="center"> <font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://www.dynamicdriv e.com">Dynamic Drive</a></font></p>

<script language="JavaS cript1.2">
<!--

function get_cookie(Name ) {
//Get cookie routine by Shelley Powers
var search = Name + "="
var returnvalue = "";
if (document.cooki e.length > 0) {
offset = document.cookie .indexOf(search )
// if cookie exists
if (offset != -1) {
offset += search.length
// set index of beginning of value
end = document.cookie .indexOf(";", offset);
// set index of end of cookie value
if (end == -1) end = document.cookie .length;
returnvalue=une scape(document. cookie.substrin g(offset, end))
}
}
return returnvalue;
}

var foldercontentar ray=new Array()
var c=0

if (ns6){
for (i=0;i<document .getElementsByT agName("UL").le ngth;i++){
if (document.getEl ementsByTagName ("UL")[i].id=="foldingli st"){
foldercontentar ray[c]=document.getEl ementsByTagName ("UL")[i]
c++
}
}
}

if (get_cookie(win dow.location.pa thname) != ''){
var openresults=get _cookie(window. location.pathna me).split(" ")
for (i=0 ; i < openresults.len gth ; i++){
if (ns6){
foldercontentar ray[openresults[i]].style.display= ''

foldercontentar ray[openresults[i]].previousSiblin g.previousSibli ng.style.lis
tStyleImage="ur l(open.gif)"
}
else{
foldinglist[openresults[i]].style.display= ''


document.all[foldinglist[openresults[i]].sourceIndex -1].style.listStyl eImag
e="url(open.gif )"
}
}
}

if (ns6||ie4){
var nodelength=ns6? c-1 : foldinglist.len gth-1
var nodes=new Array(nodelengt h)
var openones=''
}

function checkit(){
for (i=0 ; i <= nodelength ; i++){
if

((ns6&&folderco ntentarray[i].style.display= ='')||(ie4&&fol dinglist[i].style.
display==''))
openones=openon es + " " + i
}
document.cookie =window.locatio n.pathname+"="+ openones
}

if (ns6||ie4)
window.onunload =checkit
//-->
</script>

</body>
</html>
--------------------------------------------------------

When I compile it, or run it straight from IIS, it will not keep cookie
state for the menu selection (not-working).

When I open the webroot folder directly from the C drive (windows

explorer)
and dclick the .htm file, it opens and it keeps cookie state on the menus (working)

What do I have to configure in order to make this work when I run the page from IIS??

Thanks!

-Todd


Nov 17 '05 #8
"Todd" <ts****@smithda ta.net> wrote in message
news:Oe******** ******@TK2MSFTN GP09.phx.gbl...
Guys, I don't think its problems with the source code.

When I open the page via http://localhost/Menu.htm each time I expand a menu and refresh the page, the menus always default to all being closed - not
writing to the document.cookie (stateless)

When I open the page via C:\Inetpub\wwwr oot\Menu.htm each time I expand a
menu and refresh the page, the menus keep state, code writes to the
document.cookie .


Todd, like I said. Remove the complications of the menu code and concentrate
on the cookie problem. You'll probably find that the problem is the domain
field of the cookie. It needs to be blank for localhost.
--
John Saunders
Internet Engineer
jo***********@s urfcontrol.com

Nov 17 '05 #9
"Todd" <ts****@smithda ta.net> wrote in message
news:Oe******** ******@TK2MSFTN GP09.phx.gbl...
Guys, I don't think its problems with the source code.

When I open the page via http://localhost/Menu.htm each time I expand a menu and refresh the page, the menus always default to all being closed - not
writing to the document.cookie (stateless)

When I open the page via C:\Inetpub\wwwr oot\Menu.htm each time I expand a
menu and refresh the page, the menus keep state, code writes to the
document.cookie .


Todd, like I said. Remove the complications of the menu code and concentrate
on the cookie problem. You'll probably find that the problem is the domain
field of the cookie. It needs to be blank for localhost.
--
John Saunders
Internet Engineer
jo***********@s urfcontrol.com

Nov 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1482
by: Pål Johansen | last post by:
Is it possible to cache portions of a page client side. I have som include pages that I would like to store at the clients cache.
2
1651
by: Matt | last post by:
I guess the principal differences between client-side and server-side code is that client-side code is processed in web browser, and server-side code is processed in web server. In ASP.NET web controls, since it has the attribute runat="server", so the controls will be processed in web server?? Do you think the processing time will be slower than tradiational ASP applications?? I guess the fundamental question is when do we use...
1
3349
by: Peter Row | last post by:
Hi, I have a web app, there is only really 1 aspx page (that the user never sees) the rest of the code is done in a DLL that implements HttpHandler. My app (which is a porting job from Vb6 webclasses) needs to use session cookies (i.e. when all browser windows are closed the cookies disappear) however in my code the cookies disappear after a round trip to the client browser, i.e: Browser
0
1945
by: Robin Day | last post by:
I have a page that contains some dhtml and uses client side cookies so store it's current state so that on clicking the "back" button to it the page will be as the user last saw it. However, should the user click on a link to that page, I want to remove the cookie so that the page is displayed in its default state. The two ways I can think of doing this is to either have some javascript code to delete the cookie when the page is first...
2
1839
by: rk325 | last post by:
I have a question about cookies & browser permissions and turning off cookies when creating a web site (cookieless mode in web.config). I have a web site that of course uses Session variables. But we decided to turn off the cookieless mode because the client specifically said her browser did not allow cookies. Anyway, when searching about it, I found out that by setting cookieless = true the session cookie is embedded into the URL sent...
6
9537
by: dinoo | last post by:
Hi, I would appreciate if some one could help me out. I have to read a client side ini file in Aspx page and use that data in server side processing. Can any one help me out here? Please refer to a link if possible. Thanks, Dinoo
6
6059
by: Charleees | last post by:
Hi all, I have a Login Page whrere all Functionalities such as validations are Done in Client Side... I have to Implement Remember My Mail Id and PAss Word Functionality also in Client side.. When Remember PAssWord Check Box is Checked.....
13
2117
by: Sanders Kaufman | last post by:
When you have a session going, I know that PHP stores a session token on the client, but does it keep the session *data* on the client, as well? Or is the session data being stored on the server, and just indexed to the session token data?
35
315
by: Dan Rumney | last post by:
Hi all, I've been writing Javascript for quite a while now and have, of late, been writing quite a lot of AJAX and AJAX-related code. In the main, my dynamically generated pages are created using Perl on the backend, with Javascript providing limited frontend functionality. As an example, an expanding tree would be fully populated on the server-side and then presented to the browser, with Javascript and CSS being used to vary the...
0
10613
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.