Solved

Outlook FLASHING Signature

Posted on 2000-04-05
35
3,040 Views
Last Modified: 2012-05-04
I use Microsoft Outlook 98 and got one of my mates to write me a bit of code some that my name could flash in my messages, because I have enabled HTML message format. He gave me the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
</HEAD>
<BODY><BR>
<P><FONT color=#ff0000 face=Tahoma size=2>Regards</FONT> </P><SPAN id=ME
style="COLOR: black; FONT-FAMILY: Tahoma; FONT-SIZE: smaller; FONT-WEIGHT: bolder">Simon
<BR><BR>LAN Support MFD &amp; FRD Chatham</SPAN> <FONT color=#ff0000 face=Tahoma
size=2><BR>(01634) 111111 <BR><A href="mailto:myemailaddress@mywork.com"
style="COLOR: red">myemailaddress@mywork.com</A>
<SCRIPT language=JavaScript><!--
var iTimer=null

function flashName(){
if(ME.style.color=="black"){
      ME.style.color="red"
      }
else
      {
      ME.style.color="black"
      }
}
flashName();
iTimer = window.setInterval("flashName()",1000);

function unloadEvent(){
//alert("BYE!")
}

function loadEvent(){
//alert("Read it!")
}
//--></SCRIPT>
 </FONT></BODY></HTML>

Which worked great. Except for one thing. I have Outlook inserting my signature every time I create an a new message, reply to a message, forward a message. Sometimes, after people have replied to my messages a few times, and messages have gone backwards and forwards, it comes up with a Internet Explorer style error saying something like 'me.style.color is not an object'.

Now I went back to the guy who wrote the code for me and he said this:

"It is because the area of the text which flashes is identified as SGML by using an ID in the SPAN tag.  When you include your signature more than once on a page, the SGML ID is duplicated, so it becomes an array, which needs to be referenced by original position to uniquely identify the specific area you want to call.  So, the answer is to either add some array handling code, or just don't ever put your signature on any message more than once."

I don't want to only put my signature in a message ONLY once, so does anyone know how to do what he's talking about?? Or how to fix this??

Cheers.

SI
--
P.S. Sorry I couldn't offer more points, but I'm getting a bit short of them!
0
Comment
Question by:simonprr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 16
  • 16
  • 2
  • +1
35 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2688827
Hmm - people who sends messages with flashing signatures DESERVES having me.style.color not an object errors

Am I glad I user messenge and can turn javascript off in messages (which kills stylesheets)

Michel
0
 
LVL 3

Author Comment

by:simonprr
ID: 2689018
Well thats helpful! CHEERS!

not.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2689055
Will this be ok? Only the newest one blinks

function flashName() {
   if (Idocument.all) return; // only do it in IE
   if (document.all.ME(0).style.color=="black") {
      document.all.ME(0).style.color="red"
   }
   else {
      document.all.ME(0).style.color="black"
   }
}


Michel
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2689057
Sorry - hit the wrong key
 if (Idocument.all) return; // only do it in IE

should be
 if (!document.all) return; // only do it in IE
0
 
LVL 3

Author Comment

by:simonprr
ID: 2689268
Could you post the whole code again, including your amendments so that I know exactly where to put it and so that I can just copy and paste it to test it.

Cheers.
0
 
LVL 3

Author Comment

by:simonprr
ID: 2689277
Well I've just tried it, as below:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
</HEAD>
<BODY><BR>
<P><FONT color=#ff0000 face=Tahoma size=2>Regards</FONT> </P><SPAN id=ME
style="COLOR: black; FONT-FAMILY: Tahoma; FONT-SIZE: smaller; FONT-WEIGHT: bolder">Simon
<BR><BR>LAN Support MFD &amp; FRD Chatham</SPAN> <FONT color=#ff0000 face=Tahoma
size=2><BR>(01634) 392547 <BR><A href="mailto:Simon.Ratcliff@Lloyds.Com"
style="COLOR: red">Simon.Ratcliff@Lloyds.Com</A>
<SCRIPT language=JavaScript><!--
var iTimer=null

function flashName() {
   if (!document.all) return; // only do it in IE
   if (document.all.ME(0).style.color=="black") {
      document.all.ME(0).style.color="red"
   }
   else {
      document.all.ME(0).style.color="black"
   }
}

flashName();
iTimer = window.setInterval("flashName()",1000);

function unloadEvent(){
//alert("BYEBYEBYE!")
}

function loadEvent(){
//alert("Read it, maaaan!")
}
//--></SCRIPT>
 </FONT></BODY></HTML>

And the error is:

'object doesn't support this property or method'

Whats wrong?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2689378
Sorry, my fault for not testing with only one ;-)

