TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
onclick should work in all browsers and should be coded like so:
onclick="doSomething()"
Try changing your code to match and see if it fixes your problem (lose the colon and add the quotes).
Jan C.
>________________________________
> From: "McLauchlan, Kevin" <Kevin -dot- McLauchlan -at- safenet-inc -dot- com>
>To: "techwr-l -at- lists -dot- techwr-l -dot- com" <techwr-l -at- lists -dot- techwr-l -dot- com>
>Sent: Monday, September 3, 2012 10:50 AM
>Subject: html/css question
>
>Wiser, and more HTML/CSS-proficient brains than mine are asked:
>
>Can you tell me please why this specific code works in some browsers
>and not in others? And what, if anything, to do about it?
>
>The task:
>An intro page contained links to several things, including the main
>product documentation, the release notes, some white papers, etc.
>It was pointed out that all the links were similar-looking, and the
>most important one - the main docs - should stand out.
>
>The approach:
>So, in the <head> of my START_HERE.html page, I added this:
>
><script>
>function displayResult()
>{
>document.getElementById("p1").style.textDecoration="underline overline";
>}
></script>
>
>
>Then, down where the link text is, I surrounded the href like this:
>
>
><button type="button" onclick=:displayResult()><a href="./001-011136-003_myproduct_5-2_webhelp_rev-a/startpage.htm" target="_blank">My Product 5.2.x Help </a></button><br>
>
>Now, the appearance of the link is a nice, big, hard-to-miss button, in all browsers.
>Unfortunately, it is a working link only in Chrome or Iron or Safari browsers right now.
>It fails in IE9, Firefox, and Opera browsers... Click-click... nothing.
>Well, not totally nothing - it briefly inverts when clicked, but it doesn't function as a link
>
>Did I steal some deprecated code? Or...
>
>Thanks,
>
>-kevin
>
>PS: It doesn't need to be a button. Anything non-garish, to make the link text stand out a bit, would be fine.
>
>
>
>
>The information contained in this electronic mail transmission
>may be privileged and confidential, and therefore, protected
>from disclosure. If you have received this communication in
>error, please notify us immediately by replying to this
>message and deleting it from your computer without copying
>or disclosing it.
>
>
>
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Create and publish documentation through multiple channels with Doc-To-Help. Choose your authoring formats and get any output you may need.
>
>Try Doc-To-Help, now with MS SharePoint integration, free for 30-days.
>
>http://bit.ly/doc-to-help
>
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>You are currently subscribed to TECHWR-L as najnehoc -at- yahoo -dot- com -dot-
>
>To unsubscribe send a blank email to
>techwr-l-leave -at- lists -dot- techwr-l -dot- com
>
>
>Send administrative questions to admin -at- techwr-l -dot- com -dot- Visit
>http://www.techwhirl.com/email-discussion-groups/ for more resources and info.
>
>Looking for articles on Technical Communications? Head over to our online magazine at http://techwhirl.com
>
>Looking for the archived Techwr-l email discussions? Search our public email archives @ http://techwr-l.com/archives
>
>
>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Create and publish documentation through multiple channels with Doc-To-Help. Choose your authoring formats and get any output you may need.
Try Doc-To-Help, now with MS SharePoint integration, free for 30-days.