- Joined
- May 28, 2011
- Messages
- 10,996
This is definitely an Off-Topic question and I was planning to ask it on a few other sites when I thought to myself, there are a lot of programmers here, some I'm sure have very good HTML experience.
So my question is: How can I add a mouseover event to an HTML email? I am able to generate an HTML code that displays mouseover events correctly in a web browser but not an Email. I'm not an expert at this and my luck at finding something on the internet has puttered out. I'm about to just give up but I need to ask to see if someone is able to help me out.
As many of you know, I'm maintaining the Multi-Report script and in there is a few tables that are generated. When there is a value that gets overridden back to zero I change the background color to a light yellow to indicate this value is not actually zero. An example is UDMA_CRC_ERROR_COUNT which as we all know, are permanently stored on a hard drive even after you fix the problem. So in the script we zero (normalize) it out so we can clearly see if more errors occur in the future. I have a single hard drive that I have 15 CRC errors, then I fixed the SATA data cable and they stopped.
What I'm trying to do now is update the script so that in the email, when we mouseover the yellow area that the actual value will pop up. So when I mouseover the yellow background with a "0" displayed, a popup of "15" will be displayed.
Below is part of the script in question and I'm including the entire script as an attached file. Please note that this is not a final released script, I'm making a lot of minor changes and I have not tested it out very well. I just don't want someone to think they are getting an advanced copy, it's not ready for that, but it does work in general.
The code below is just for how I handle the creation of the crc errors cell. It comes from line 1989 in the script.
Here is what I want it to do (mouse pointer disappeared when I took the screen shot) this is what the web browser does, not an email:
If you wanted to test run the script, go to line 685 and change Sample_Test="false" to ="true"
Next go to line 1663 where you will find a bunch of variables commented out. Go to line 1674 and remove the "#" and you will now have 2 crc errors on every drive.
Lastly, this script as-is also creates a file called "output.html" so you can see the file generated. This file also is part of the email sent out. Yesterday I lost the internet for 12 hours, sucked, so I found a way around it but since I couldn't do it in Email, it didn't help that much. I got the web browser to work but the email fell flat.
If you have never run this script, it will tell you to create an external configuration file. Just follow the directions and all should be good. And if you find somthing wrong with the directions, please let me know. It's tuff to make it Sailor Proof.
My fall-back is to add the value in parentheses, and I'm apt to add that as an option, especially if an email client refuses to accept the mouseover.
Any help is appreciated.
So my question is: How can I add a mouseover event to an HTML email? I am able to generate an HTML code that displays mouseover events correctly in a web browser but not an Email. I'm not an expert at this and my luck at finding something on the internet has puttered out. I'm about to just give up but I need to ask to see if someone is able to help me out.
As many of you know, I'm maintaining the Multi-Report script and in there is a few tables that are generated. When there is a value that gets overridden back to zero I change the background color to a light yellow to indicate this value is not actually zero. An example is UDMA_CRC_ERROR_COUNT which as we all know, are permanently stored on a hard drive even after you fix the problem. So in the script we zero (normalize) it out so we can clearly see if more errors occur in the future. I have a single hard drive that I have 15 CRC errors, then I fixed the SATA data cable and they stopped.
What I'm trying to do now is update the script so that in the email, when we mouseover the yellow area that the actual value will pop up. So when I mouseover the yellow background with a "0" displayed, a popup of "15" will be displayed.
Below is part of the script in question and I'm including the entire script as an attached file. Please note that this is not a final released script, I'm making a lot of minor changes and I have not tested it out very well. I just don't want someone to think they are getting an advanced copy, it's not ready for that, but it does work in general.
The code below is just for how I handle the creation of the crc errors cell. It comes from line 1989 in the script.
Code:
if [[ $crcErrorsColor != $ovrdColor ]] && [[ $Mouseover == "true" ]]; then if [[ "$1" == "HDD" ]] && [[ "$HDD_UDMA_CRC_Errors" == "true" ]]; then printf "<td style=\"text-align:center; background-color:%s; height:25px; border:1px solid black; border-collapse:collapse; font-family:courier;\">%s</td>\n" "$crcErrorsColor" "$crcErrors"; fi if [[ "$1" == "SSD" ]] && [[ "$SSD_UDMA_CRC_Errors" == "true" ]]; then printf "<td style=\"text-align:center; background-color:%s; height:25px; border:1px solid black; border-collapse:collapse; font-family:courier;\">%s</td>\n" "$crcErrorsColor" "$crcErrors"; fi else if [[ "$1" == "HDD" ]] && [[ "$HDD_UDMA_CRC_Errors" == "true" ]]; then printf "<td style=\"text-align:center; background-color:%s; height:25px; border:1px solid black; border-collapse:collapse; font-family:courier;\"><span title=%s>%s</span></td>\n" "$crcErrorsColor" "$crcErrorsOrig" "$crcErrors"; fi if [[ "$1" == "SSD" ]] && [[ "$SSD_UDMA_CRC_Errors" == "true" ]]; then printf "<td style=\"text-align:center; background-color:%s; height:25px; border:1px solid black; border-collapse:collapse; font-family:courier;\"><span title=%s>%s</span></td>\n" "$crcErrorsColor" "$crcErrorsOrig" "$crcErrors"; fi fi
Here is what I want it to do (mouse pointer disappeared when I took the screen shot) this is what the web browser does, not an email:
If you wanted to test run the script, go to line 685 and change Sample_Test="false" to ="true"
Next go to line 1663 where you will find a bunch of variables commented out. Go to line 1674 and remove the "#" and you will now have 2 crc errors on every drive.
Lastly, this script as-is also creates a file called "output.html" so you can see the file generated. This file also is part of the email sent out. Yesterday I lost the internet for 12 hours, sucked, so I found a way around it but since I couldn't do it in Email, it didn't help that much. I got the web browser to work but the email fell flat.
If you have never run this script, it will tell you to create an external configuration file. Just follow the directions and all should be good. And if you find somthing wrong with the directions, please let me know. It's tuff to make it Sailor Proof.
My fall-back is to add the value in parentheses, and I'm apt to add that as an option, especially if an email client refuses to accept the mouseover.
Any help is appreciated.