PDA

View Full Version : Javascript protocol in IE - sp2


Mac
October 3rd 04, 12:23 AM
Hello

Does anybody know how to bypass the setting that does not allow javascript
to be a valid protocol with sp2 installed?

thank you

Mac

for an example of what I mean:
Try this start->run and type "http://www.google.com" and a browser window
will
pop-up
with sp1 if you try start->run and typed "javascript:alert("hello world");"
you
would get a pop-up alert saying "hello world" with sp2 you get nothing!

Vanguardx
October 3rd 04, 01:05 AM
"Mac" >
wrote in :
> Hello
>
> Does anybody know how to bypass the setting that does not allow
> javascript to be a valid protocol with sp2 installed?
>
> thank you
>
> Mac
>
> for an example of what I mean:
> Try this start->run and type "http://www.google.com" and a browser
> window will
> pop-up
> with sp1 if you try start->run and typed "javascript:alert("hello
> world");" you
> would get a pop-up alert saying "hello world" with sp2 you get
> nothing!

Sounds like the popup feature added to IE from WinXP SP-2.

Internet Options -> Security -> Internet security zone (I presume) ->
Miscellaneous -> Use PopUp Blocker.

You can use IE's own help to search on "pop-up" to get more information
about it, how to disable it, and how to see a blocked popup if you want
to leave the blocker enabled.

--
__________________________________________________ _______________
******** Post replies to newsgroup - Share with others ********
Email: lh_811newsATyahooDOTcom and append "=NEWS=" to Subject.
__________________________________________________ _______________

Mac
October 3rd 04, 01:17 AM
Thanks but it is not the pop-up blocker setting as I have tried disabling it
and to be honest I have tried changing almost every setting.

I am almost sure it has something to do with the fact that it is no longer
recognizing it as a protocol anymore.


"Vanguardx" wrote:

> "Mac" >
> wrote in :
> > Hello
> >
> > Does anybody know how to bypass the setting that does not allow
> > javascript to be a valid protocol with sp2 installed?
> >
> > thank you
> >
> > Mac
> >
> > for an example of what I mean:
> > Try this start->run and type "http://www.google.com" and a browser
> > window will
> > pop-up
> > with sp1 if you try start->run and typed "javascript:alert("hello
> > world");" you
> > would get a pop-up alert saying "hello world" with sp2 you get
> > nothing!
>
> Sounds like the popup feature added to IE from WinXP SP-2.
>
> Internet Options -> Security -> Internet security zone (I presume) ->
> Miscellaneous -> Use PopUp Blocker.
>
> You can use IE's own help to search on "pop-up" to get more information
> about it, how to disable it, and how to see a blocked popup if you want
> to leave the blocker enabled.
>
> --
> __________________________________________________ _______________
> ******** Post replies to newsgroup - Share with others ********
> Email: lh_811newsATyahooDOTcom and append "=NEWS=" to Subject.
> __________________________________________________ _______________
>
>

Vanguardx
October 3rd 04, 03:12 AM
"Mac" >
wrote in :
> Thanks but it is not the pop-up blocker setting as I have tried
> disabling it and to be honest I have tried changing almost every
> setting.
>
> I am almost sure it has something to do with the fact that it is no
> longer recognizing it as a protocol anymore.
>
>
> "Vanguardx" wrote:
>
>> "Mac" >
>> wrote in :
>>> Hello
>>>
>>> Does anybody know how to bypass the setting that does not allow
>>> javascript to be a valid protocol with sp2 installed?
>>>
>>> thank you
>>>
>>> Mac
>>>
>>> for an example of what I mean:
>>> Try this start->run and type "http://www.google.com" and a browser
>>> window will
>>> pop-up
>>> with sp1 if you try start->run and typed "javascript:alert("hello
>>> world");" you
>>> would get a pop-up alert saying "hello world" with sp2 you get
>>> nothing!
>>
>> Sounds like the popup feature added to IE from WinXP SP-2.
>>
>> Internet Options -> Security -> Internet security zone (I presume) ->
>> Miscellaneous -> Use PopUp Blocker.
>>
>> You can use IE's own help to search on "pop-up" to get more
>> information about it, how to disable it, and how to see a blocked
>> popup if you want to leave the blocker enabled.
>>
>> --
>> __________________________________________________ _______________
>> ******** Post replies to newsgroup - Share with others ********
>> Email: lh_811newsATyahooDOTcom and append "=NEWS=" to Subject.
>> __________________________________________________ _______________

