By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,518 Members | 1,216 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,518 IT Pros & Developers. It's quick & easy.

Can Hide Browser Statusbar

P: n/a
Hi,

this is confusing to me: When I clear the status bar to hide a hyperlink
using the below onmouseover event, the original status text (the hyperlink
target URI) re-appears when the user clicks the link and the new page is
loaded. What am I doing wrong?

TIA,
Axel Dahmen

<a href="javascript:document.forms["myFrm"].submit();"
onmouseover="status=''; return true;">
</a>


Sep 4 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Axel Dahmen said the following on 9/4/2005 4:02 PM:
Hi,

this is confusing to me: When I clear the status bar to hide a hyperlink
using the below onmouseover event, the original status text (the hyperlink
target URI) re-appears when the user clicks the link and the new page is
loaded. What am I doing wrong?


1) Using a link to submit a form.
2) Using the javascript: pseudo-protocol.
3) Munging around with the status bar.

<input type="submit" value="Submit the Form">

Now, you have no status bar text to be worried about.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Sep 4 '05 #2

P: n/a
Axel Dahmen wrote:
When I clear the status bar to hide a hyperlink using the below
onmouseover event, the original status text (the hyperlink
target URI) re-appears when the user clicks the link and the new page is
loaded. What am I doing wrong?


1: http://jibbering.com/faq/#FAQ4_24

2: Trying to submit a form by having the user click on something other than
a submit button.

3: Trying to hide information from the user in the first place. Leave the
status bar alone.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Sep 4 '05 #3

P: n/a


You're setting window.status upon mouseover, it never gets unset, until
another event writes to it, onmouseover sets, onmouseout unset :), however,
in default settings for mozilla/ff access to the window.status object is
canceled if you check the js options under Edit > preferences, so,
window.status='anything' won't work using default settings in mozilla/ff.

Danny
Sep 4 '05 #4

P: n/a
Thanks for the responses. Actually I was asking for a solution not for
attitude....

I need to code it this way for three reasons:

1) The destination page only accepts form parameters, no query string. I
have no influence on that.

2) My page is a list containing items. There's nothing quicker to handle
than one single click, hence this solution is user-frienly.

3) I don't want the user to read "javascript:submitForm(...)". It's not
his/her business.
So my question again: Is it possible to keep the status bar clean even when
the user has clicked on one of the hyperlinks?

TIA,
Axel Dahmen
Sep 5 '05 #5

P: n/a
Axel Dahmen wrote on 05 sep 2005 in comp.lang.javascript:
3) I don't want the user to read "javascript:submitForm(...)". It's
not his/her business.
So my question again: Is it possible to keep the status bar clean even
when the user has clicked on one of the hyperlinks?


So don't use hyperlinks

<span onclick='submitForm(...);' style='cursor:pointer;'>
submitform</a>

or

<button onclick='submitForm(...);'>
submitform</button >

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Sep 5 '05 #6

P: n/a
Thanks Evertjan, I'll try these.

Regards,
Axel Dahmen
--------------
"Evertjan." <ex**************@interxnl.net> schrieb im Newsbeitrag
news:Xn*******************@194.109.133.242...
Axel Dahmen wrote on 05 sep 2005 in comp.lang.javascript:
3) I don't want the user to read "javascript:submitForm(...)". It's
not his/her business.
So my question again: Is it possible to keep the status bar clean even
when the user has clicked on one of the hyperlinks?


So don't use hyperlinks

<span onclick='submitForm(...);' style='cursor:pointer;'>
submitform</a>

or

<button onclick='submitForm(...);'>
submitform</button >

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Sep 5 '05 #7

P: n/a
Axel Dahmen wrote:
Thanks for the responses. Actually I was asking for a solution not for
attitude....
"Get real! This is a discussion group, not a helpdesk. You post something,
we discuss its implications. If the discussion happens to answer a question
you've asked, that's incidental." -- nobull in comp.lang.perl.misc
1) The destination page only accepts form parameters, no query string. I
have no influence on that.
So use a submit button as suggested (instead of JavaScript and a hyperlink).
2) My page is a list containing items. There's nothing quicker to handle
than one single click, hence this solution is user-frienly.
A submit button only requires one single click, so a submit button is also
user-friendly.
3) I don't want the user to read "javascript:submitForm(...)". It's not
his/her business.