This one works with one or more sigs

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
</HEAD>
<BODY><BR>
<P><FONT color=#ff0000 face=Tahoma size=2>Regards</FONT></P>
<SPAN id="ME" style="COLOR: black; FONT-FAMILY: Tahoma; FONT-SIZE: smaller; FONT-WEIGHT: bolder">Simon <BR><BR>LAN Support MFD &amp; FRD Chatham</SPAN> <FONT color=#ff0000 face=Tahoma size=2><BR>(01634) 392547 <BR><A href="mailto:Simon.Ratcliff@Lloyds.Com" style="COLOR: red">Simon.Ratcliff@Lloyds.Com</A>
<SCRIPT language=JavaScript><!--
var iTimer=null;

function flashName() {
   if (!document.all) return; // only do it in IE
   if (document.all.ME.length >0) obj = document.all.ME(0);
   else obj = document.all.ME;
   if (obj.style.color=="black")
      obj.style.color="red";
   else
      obj.style.color="black";
}

flashName();
iTimer = window.setInterval("flashName()",1000);

function unloadEvent(){
//alert("BYEBYEBYE!")
}

function loadEvent(){
//alert("Read it, maaaan!")
}
//--></SCRIPT>
 </FONT></BODY></HTML>

Michel
0
 
LVL 3

Author Comment

by:simonprr
ID: 2689467
Well, that was very close, but now I get this error after about 4 replies backwards and forwards:

line 64
char 4
'obj.style.color is not an object'

Plus I had to change this bit from:

   if (document.all.ME.length >0) obj = document.all.ME(0);

to:


   if (document.all.ME.length >1000) obj = document.all.ME(0);

otherwise the flashing is almost impossible to see, after the second reply - the first is ok.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2689479
The length has nothing to do with the speed, only the number of spans called ME

Michel
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2689516
I have no problems with 25 copies in IE - perhaps it is an outlook problem???

Michel
0
 
LVL 3

Author Comment

by:simonprr
ID: 2689974
Does anyone else read these javascript questions???

0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2690134
Normally yes - perhaps they think it is too long a discussion.

Michel
0
 

Expert Comment

by:LakeHMM
ID: 2698679
I know that this will work using HTML on a Netscape Browser:
<blink>[NAME]</blink>.  [NAME] stands for your name.  If it doesn't work then I will tell you a way to have it scroll across as long as you give me the points because I'm a bit short on them also.  I just signed up and you're the first person I'm answering.
0
 
LVL 3

Author Comment

by:simonprr
ID: 2699288
Well, I don't need this to work in a netscape browser!!

I need it too work in my outlook 98 messages, which it still isn't.

The reason I think it's NOT working is something to do with the actual message text which is being typed in to my messages are they go back and forth between me and someone, this must be the reason why it is causing the error:

line 64
char 4
'obj.style.color is not an object'

mplungjan, you said that you have put 25 copies in internet explorer. Well try putting some TEXT in between them and see if you get the error.

lakehmm, you said your short of points, well if i did accept you answer they would go into your 'expert points' and u can't use these for anything. They are just to show how good u are u see. You need more 'spendable' points, try going to the bit which is called 'earn more points'.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2699555
Simon: Sorry, my PC is on the blink right now and I am using a colleague's
I will try later...

LakeHmm: If you just signed on, please hang around and learn the ropes.
If you read the comments on this question and see the complexity of the rejected answer you should think that <BLINK> is not really an answer that would help Simon ;-)

Michel
0
 
LVL 3

Author Comment

by:simonprr
ID: 2699781
LakeHmm,

The other thing is that you should always first post comments instead of answers because it locks the question.
I'm rejecting your suggestion for the time being, and when the correct comment is posted I will 'accept as answer'. As this question could last a bit longer till my problem is sorted.

Ok cheers.
0
 
LVL 3

Author Comment

by:simonprr
ID: 2703429
Does anyone else every read javascript questions apart from 2 people?????!!!

Please help if u can.

Cheers.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2703476
A lot of people read the javascript questions. I can imagine that this one is a bit too far out to be looked at since I have suggested a solution that I doubt can be improved upon unless someone has a very good knowledge of how the DOM in outlook is put together...

Michel
0
 
LVL 3

Author Comment

by:simonprr
ID: 2703502
Can't you help anymore then?
0
 

Expert Comment

by:LakeHMM
ID: 2706206
I wouldn't recommend answering this question to anyone because if it gets rejected (which it probably will be) he will chew you out and get all mad at you in a bad attitude.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2706882
Hmm - not a good grading history, simon...

I like Abba but not if it comes on Dcc ;-)

Michel
0
 
LVL 3

Author Comment

by:simonprr
ID: 2707162
Well I'm only honest!! If you not honest about if the answer truely answers the question, then whats the point????

What do you mean 'dcc'??

