Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-01-2004, 01:32 PM   PM User | #1
Lionel
New Coder

 
Join Date: Feb 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Lionel is an unknown quantity at this point
Hide link on status bar problem

All the scripts that I found on dynamic drive and elsewhere about hiding the link display on status bar have a problem. Onmouseover they work fine, the link is hidden. HOWEVER, if you click on the link without releasing it, the link displays. This is happening only on first time you do it. After that it will not display.

I tried event.CLICK but it will always display the link. Here is the code that I am using (pretty useless since you can display the link in status bar). Can someone please help?

<script>
function hidestatus(){
window.status=''
return true
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
</script>
Lionel is offline   Reply With Quote
Old 02-01-2004, 01:45 PM   PM User | #2
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
Why would you mess with the status bar in the first place?
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Vladdy is offline   Reply With Quote
Old 02-01-2004, 01:57 PM   PM User | #3
Lionel
New Coder

 
Join Date: Feb 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Lionel is an unknown quantity at this point
Purpose of the script is to hide links, right? I am using in an intranet where right click and view source have been disabled. Most of thee links are activeX, and I don't want for people to see it.
Lionel is offline   Reply With Quote
Old 02-01-2004, 03:02 PM   PM User | #4
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
Yeah, right, disabled....
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Vladdy is offline   Reply With Quote
Old 02-01-2004, 03:34 PM   PM User | #5
Lionel
New Coder

 
Join Date: Feb 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Lionel is an unknown quantity at this point
you are not too helpful....
Lionel is offline   Reply With Quote
Old 02-01-2004, 03:54 PM   PM User | #6
Garadon
Regular Coder

 
Join Date: Jul 2002
Posts: 698
Thanks: 0
Thanked 0 Times in 0 Posts
Garadon is an unknown quantity at this point
document.onmouseover=hidestatus
document.onmouseout=hidestatus
document.onmousedown=hidestatus
document.onmouseup=hidestatus
document.onmouseclick=hidestatus
Garadon is offline   Reply With Quote
Old 02-01-2004, 04:29 PM   PM User | #7
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
You do not understand client side scripting and client side security.
Whatever you are trying to protect with those silly scripts does not hide anything from a knowledgeable person and does nothing but annoy the rest of the users, because it takes away the browsing tools they are used to.
You need to define what your security risks are and take care of them on the server side. It does not really matter if it is intranet or internet. The only thing that you control on the intranet is the browser choice. The fact that you are attempting to implement those features says that you can not trust the users inside and security needs to be taken seriously.
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Vladdy is offline   Reply With Quote
Old 02-01-2004, 05:10 PM   PM User | #8
Lionel
New Coder

 
Join Date: Feb 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Lionel is an unknown quantity at this point
Quote:
Originally posted by Garadon
document.onmouseover=hidestatus
document.onmouseout=hidestatus
document.onmousedown=hidestatus
document.onmouseup=hidestatus
document.onmouseclick=hidestatus
Thanks. I had tried that. That does not work.
Lionel is offline   Reply With Quote
Old 02-01-2004, 06:31 PM   PM User | #9
Garadon
Regular Coder

 
Join Date: Jul 2002
Posts: 698
Thanks: 0
Thanked 0 Times in 0 Posts
Garadon is an unknown quantity at this point
This sure blocks everything in my IE browser.

<script>
function hidestatus(){
window.status=''
return true
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
document.onmousedown=hidestatus
document.onmouseup=hidestatus
document.onmouseclick=hidestatus
Garadon is offline   Reply With Quote
Old 02-01-2004, 07:28 PM   PM User | #10
Lionel
New Coder

 
Join Date: Feb 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Lionel is an unknown quantity at this point
it works for me too, except that when you click the first time and hold it, the full link is displayed. After that there are no problems. It is just the first time.
Lionel is offline   Reply With Quote
Old 02-02-2004, 02:13 AM   PM User | #11
egquen2000
New Coder

 
Join Date: Feb 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
egquen2000 is an unknown quantity at this point
Here, try this. Works for me.





<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function url() {
hidden = open('http://www.yourwebsite.com/','NewWindow','top=0,left=0,width=1020,height=710,status=no,resizable=yes,scrollbars=yes');
}

// any of the above window parameters can be changed,
// but if you want the link to remain hidden do not
// change 'status=no'

// End -->
</script>

</HEAD>



<BODY>

<a href="javascript:url()">Your link</a
egquen2000 is offline   Reply With Quote
Old 02-02-2004, 03:18 AM   PM User | #12
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
Quote:
Originally posted by Lionel
Purpose of the script is to hide links, right? I am using in an intranet where right click and view source have been disabled. Most of thee links are activeX, and I don't want for people to see it.
http://www.vortex-webdesign.com/help/hidesource.htm
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app
glenngv is offline   Reply With Quote
Old 02-02-2004, 04:22 AM   PM User | #13
Lionel
New Coder

 
Join Date: Feb 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Lionel is an unknown quantity at this point
thanks egquen2000, but that would not work for me as the window is the opener from a VB program.

And to all the clowns out there, this is being used in a totally controlled cybercafe environment where the windows shell has been taken over by another shell. Registry has been edited and even 'save as' has been disabled. plus many more protection. And that html page is not accessible to the outside world.

So before trying to be smart and unhelpful, you might want to open up your horizons a bit and stop behaving as morons, calling what you do not know 'silly scripts' or placing stupid links.
Lionel is offline   Reply With Quote
Old 02-02-2004, 04:29 AM   PM User | #14
Paul Jr
Regular Coder

 
Join Date: Dec 2003
Location: USA
Posts: 230
Thanks: 0
Thanked 0 Times in 0 Posts
Paul Jr is an unknown quantity at this point
Quote:
Originally posted by glenngv
http://www.vortex-webdesign.com/help/hidesource.htm
Lol.
Paul Jr is offline   Reply With Quote
Old 02-02-2004, 04:37 AM   PM User | #15
Willy Duitt
Banned

 
Join Date: Sep 2003
Posts: 3,620
Thanks: 0
Thanked 0 Times in 0 Posts
Willy Duitt is an unknown quantity at this point
Quote:
Originally posted by Lionel
thanks egquen2000, but that would not work for me as the window is the opener from a VB program.

And to all the clowns out there, this is being used in a totally controlled cybercafe environment where the windows shell has been taken over by another shell. Registry has been edited and even 'save as' has been disabled. plus many more protection. And that html page is not accessible to the outside world.

So before trying to be smart and unhelpful, you might want to open up your horizons a bit and stop behaving as morons, calling what you do not know 'silly scripts' or placing stupid links.
If you managed to control all you say you have.
Why haven't you completely disabled the status bar thru the registry?

.....Willy

BTW: Insulting the very people you are asking to help you
Willy Duitt is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:47 AM.


Advertisement
Log in to turn off these ads.