cookies

A

alain dhaene

Hi,

I have follow problem.

I have 3 directorys : files - includes -sub

in the map files i have a page named pag1.asp

<script language="JavaScript" src="../includes/functies.jsp"></script>
<p><a href= "../sub/pag5.asp" onClick="setUrl();">save url</a></p>


In the map sub I have a page named pag5.asp

<script language="JavaScript" src="../includes/functies.jsp"></script>

<script language="JavaScript">
getUrl();
</script>

In the map includes I have a page named functies.jsp

function setUrl()
{
var href = document.location.href
document.cookie= href;


}



function getUrl()

{

var nextbite;
var bites = document.cookie.split(";");
nextbite = bites[0]

document.write ("<a href="+ nextbite + ">Pointer</a>");
}

When I put page5.asp and page1.asp in the same directory it works,
But when I put them in a different directory I can't get the cookie.

What's wrong?

Alain
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top