onFocus/onBlur

T

the good guy

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.font.fstag.fgColor='black'"
onBlur="document.bgColor='#D6D3CE';document.body.font.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!
 
K

kaeli

good@thinking enlightened us said:
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.

--
 
T

the good guy

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
 
K

kaeli

good@thinking enlightened us said:
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

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top