webForumDet fria alternativet

fungerar i IE men inte Netscape??

1 svar · 161 visningar · startad av hakan@4u2.se

hakan@4u2.seMedlem sedan aug. 2000334 inlägg
#1

Detta script fungerar i IE men inte i Netscape?? koden ska sätta en cookie bara!!

Hmm...var tvunget att byta ut . i cokie mot något annat % för att kunna posta koden här
Hur får jag det att fungera i Netscape?
Tack på förhand

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
var up,down;var min1,sec1;var cmin1,csec1,cmin2,csec2;
// Cookie_Id = ett specifikt varde for varje undersokning
// Days_To_Expire = det antal dagar anvandaren skall vara utsparrad
var Cookie_Id = 221,Days_To_Exp = 90;

var Cookie_Name;

function SetCookie()
{
  var ExpireDate;
  ExpireDate = new Date();
  ExpireDate.setDate(ExpireDate.getDate()+Days_To_Exp);
  document%cookie = Cookie_Name + "=" + escape(Cookie_Id) + ";expires=" + ExpireDate.toUTCString() + ";";
}

   
//-->
</SCRIPT>

	<TITLE>Untitled</TITLE>
</HEAD>

<BODY ONLOAD="SetCookie()">

</BODY>
</HTML>

------------------
- Hakan@4u2.se -
------------------

spangoMedlem sedan juni 20006 147 inlägg
#2

Du tilldelar ju aldrig Cookie_Name något värde! Och du, använd inte globala variabler i fortsättningen... ;)

------------------
These are the cries of the carrots, the cries of the carrots! You see, Reverend Maynard, tomorrow is harvest day and to them it is the holocaust.

Genererad på 375 ms · cache AV · v20260730165559-full.f96bc7eb