window xp sp2 IE - does not open word document in new IE window

G

Guest

why below command doesnot work in windows xp sp2 IE 6.0 (no pop-up blocker).

Type this below command in IE address bar and see whether it opens new
window. It opens new window for 2 seconds and immediately closes with no
error. It happens to any word document. Below is the example to try:

javascript:window.open('http://www.myflorida.com/myflorida/universityboard/expect_respons.doc','_blank');


This one works fine but not the above. why?
javascript:window.open('http://www.microsoft.com','_blank');
 
R

Rob ^_^

Cooee Timbuktu,

Depends upon a users file settings for this type of file (.doc). Windows
Explorer - Tools>Folder Settings - File Types tab - .doc file type -
Advanced button - Uncheck "Confirm open after download"

On my machine .doc file types open with winword and Internet shortcuts open
with Internet Explorer. Don't forget that also the javascript protocol is
executed within the context of your browser which will make a request to the
server at myflorida.com to download the .doc file, so execution occurs left
to right 1. window.open, opens a new instance of the browser which then
sends its request to the server, but the returned doc can't be opened and
rendered in the browser until it receives permission to open the downloaded
doc file. Check your security settings also. You probably have Prompt
enabled for downloads.

There are also settings for "Unsafe Files" (undocumented) which blocs the
downloading of certain file types, but .doc is not a type that is blocked by
IE by default.
Regards.
 
G

Guest

Rob thanks for your reply.

Yes, IE needs permission to open downloaded .doc file. But IE suppose to
open 'File Download' dialog box by asking 'Do you want to open or save this
file?' after downloading the .doc file. It's not asking anything, it simply
opens new browser for 2 seconds and closes with no error. This behavior is
only in XP SP2 IE.

It is not good idea to uncheck any default security settings. The 'Confirm
open after download' setting is turned on by default to help prevent the
spread of macro viruses.

This is strange behavior in XP SP2 IE. Any othere workarounds.
 
R

Rob ^_^

Hi Tim,

I am using XP pro, SP2 with IE7 RC1. This workaround sorta works.

Open Notepad and copy and paste the following

[InternetShortcut]
URL=javascript:window.open('http://www.myflorida.com/myflorida/universityboard/expect_respons.doc','_blank');

Save the file as test.url in your links folder. A shortcut should appear in
your links toolbar on IE.

When I choose this shortcut, it works but I always get an script error
message for the page that I am currently on -
line 1, Char 95
Object Expected

This corresponds to the "." character in the link script, but I cannot find
a workaround.

Even when I change the shortcut to
[InternetShortcut]
URL=http://www.myflorida.com/myflorida/universityboard/expect_respons.doc

without the javascript: protocol I still get the same error message.

I know I have no problems with IE6 SP1 on a Win2K machine.

Obviously there is different behaviour between the 2 OS. Since the
javascript: protocol is something that the average user knows nothing about,
and that it is open to browser hijacking, I think that it is something that
MS considers a low priority.

I don't know what your reasons for investigating this behavior, other than
interlectual curiosity, the method can be replaced with normal web
hyperlinks.

Regards.
 
G

Guest

Hi Rob,

Thanks for your time.

My basic problem is, I have a Flash application from which I execute that
window.open javascript command to open word document file. Once my users
upgraded to XP SP2 then they see this new IE window closing problem. Then I
understood the problem is with XP SP2 IE. So, I am directly excuting this
command in IE address bar itself, new IE opens for 2 seconds and closes
immediately with no error. I guess this is a bug in XP SP2 IE itself.

Thanks.

Rob ^_^ said:
Hi Tim,

I am using XP pro, SP2 with IE7 RC1. This workaround sorta works.

Open Notepad and copy and paste the following

[InternetShortcut]
URL=javascript:window.open('http://www.myflorida.com/myflorida/universityboard/expect_respons.doc','_blank');

Save the file as test.url in your links folder. A shortcut should appear in
your links toolbar on IE.

When I choose this shortcut, it works but I always get an script error
message for the page that I am currently on -
line 1, Char 95
Object Expected

This corresponds to the "." character in the link script, but I cannot find
a workaround.

Even when I change the shortcut to
[InternetShortcut]
URL=http://www.myflorida.com/myflorida/universityboard/expect_respons.doc

without the javascript: protocol I still get the same error message.

I know I have no problems with IE6 SP1 on a Win2K machine.

Obviously there is different behaviour between the 2 OS. Since the
javascript: protocol is something that the average user knows nothing about,
and that it is open to browser hijacking, I think that it is something that
MS considers a low priority.

I don't know what your reasons for investigating this behavior, other than
interlectual curiosity, the method can be replaced with normal web
hyperlinks.

Regards.

timbuktu_2006 said:
Rob thanks for your reply.

Yes, IE needs permission to open downloaded .doc file. But IE suppose to
open 'File Download' dialog box by asking 'Do you want to open or save
this
file?' after downloading the .doc file. It's not asking anything, it
simply
opens new browser for 2 seconds and closes with no error. This behavior is
only in XP SP2 IE.

It is not good idea to uncheck any default security settings. The 'Confirm
open after download' setting is turned on by default to help prevent the
spread of macro viruses.

This is strange behavior in XP SP2 IE. Any othere workarounds.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top