Does this mean your not going to help anymore?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2707312
Your last 10 grades given was B D C C A C A B B A

I prefer to have my answers rejected rather than a C.

I mostly get A's because my answers work - I would not want them accepted if they did not work ;-)

I just asked EE to not allow a C grade in the Accept Comment as an answer for the same reason.

It is not that I do not want to help you, I do not believe I can help you further if what I have suggested so far does not work.

If you want this question reevaluated, try posting a 0 point question with a link to this since it has scrolled off the visible list.

If not, delete it or have Customer Services save it as a PAQ

Michel
0
 
LVL 3

Author Comment

by:simonprr
ID: 2707370
That isn't that bad!

If maybe you visit some of those other questions and have a look at them you will understand WHY I have been FAIR in my GRADING!!

I was going to give you an A anyway, because your suggestions were almost right anyway.

WHAT IS THE POINT OF GIVING SOMEONE ANY A GRADE, IF THERE ANSWER DOES FIX THE PROBLEM OR ANSWER THE QUESTION, BUT IS NOT THE BEST WAY OF DOING IT OR IS JUST THE MOST ONLY SUITABLE WAY?? THE POINT OF THE GRADES IS TO SHOW HOW GOOD THE ANSWER IS. IT WOULD NOT HELP NEW USERS SEEING SOMEONE HAD GIVEN THE ANSWER AN A GRADE WHEN REALLY IT'S ONLY A WORK AROUND OR TEMPORARY FIX.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2707640
That is ok - I was not trying to make you give me points or anything like that. I just wondered aloud. What I meant was that in javascript anyway, I do not see C grades, because it either works or not. If it does not work, then I do not want the points unless the answer is "It cannot be done"

Sorry if I offended you...

Michel
0
 
LVL 3

Author Comment

by:simonprr
ID: 2707817
Yes, well that make sense in the Javascript and NT (for examples) sections. But I spend a lot of time in the Hot URLs section and that is where it apply's most of time.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2707864
I can't say that you are being nice to the people around here, but here goes.

A signature in Outlook may only be 4K big. Also the HTML code int Outlook has a limitation (dunno how much Kb though). So, since the signature is at the end of the file, it won't be shown
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2707915
Ah - so if the SIG is chopped in memory it might be visible, but the script cannot find it...

Perhaps if one was to use two sigs, one with the script and one with the div and only include the script one once...

Michel
0
 
LVL 3

Author Comment

by:simonprr
ID: 2708172
What do you mean?:

'I can't say that you are being nice to the people around here, but here goes.'

me and mplungjan just had a *discussion* about grades. Whats wrong with that?
0
 
LVL 3

Author Comment

by:simonprr
ID: 2722533
mplungjan,

I'm confused by your last comment, can you post what you mean in code please?

Thanks.
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 55 total points
ID: 2722615
I have not tested this, but if you include this in the first message

<FONT color=#ff0000 face=Tahoma size=2>Regards</FONT></P>
<SPAN id="ME" style="COLOR: black; FONT-FAMILY: Tahoma; FONT-SIZE: smaller; FONT-WEIGHT: bolder">Simon <BR><BR>LAN Support MFD &amp; FRD Chatham</SPAN> <FONT color=#ff0000 face=Tahoma size=2><BR>(01634) 392547 <BR><A href="mailto:Simon.Ratcliff@Lloyds.Com" style="COLOR: red">Simon.Ratcliff@Lloyds.Com</A>
<SCRIPT language=JavaScript><!--
var iTimer=null;

function flashName() {
   if (!document.all) return; // only do it in IE
   if (document.all.ME.length >0) obj = document.all.ME(0);
   else obj = document.all.ME;
   if (obj.style.color=="black")
      obj.style.color="red";
   else
      obj.style.color="black";
}
flashName();
iTimer = window.setInterval("flashName()",1000);
//--></SCRIPT></FONT>


and this after...

<FONT color=#ff0000 face=Tahoma size=2>Regards</FONT></P>
<SPAN id="ME" style="COLOR: black; FONT-FAMILY: Tahoma; FONT-SIZE: smaller; FONT-WEIGHT: bolder">Simon <BR><BR>LAN Support MFD &amp; FRD Chatham</SPAN> <FONT color=#ff0000 face=Tahoma size=2><BR>(01634) 392547 <BR><A href="mailto:Simon.Ratcliff@Lloyds.Com" style="COLOR: red">Simon.Ratcliff@Lloyds.Com</A></FONT>

Only a guess.

Michel
0
 
LVL 3

Author Comment

by:simonprr
ID: 2772402
Still can't get it to work...
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2772573
Sorry to hear it. I did not have too high a hope from the beginning...
0
 
LVL 3

Author Comment

by:simonprr
ID: 2772591
Probably the closed I'm going to get!
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2772607
Thanks.

Michel
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question