Did Javascript work BEFORE the install of WinXP SP-2? Maybe you never
did have the Microsoft JVM (Java Virtual Machine). You did hear about
Sun suing Microsoft and winning which forced Microsoft to discontinue
distributing MSJVM (but a new agreement allows them to continue
distributing for a bit longer *if* it is already in your system).

If you are missing the MSJVM then get the one from Sun
(http://java.com/en/index.jsp).

--
__________________________________________________ _______________
******** Post replies to newsgroup - Share with others ********
Email: lh_811newsATyahooDOTcom and append "=NEWS=" to Subject.
__________________________________________________ _______________

Mac
October 3rd 04, 06:51 PM
Java and Javascript have nothing to do with each other.

And yes they were both working before the sp2 install.

thanks

M

"Vanguardx" wrote:

> "Mac" >
> wrote in :
> > Thanks but it is not the pop-up blocker setting as I have tried
> > disabling it and to be honest I have tried changing almost every
> > setting.
> >
> > I am almost sure it has something to do with the fact that it is no
> > longer recognizing it as a protocol anymore.
> >
> >
> > "Vanguardx" wrote:
> >
> >> "Mac" >
> >> wrote in :
> >>> Hello
> >>>
> >>> Does anybody know how to bypass the setting that does not allow
> >>> javascript to be a valid protocol with sp2 installed?
> >>>
> >>> thank you
> >>>
> >>> Mac
> >>>
> >>> for an example of what I mean:
> >>> Try this start->run and type "http://www.google.com" and a browser
> >>> window will
> >>> pop-up
> >>> with sp1 if you try start->run and typed "javascript:alert("hello
> >>> world");" you
> >>> would get a pop-up alert saying "hello world" with sp2 you get
> >>> nothing!
> >>
> >> Sounds like the popup feature added to IE from WinXP SP-2.
> >>
> >> Internet Options -> Security -> Internet security zone (I presume) ->
> >> Miscellaneous -> Use PopUp Blocker.
> >>
> >> You can use IE's own help to search on "pop-up" to get more
> >> information about it, how to disable it, and how to see a blocked
> >> popup if you want to leave the blocker enabled.
> >>
> >> --
> >> __________________________________________________ _______________
> >> ******** Post replies to newsgroup - Share with others ********
> >> Email: lh_811newsATyahooDOTcom and append "=NEWS=" to Subject.
> >> __________________________________________________ _______________
>
> Did Javascript work BEFORE the install of WinXP SP-2? Maybe you never
> did have the Microsoft JVM (Java Virtual Machine). You did hear about
> Sun suing Microsoft and winning which forced Microsoft to discontinue
> distributing MSJVM (but a new agreement allows them to continue
> distributing for a bit longer *if* it is already in your system).
>
> If you are missing the MSJVM then get the one from Sun
> (http://java.com/en/index.jsp).
>
> --
> __________________________________________________ _______________
> ******** Post replies to newsgroup - Share with others ********
> Email: lh_811newsATyahooDOTcom and append "=NEWS=" to Subject.
> __________________________________________________ _______________
>
>

Vanguardx
October 3rd 04, 08:00 PM
"Mac" >
wrote in :
> Java and Javascript have nothing to do with each other.
>
> And yes they were both working before the sp2 install.
>

Oops. That'll teach me to reply right before I drop into bed. Since IE
is the interpreter, does it really handle Javascript or is it still
using Jscript (since the jscript.dll is still in the %windir%\system32
path and noted as a file included in the IE Repair Tool at
http://support.microsoft.com/?id=194177)? Have you tried a repair of
IE? Otherwise, may a reinstall would work (at one time, you had to run
the IE install twice because the first one just did a refresh of
components while a second one did a replace).

--
__________________________________________________ _______________
******** Post replies to newsgroup - Share with others ********
Email: lh_811newsATyahooDOTcom and append "=NEWS=" to Subject.
__________________________________________________ _______________

Mac
October 3rd 04, 09:33 PM
Vanguardx, thanks for all your effort in this.

See the problem is not that javascript is not working just that it seems it
no longer wants to be recognized as a valid protocol.

in othe words: if I have a browser window open to an html url and I type
"javascript:alert("hello world");" into the address bar I get the expected
behaviour. If I create a url shortcut and have the url as the same thing
"javascript:alert("hello world");" it does not work. This is compared to all
my javascript url shortcuts that did work before sp2.

Just try it type "javascript:alert("hello world");" into your address bar
and press enter. You will get the appropriate behaviour however if you try
to add this to your favorites it will only add the last webpage and not the
javascript? with sp1 it would just add the javascript as a favorite shortcut.

Something in HKEY_CLASSES_ROOT\PROTOCOLS\Handler\javascript is different and
I don't know what.

Thanks

Mac

"Vanguardx" wrote:

> "Mac" >
> wrote in :
> > Java and Javascript have nothing to do with each other.
> >
> > And yes they were both working before the sp2 install.
> >
>
> Oops. That'll teach me to reply right before I drop into bed. Since IE
> is the interpreter, does it really handle Javascript or is it still
> using Jscript (since the jscript.dll is still in the %windir%\system32
> path and noted as a file included in the IE Repair Tool at
> http://support.microsoft.com/?id=194177)? Have you tried a repair of
> IE? Otherwise, may a reinstall would work (at one time, you had to run
> the IE install twice because the first one just did a refresh of
> components while a second one did a replace).
>
> --
> __________________________________________________ _______________
> ******** Post replies to newsgroup - Share with others ********
> Email: lh_811newsATyahooDOTcom and append "=NEWS=" to Subject.
> __________________________________________________ _______________
>
>

Vanguardx
October 4th 04, 02:48 AM
"Mac" >
wrote in :
> Vanguardx, thanks for all your effort in this.
>
> See the problem is not that javascript is not working just that it
> seems it no longer wants to be recognized as a valid protocol.
>
> in othe words: if I have a browser window open to an html url and I
> type "javascript:alert("hello world");" into the address bar I get
> the expected behaviour. If I create a url shortcut and have the url
> as the same thing "javascript:alert("hello world");" it does not
> work. This is compared to all my javascript url shortcuts that did
> work before sp2.
>
> Just try it type "javascript:alert("hello world");" into your address
> bar and press enter. You will get the appropriate behaviour however
> if you try to add this to your favorites it will only add the last
> webpage and not the javascript? with sp1 it would just add the
> javascript as a favorite shortcut.
>
> Something in HKEY_CLASSES_ROOT\PROTOCOLS\Handler\javascript is
> different and I don't know what.
>

I don't remember how I added it before applying SP-2, but I currently
have a Javascript defined as the shortcut under my Links folder (under
Favorites). When I try it now, I have to lie about what type of
shortcut that I am creating. I open the Favorites [sub]folder,
right-click to create a shortcut, and then enter some URL, like
http://whatever. That is because it bitches that "javascript ... file
not found" if I try to enter "javascript: ..." (because the
"javascript:" prefix is seen as a URL scheme). Then I change the
properties of the shortcut and replace the URL with the Javascript line
and it works then.

I don't think the Favorites -> Add to Favorites cares about open dialog
windows or whatever is in the Address bar. It is probably picking up
the URL for the current page from its history cache or some internal
variable or buffer. That's what gets added when you use the menus to
add a site to your Favorites. I've even seen where a CGI script
modified the contents of the page but the saved URL won't have the data
so when you again visit that URL then the page is wrong.

So open the Favorites folder, right-click in it to add a new shortcut,
define whatever you like but it has to be a URL or filespec, and then
change the property of the target URL to be your javascript line(s).
You'll get a prompt saying "The protocol 'javascript' does not have a
registered program". Just say yes to save the changes, anyway.

So, yeah, something changed, but it looks like IE decided to be more
compliant by actually checking if you ever installed an independent
Javascript intepreter which would get the "javascript:" protocol prefix
assigned to it. After all, "javascript:" is not an RFC 1738 defined
protocol identifier. In fact, when I search at rfc-editor.org on
"javascript", no hits are found. Since Javascript was a Netscape
invention, maybe Microsoft is weaning themselves away from it. They
probably want to use Jscript or the newer C#
(http://msdn.microsoft.com/net/ecma/).

"Since ECMAScript is the emerging standard for JavaScript, ..."
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dninstj/html/ecmascriptterminology.asp)

"This ECMA Standard is based on several originating technologies, the
most well known being JavaScript (Netscape)
and JScript (Microsoft)."
(http://www.ecma-international.org/publications/standards/Ecma-262.htm)


What I found in the registry (I also have WinXP SP-2 applied) was:

HK_ROOT\JavaScript[1.x]\CLSID
has data item
"(default)" = {f414c260-6ac0-11cf-b6d1-00aa00bbbb58}

So I looked up the ClassID to find:

HK_ROOT\CLSID\{f414c260-6ac0-11cf-b6d1-00aa00bbbb58}
has subkey
InprocServer32 = jscript.dll

Actually this looks a little different on mine because I have Norton
Internet Security and Norton Anti-Virus installed and these intercept
scripting definitions in the registry, so you'll see Symantec's
scrauth.dll listed as the "(default)" data item and the data item
"ScrAuthInProcServer32 = jscript.dll". So it looks like Microsoft is
using their jscript.dll library to handle the Javascript interpretation.
Hmm, if you are also using NAV then try disabling its Script Blocking
function to see what happens.

By the way, I did find a "javascript" protocol definition under:

HK_ROOT\PROTOCOLS\Handler\javascript
with data item
"(default)" = {3050F3B2-98B5-11CF-BB82-00AA00BDCE0B}

and a classID lookup showed:

HK_ROOT\CLSID\{3050F3B2-98B5-11CF-BB82-00AA00BDCE0B}
has subkey
InProcServer32 = %SystemRoot%\System32\mshtml.dll

which merely shows that the HTML rendering engine from IE is the
interpreter (or front end to whever it might pass it off).

Since both Netscape (who submitted their Javascript for ECMA
qualification) and Microsoft (for their JScript and C#) are wandering
towards an ECMA qualification, guess what I found in the registry?

HK_ROOT\ECMAScript\CLSID
has data item
"(default)" = {f414c260-6ac0-11cf-b6d1-00aa00bbbb58}

which bring us back to the jscript.dll file. If the IE Repair Tool or
even a Windows CD Repair won't fix the behavior back to what you expect
then maybe Microsoft has changed that behavior. I'm sure Microsoft
never really appreciated having to support a scripting language that it
didn't define, that wasn't committee or Internet community developed,
and relied on whatever Netscape wanted to define. As with Netscape not
supporting Microsoft's ActiveX (except maybe with a plug-in for
Mozilla), Microsoft probably doesn't want to support Netscape stuff.
After all, they are still somewhat considered competitors in the browser
market. I suppose Microsoft got burned by Sun in trying to support Java
so they don't want to get in the same position with Netscape maybe
yanking away Javascript so they're looking to a standards-defined
scripting language that frees them of any Netscape whims.

--
__________________________________________________ _______________
******** Post replies to newsgroup - Share with others ********
Email: lh_811newsATyahooDOTcom and append "=NEWS=" to Subject.
__________________________________________________ _______________

Google