Leaving aside the fact that what a webpage asks a user's browser to do IS
the business of the user ... use a submit button and it won't display that.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Sep 5 '05 #8

P: n/a
Well , you could have your script assign the onclick event
dynamicly such as in this faux a:hover demo
http://66.33.202.15/projects/jsDHTML...ver/Hover.html

None of the attributes in the <a></a> reflect the scripting
being used to make the fake a:hover effect.

Since the code used *inserts* the event handler in memory , they are not
seen, and additionally since it *inserts* the event handler, it leaves
any existing onWhatever= attributes specified in the page intact and
functioning.

The href can contain anything you want. The onmouseover,onclick or
whatever can look any way you type it, and your "hidden" handler
will still run
Axel Dahmen wrote:
Thanks for the responses. Actually I was asking for a solution not for
attitude....

I need to code it this way for three reasons:

1) The destination page only accepts form parameters, no query string. I
have no influence on that.

2) My page is a list containing items. There's nothing quicker to handle
than one single click, hence this solution is user-frienly.

3) I don't want the user to read "javascript:submitForm(...)". It's not
his/her business.
So my question again: Is it possible to keep the status bar clean even when
the user has clicked on one of the hyperlinks?

TIA,
Axel Dahmen


--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML/CSS,Javascript,TCP ...
--`
Sep 5 '05 #9

P: n/a
Dr Clue said the following on 9/5/2005 3:19 PM:
Well , you could have your script assign the onclick event
dynamicly such as in this faux a:hover demo
http://66.33.202.15/projects/jsDHTML...ver/Hover.html

None of the attributes in the <a></a> reflect the scripting
being used to make the fake a:hover effect.

Since the code used *inserts* the event handler in memory , they are not
seen, and additionally since it *inserts* the event handler, it leaves
any existing onWhatever= attributes specified in the page intact and
functioning.

The href can contain anything you want. The onmouseover,onclick or
whatever can look any way you type it, and your "hidden" handler
will still run


That advice is almost, but not quite, as bad as the original way of
doing it. All of that extra work and coding can be done away with,
completely, and without even using some "library". You use a submit
button and your problem is gone.

Learn to quote.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
Sep 5 '05 #10

P: n/a


Randy Webb wrote:
Dr Clue said the following on 9/5/2005 3:19 PM:
Well , you could have your script assign the onclick event
dynamicly such as in this faux a:hover demo
http://66.33.202.15/projects/jsDHTML...ver/Hover.html
<snip> That advice is almost, but not quite, as bad as the original way of
doing it. All of that extra work and coding can be done away with,
completely, and without even using some "library". You use a submit
button and your problem is gone.


Actually the jsDHTMLlib.js is not used for the event capturing aspect,
so the 25 lines of relevant code is no big deal, and they can simply
cut-n-paste, and point it to their desired function.

As to the choice of using a button or a link, I do agree with you
that the button would be a cleaner approach.

I don't tend to argue with the questions that much, but rather just
answer them, allowing the "discussion" aspect of the ng to play out.

I'm pretty sure the button approach has been championed
by at least yourself, so I'm just answering the question and
allowing the OP to dine on everyones thoughts, including yours.

As to the trolling aspect of your response. ( not interested ), but
thanks for offering.

--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML/CSS,Javascript,TCP ...
--`
Sep 5 '05 #11

P: n/a
Lee
Axel Dahmen said:

Hi,

this is confusing to me: When I clear the status bar to hide a hyperlink
using the below onmouseover event, the original status text (the hyperlink
target URI) re-appears when the user clicks the link and the new page is
loaded. What am I doing wrong?

TIA,
Axel Dahmen

<a href="javascript:document.forms["myFrm"].submit();"
onmouseover="status=''; return true;">
</a>


1. You're using a side-effect of the "javascript:" pseudo-protocol
to submit a form. That's always a bad idea.

2. You're trying to hide the URL in the status bar. That's silly
and impossible in many modern browsers.

3. You're expecting the status to remain cleared after a new
page has loaded.

Sep 5 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.