 |
| HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

April 4th, 2005, 08:34 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Control text font with Window.Status?
Is there a way that I can use to control the text font/color displayed with window.status?
Thanks.
|
|

April 6th, 2005, 09:51 PM
|
|
Authorized User
|
|
Join Date: Apr 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Status Bar
Tutorial Written By: Till
JavaScript gives you the ability to modify the status bar. For example it can be useful to display information about a link, when the user moves his mouse over it or you can display a small amount of information about the page the user is on in the status bar. You can also trick people into clicking a link, so be careful how you use it. If you play too many tricks on your visitors, they might not come back.
---http://www.htmlcenter.com/tutorials/tutorials.cfm/84/Javascript/
Googled:
Results 1 - 10 of about 31,100 for window.status html tutorial. (0.24 seconds)
In a world of give and take, take all you can and you die with nothing. Give all you can and you die with honor.
|
|

April 11th, 2005, 07:19 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks much, I'll read about it.
|
|

April 11th, 2005, 11:55 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I think this tutorial (and others) deal with the text on the status bar, and not its appearance (font etc) what the OP asked.....
AFAIK, there is no way to change the font of the status bar as this is controlled by the OS.
You could open a window without a status bar and create a positioned div of the size of a status bar and then add any HTML to that div. However, this feels like cheating, and is probably a lot of work.
Cheers,
Imar
|
|

April 11th, 2005, 01:25 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
Security aside (see below), I don't think it would be too hard. The biggest obstacle would be overcoming Explorer's lack of support for fixed positioning (provided you wanted to keep a no-frames site).
Of course it may also be bad UI design, people expect to see the link target there (I've never cared much for sites that change the text displayed there). But it might also make you look cool, provided your pseudo status bar provides similar functionality, like the link target and a description of that target in a different font or color than that used by the browser.
In any case you can mimick what the status bar displays first by either frames or fixed positioning and as Imar suggested, by adding the extra step of opening a new window minus the status bar. You can mimick the look and feel of the status bar via CSS User-Interface colors and fonts if you want to make it look like a native browser control but just tweak one or two aspects of the design.
As to the security implications... If you wanted to design a bogus bank website for instance, a malicious developer could set-up a pseudo status bar to display https://www.bank.com, while the real target is http://www.evil.com. Combine that with more javascript and CSS and you can totally fake the look and feel of the browser, including the real navbar location and browser buttons with a pseudo navbar and pseudo browser buttons of your own. It is for this very reason that browsers like Firefox make it much more difficult to disable those controls via JavaScript. In Firefox at least, you won't be able to disable the status bar, unless the user explicitly allows it via their preferences. I don't know about IE 6 XP SP 2, I haven't muddled with it recently, but it may too have this security feature for all I know.
Regards,
Rich
--
[ http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
|
|

April 11th, 2005, 01:40 PM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for the information and great insight. I meant to find something simple, very simple, to do it as a nice-to-have feature on my site.
But as you've mentioned, Rich, people may not even care what's displayed on the status bar - unless it is important enough to display the text in a neon-colored and flashy mode to catch their attention.
It can certainly make the designer or the developer look cool, but not much benefit to the users, so I guess a good developer shouldn't spend time sweathing on this. Agree?
|
|

April 11th, 2005, 01:51 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes, I very much agree. IMO, the status bar is there to display information about the status of the browser. People expect it to be a part of the browser, not of the site they are browsing.
If you need a location to display important information to a user, the other 98% of the screen estate are available to you. I was merely suggestion the custom status bar if you , for some reason, really need to change its font. Personally, I would never design / build a status bar like that.
To follow up on Rich's security issue, try this nice IE flaw: http://bmonday.com/articles/496.aspx
It no longer works on XP2, but it was really scary to see in earlier versions of IE/ Windows. Just follow the Exploit Demo....
Imar
|
|

April 11th, 2005, 02:15 PM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks Imar,
Great info!!
|
|
 |