🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.programmer
Article #651

Netscape don't catch the Cookies within javascript function?

#651
From: Javier Pulido
Date: Mon, 11 Sep 2000 16:20
35 lines
2430 bytes
Could somebody help me?

I'm trying to get a dinamic image generated by a Servlet, which is called by
IMG tag. This servlet sends a cookie to the browser too, but as the url of
the servlet has to be generated dinamically, I have used a javascript
function. When I set the src of IMG using a javascript function, the cookies
are ignored in Netscape, but in Internet Explorer it runs fine.
Why? Are there other way to do the same?

A example of my HTML page

<HTML>
<HEAD>
  <META http-equiv="Pragma" content="no-cache">
  <META http-equiv="Expires" content="Monday, 01-Jan-90 00:00:00 GMT">

  <SCRIPT language="javascript">
    var dir=null;

    function direction()
    {
      dir="http://localhost/servlet/MyServlet";
      var now=new Date();
      var cad=dir+"?keyGroup=0&main="+document.URL+"&time="+now;
      document.button.src=cad;

      return(true);
    }
  </SCRIPT>
</HEAD>

<BODY>
  <IMG src="javascript:direction()" NAME="button">
</BODY>
</HTML>
Technical Details
Message-ID: <ID7v5.60659$Z05.877917@telenews.teleline.es>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!supernews.com!195.162.196.200.MISMATCH!news.grmbl.tm!news.tvd.be!newsfeed.nettuno.it!bignews.mediaways.net!xfer10.netnews.com!netnews.com!newspeer.monmouth.com!newsfeed.mad.ttd.net!telenews.teleline.es!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1116f3,f6d1f77ce6138d2f,start
X-Google-Attributes: gid1116f3,public
X-Google-Thread: fb3cb,f6d1f77ce6138d2f,start
X-Google-Attributes: gidfb3cb,public
X-Google-Thread: f4f78,f6d1f77ce6138d2f,start
X-Google-Attributes: gidf4f78,public
X-Google-Thread: 10a146,f6d1f77ce6138d2f,start
X-Google-Attributes: gid10a146,public
X-Google-ArrivalTime: 2000-09-11 09:19:25 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!supernews.com!195.162.196.200.MISMATCH!news.grmbl.tm!news.tvd.be!newsfeed.nettuno.it!bignews.mediaways.net!xfer10.netnews.com!netnews.com!newspeer.monmouth.com!newsfeed.mad.ttd.net!telenews.teleline.es!not-for-mail
From: "Javier Pulido" <fjpulido@ua.es>
Newsgroups: comp.lang.java.programmer,comp.lang.javascript,es.comp.lenguajes.java,netscape.public.mozilla.java
Subject: Netscape don't catch the Cookies within javascript function?
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <ID7v5.60659$Z05.877917@telenews.teleline.es>
Date: Mon, 11 Sep 2000 16:20:56 GMT
NNTP-Posting-Host: 213.194.154.2
X-Complaints-To: usenet@teleline.es
X-Trace: telenews.teleline.es 968689256 213.194.154.2 (Mon, 11 Sep 2000 18:20:56 MET DST)
NNTP-Posting-Date: Mon, 11 Sep 2000 18:20:56 MET DST
Organization: Clientes_Teleline