Javascript: Stop page from going to another one

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Javascript: Stop page from going to another one

Post by tecktalkcm0391 »

Ok, I want to know if this is possible and what I should look for:

I have a link to files, and they take a long time to load, so I want to make a button that come up when the user clicks on file (i know how to do that) but what i don't know what to do is stop the transfer to the next page. Do you get what I am saying. I just want it to stay on the page with the button and not go to the next page.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

So you want a button that effectively does the same thing as pressing the 'STOP' and 'BACK' buttons in one click?

I'm not sure that's possible. If you're linking to a non-html file, there's no way to get Javascript to execute.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

Really I just want the STOP button, I know how to do a back, but I don't need it. I just want STOP from html page to html page.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

i got it in Netscape use... window.stop().. in IE document.execCommand('Stop')
Post Reply