🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Netscape don't catch the Cookies within javascript function?

#652
From: Andre-John Mas
Date: Mon, 11 Sep 2000 22:35
54 lines
2746 bytes
I suggest that you try the comp.lang.javascript
newsgroup as this appears to be very much a Javascript problem.

Andre

In article <ID7v5.60659$Z05.877917@telenews.teleline.es>,
  "Javier Pulido" <fjpulido@ua.es> wrote:
> 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>
>
>

--
http://www.bigfoot.com/~ajmas/


Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID: <8pjmn2$heo$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!10.10.220.73.MISMATCH!sn-xit-09!supernews.com!xfer13.netnews.com!netnews.com!newsfeed.skycache.com!Cidera!portc03.blue.aol.com!cpk-news-hub1.bbnplanet.com!news.gtei.net!nntp2.deja.com!nnrp1.deja.com!not-for-mail
References: <ID7v5.60659$Z05.877917@telenews.teleline.es>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f4f78,f6d1f77ce6138d2f
X-Google-Attributes: gidf4f78,public
X-Google-Thread: fb3cb,f6d1f77ce6138d2f
X-Google-Attributes: gidfb3cb,public
X-Google-Thread: 10a146,f6d1f77ce6138d2f
X-Google-Attributes: gid10a146,public
X-Google-Thread: 1116f3,f6d1f77ce6138d2f
X-Google-Attributes: gid1116f3,public
X-Google-ArrivalTime: 2000-09-11 15:50:11 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!10.10.220.73.MISMATCH!sn-xit-09!supernews.com!xfer13.netnews.com!netnews.com!newsfeed.skycache.com!Cidera!portc03.blue.aol.com!cpk-news-hub1.bbnplanet.com!news.gtei.net!nntp2.deja.com!nnrp1.deja.com!not-for-mail
From: Andre-John Mas <ajmas@bigfoot.com>
Newsgroups: comp.lang.java.programmer,comp.lang.javascript,es.comp.lenguajes.java,netscape.public.mozilla.java
Subject: Re: Netscape don't catch the Cookies within javascript function?
Date: Mon, 11 Sep 2000 22:35:15 GMT
Organization: Deja.com - Before you buy.
Lines: 54
Message-ID: <8pjmn2$heo$1@nnrp1.deja.com>
References: <ID7v5.60659$Z05.877917@telenews.teleline.es>
NNTP-Posting-Host: 216.208.234.227
To: fjpulido@ua.es
X-Article-Creation-Date: Mon Sep 11 22:35:15 2000 GMT
X-Http-User-Agent: Mozilla/4.74 [en] (WinNT; U)
X-Http-Proxy: 1.0 x58.deja.com:80 (Squid/1.1.22) for client 216.208.234.227
X-MyDeja-Info: XMYDJUIDajmas