no popup

R

rohitarora

when we open a particular document stored on the server we are asked a
question wether wee would like to save the document or open it from
the current location .......the entire problem is that this message
popup is not desired........how do we achieve this using "jsp"......
 
R

Ryan Stewart

nos said:
y u post in 2 groups?
I count 5. That kind of multiposting is uncalled for. Crosspost. And your
"problem" can't be solved by JSP, javascript, or anything else besides your
user unchecking the "Always ask me" checkbox. It's a browser feature.
 
A

Andrew Thompson

when we open a particular document stored on the server we are asked a
question wether wee would like to save the document or open it from
the current location .......the entire problem is that this message
popup is not desired........how do we achieve this using "jsp"......

So configure your browser not to show it.

[ The bit you have missed is that it is
up to the _client_ browser to decide what
to do with a file, not the server, and
not your jsp page. ]

So, instead of what you have..

<a href='TheFile.txt'>Download</a>

...try

<a href='TheFile.txt'>Download</a>
(Select 'Open from current location' to view)

Let the user decide.
 
C

Collin VanDyck

Message-ID: said:
He posted from google. Does google allow crossposting?

If it does not, then one posting from google should only post to one
newsgroup or download a free newsreader that does allow crossposting?
 
T

Tor Iver Wilhelmsen

when we open a particular document stored on the server we are asked a
question wether wee would like to save the document or open it from
the current location .......the entire problem is that this message
popup is not desired........how do we achieve this using "jsp"......

Send a proper content-type. You want to change how the browser treats
different content, so you could add a page which tells the user how to
change the browser behavior to what you want (instead of, say, what
the user wants) bvefore proceeding to the download.
 
J

Joona I Palaste

Send a proper content-type. You want to change how the browser treats
different content, so you could add a page which tells the user how to
change the browser behavior to what you want (instead of, say, what
the user wants) bvefore proceeding to the download.

And it would still not work on all browsers. Even if all browsers on
the market worked like that, the user could write his own browser to
still make a pop-up. There is really no way to force a certain client-
side behaviour from the server side.
I have seen web pages that use a Javascript application to display
"Only members can save pictures" when I click the right mouse button
over an image. Well, I use Mozilla 1.2 on Linux, and fact is, Mozilla
1.2 opens the context menu after the Javascript pop-up, and lets me
save the picture as if nothing had happened. Guess the webside authors
think all the world is MS Internet Explorer.
 
A

Andrew Thompson

And it would still not work on all browsers. .....
...Guess the webside authors
think all the world is MS Internet Explorer.

And that all IE users are
completely stupid.

Usually I am in reading the source
of the page and making direct calls
for resources and images before I
notice 'some JS call'. Most authors
that use such tricks never think of
that. ;-)
 
R

Ryan Stewart

Andrew Thompson said:
And that all IE users are
completely stupid.

Usually I am in reading the source
of the page and making direct calls
for resources and images before I
notice 'some JS call'. Most authors
that use such tricks never think of
that. ;-)
No kidding! People are always wanting to know how to "protect" things on a
web page. Easy answer: take them off the web page! If you send it to my
computer, it's mine. You can't tell me what I can and can't do with it
anymore.
 
J

Joona I Palaste

Ryan Stewart said:
No kidding! People are always wanting to know how to "protect" things on a
web page. Easy answer: take them off the web page! If you send it to my
computer, it's mine. You can't tell me what I can and can't do with it
anymore.

Exactly! I'd put it even more bluntly: "If I can see it, I can {save,
print} it". If the worst comes to worst, and I can't even issue a
direct HTTP request, or fetch it from the browser's cache (which would
require pretty nifty work from the server), I can always save a
screenshot or type it out by hand (if it's a plain-text file).
 

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

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top