Re: Webbrowser control looses sessionid on "newwindow"
- From: Ryan <Ryan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 5 Jul 2006 07:17:01 -0700
Rob,
I do not have control over the web page. However, after talking with them
they are passing the target frame "_blank". However, the window isn't
initiated by a link, it's in a function that is validating data (i.e if there
are errors then they are output to the window).
To me this seems like a browser/control bug. The webbrowser control is
really just an instance of shdocvw, so why can't it keep it's session id when
a new window is instantiated. If I use just a IE window (instead of an
instance of the webbrowser control), then it all works fine. However, I need
to use the webbrowser control to keep the browser encapsulated inside my
application.
Any ideas would be greatly appreciated.
Ryan
"Rob ^_^" wrote:
Hi Ryan,.
I haven't gone to the trouble of creating a beresque browser to test your
problem, so I am only guessing...
1. Try a button instead of a hyperlink with a javascript href value.
Normally the href is fired before the click event. To disable the href
firing use href="#" for href="javascript:void();"
2. also in your windowopen function specify the target frame as "_blank" to
force the creation of a new window (but I think in the case of an embedded
webbrowser control this will open a new instance of Internet Explorer on the
clients machine.) A possible workaround if this is the case is to use
window.createpopup or window.showModalDialog or to use a floating <div> or
even a message box (alert('line one /nline two');)
I trust this is the solution you are looking for.
Regards.
"Ryan" <Ryan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:91FFBE6D-8B48-4D5F-890A-C290B73BEA1F@xxxxxxxxxxxxxxxx
I am creating a new instance of the webbrowser control in vb, and using
that
to browse to a website. HOwever, this website will open up a popup that
contrains info and this window (when opened) has the "Server Error" page.
From what I understand, this is an issue of the web browser not
functioning
as it should (i.e. persisting the session id & the cookie). Where it is
breaking is the webbrowser control calling a New Window (IE Windows) and
it
doesn't seem to be smart enough to pass these along.
To demostrate this, use this website:
http://www.yvesrepiquet.com/idtest.php
1) open it with an instance of IE
2) (close all ie windows), build a new VB (or vb.net) project and add the
webbrowser control. Navigate to that page and click the link.
-I am using an instance of the MS Webbrowser control (shdocvw.dll -
version
6.0.2900.2919)
-My Internet Explorer is version: 6.0.2900.2180 (latest)
-Windows XP SP2 (fully patched)
Now what I have tried is the following:
- adding the site to my "Trusted" zone
- adding the site to my "local" zone
- tested VB6 webbrowser control
- tested VB.Net 2005 webbrowser control (points to the same dll)
- navigate & navigate2 methods
Does anyone have a work around or fix to this issue yet? I do not have
control over the server side of the server so I am looking for a client
based
solution.
Thanks,
Ryan
- Follow-Ups:
- Re: Webbrowser control looses sessionid on "newwindow"
- From: Rob ^_^
- Re: Webbrowser control looses sessionid on "newwindow"
- References:
- Re: Webbrowser control looses sessionid on "newwindow"
- From: Rob ^_^
- Re: Webbrowser control looses sessionid on "newwindow"
- Prev by Date: Any way to create completely encapsulated HTML page?
- Next by Date: Homepage Problem
- Previous by thread: Re: Webbrowser control looses sessionid on "newwindow"
- Next by thread: Re: Webbrowser control looses sessionid on "newwindow"
- Index(es):
Relevant Pages
|