473,387 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

onFocus/onBlur

For those who have been using Outlook Express, you must be pretty used to
the fact that whenever you focus on the preview section, the header for the
preview turns from grey to blue, while the text turns from black to white.

Here is my HTML script

###############################
<body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"
onFocus="document.bgColor='orange';document.body.f ont.fstag.fgColor='black'"
onBlur="document.bgColor='#D6D3CE';document.body.f ont.fstag.fgColor='white'"
bgcolor="#D6D3CE">
<table width="100%" height="100%" cellpadding="0" cellspacing="0"
border="0">
<tr>
<td width="100%" height="40"
style="border-width:1px;border-style:solid;border-color:threedhighlight
threeddarkshadow threeddarkshadow threedhighlight;" name="ts" id="ts">
<table width="100%" height="100%" cellpadding="0" cellspacing="3"
border="0">
<tr>
<td><font name="fstag"
style="font-family:tahoma;font-size:8pt;font-weight:bold">From:<br>Subject:<
/font></td>
<td>Actions</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="white" height="95%">&nbsp;</td>
</tr>
</table>
</body>
###############################

In this case, I want to change the text color for the word "From:" &
"Subject:" whenever this frame is being onFocus. Anyone figure out on this?
Thanks!
Jul 23 '05 #1
3 3888
In article <42********@news.starhub.net.sg>, good@thinking enlightened us
with...
For those who have been using Outlook Express, you must be pretty used to
the fact that whenever you focus on the preview section, the header for the
preview turns from grey to blue, while the text turns from black to white.

Here is my HTML script


Anyone who allows script to run in their email client is just asking for
problems.
Most of us would never allow script to run in e-mail.
Those who do are either ignorant of the risks or very trusting of others. ;)

Then there are those of us who won't even allow images to show by default in
our client. :p

Since this sort of thing would only work in Outlook, I assume you know for
sure your users are only using Outlook? It's not like there aren't several
other popular clients out there, plus all the web-based clients like hotmail,
yahoo, and gmail.

--
--
~kaeli~
A man needs a mistress... just to break the monogamy.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
Hi Kaeli,

Nope. It's not an email system. I developed a system that is based in
Microsoft Outlook Express GUI. Instead of emails, it is transactions about
mails, fax and phone, just like what you see in FEDEX systems. We're in the
logistic & mail services business.

All I require is that of a javascript command that can allow onfocus and
onblur of a certain frame object.

Cheers,
Peter Tan


"kaeli" <ti******@NOSPAM.comcast.net> wrote in message
news:MP************************@nntp.lucent.com...
In article <42********@news.starhub.net.sg>, good@thinking enlightened us
with...
For those who have been using Outlook Express, you must be pretty used to the fact that whenever you focus on the preview section, the header for the preview turns from grey to blue, while the text turns from black to white.
Here is my HTML script

Anyone who allows script to run in their email client is just asking for
problems.
Most of us would never allow script to run in e-mail.
Those who do are either ignorant of the risks or very trusting of others.

;)
Then there are those of us who won't even allow images to show by default in our client. :p

Since this sort of thing would only work in Outlook, I assume you know for
sure your users are only using Outlook? It's not like there aren't several
other popular clients out there, plus all the web-based clients like hotmail, yahoo, and gmail.

--
--
~kaeli~
A man needs a mistress... just to break the monogamy.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #3
In article <42********@news.starhub.net.sg>, good@thinking enlightened us
with...
Hi Kaeli,

Nope. It's not an email system.
Ah, sorry, I misunderstood your comment about Outlook, then.
I developed a system that is based in
Microsoft Outlook Express GUI. Instead of emails, it is transactions about
mails, fax and phone, just like what you see in FEDEX systems. We're in the
logistic & mail services business.

All I require is that of a javascript command that can allow onfocus and
onblur of a certain frame object.


Is this a real browser window or a component object?
Assuming it's a real browser window, a frame is still just a window object.
You can do all the same things with it, including trap onFocus and onBlur.
If the html/script that you posted is what you actually are trying to use, it
doesn't work because you're addressing the properties all wrong. I looked at
that and thought it was some sort of Outlook script or something. :)
You don't apply style to a font tag. You apply style to an actual element in
the page and ditch the font tag.
And WTF is this?
style="border-width:1px;border-style:solid;border-color:threedhighlight
threeddarkshadow threeddarkshadow threedhighlight;"

Make your stuff use CSS classes properly and then check this out. I think
it's more what you're going for.
http://www.webreference.com/js/column66/8.html

--
--
~kaeli~
I can't sleep. The clowns might eat me.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rich Morey | last post by:
Hello, I have created a form and assigned each of the form elements to a class in a style sheet. I would like to know if it is possible to add 'OnFocus' and 'OnBlur' events to the style sheet...
1
by: Tzachi | last post by:
Hello all, I have a function that dynamically adds rows and columns to the page. Everything works well except onfocus // onblur attributes. For some reason, when entering the input box it...
1
by: Eric Trav | last post by:
Hello, I am using mozilla and javascript to change the style background color for my select with onfocus() and back to white with onblur(). When i process onfocus(); i have to click on the...
11
by: sybmathics | last post by:
Hi, I'm developing a website where a visistor does not have to use the mouse. All he has to do is use the Tab-key or key-combinations to jump to specific hyperlinks (containing accesskeys)....
3
by: Nebulus | last post by:
Hey all. I'm working on some VERY big forms, and the user will easily lose their location if they get distracted - which happens a lot with the amount of phone traffic they get. Anyway, I have a...
2
kestrel
by: kestrel | last post by:
i have a form, and i want to change the forms css class onfocus, then change back onblur... how can i do this?
1
by: clemtig | last post by:
Say I have a form with two input textfields. Each has an onFocus and onBlur. onFocus will unhide image #1. onBlur will hide image #1, show image #2 and validate the textfield. But the problem is that...
2
by: wolverine | last post by:
Hi All, In Mozilla Firefox, to onblur and onfocus event of each and every html element, the browser itself will attach a native event handler. I mean if you type,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.