Assume that you have page foo.html in windows 1 that has a link to
bar.html in it.  The question is, how do you tell the difference betwenn
the user clicking on the link and going to bar.html and the user right
clicking on the link and choosing "open link in new window" (there's
different ways of doing this in different browsers). In the first case
you have bar.html in window 1, in the second you have bar.html in window
2. How would the javascript know to do different things in the different
windows?


On Mon, Aug 12, 2002 at 05:24:36PM -0400, Jayson Falkner wrote:
> Use JavaScript to encode your URLs with the window name, or some other
> unique ID.
>
> For instance:
>
> http://www.foo.com?pageid=page1
>
> Then mine the information out on the server-side accordingly. Given your
> specific use, it may be possible to encode the links on the server-side
> to achieve the same goal.
>
> Another much more simple solution would be to ask a user to configure
> the web browser so that it does not share session cookies between
> different windows. Most every browser allows this. Assuming you used it,
> the different windows should reliably have separate sessions.
>
> Cheers,
>
> Jayson Falkner
> [EMAIL PROTECTED]
>
> Dror Matalon wrote:
> >Hi folks,
> >
> >
> >As part of the zapatec platform we need to be able to tell if two
> >requests come from the same window, or they come from different windows.
> >For instance a developer might be building the application in one window
> >and testing it in a second one, and we want to be able to tell which
> >windows is which.
> >
> >AFAIK A servlet has no good way to tell if two requests are done from
> >the same browser window or from two different windows, as long as both
> >windows are part of the same session. Looks to me like you need some
> >client side help, probably javascript, to do that. Looks to me like the
> >window name would be a good way to tell windows apart, but I'd be
> >interested in hearing how others folks handle this issue.
> >
> >I'd appreciate any hints or URLs.
> >
> >Thanks,
> >
> >Dror
> >
> >
> >--
> >Dror Matalon
> >Zapatec Inc
> >1700 MLK Way
> >Berkeley, CA 94709
> >http://www.zapatec.com
> >
> >___________________________________________________________________________
> >To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> >of the message "signoff SERVLET-INTEREST".
> >
> >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> >Resources: http://java.sun.com/products/servlet/external-resources.html
> >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> >
> >
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

--
Dror Matalon
Zapatec Inc
1700 MLK Way
Berkeley, CA 94709
http://www.zapatec.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to