"javascript:" statement

wxdqz

New Member
I want to use the html code:
<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:???">Link</a>
so that when the user clicks "Link" something happens

This works fine if I have a function in the head of the document and I refrence it like - "javascript:someFunction()"

But if I put the code for the function in the statement like - "javascript:if(document.getElementById('some').style.visibility=='visible')document.getElementById('s ome').style.visibility=='hidden'" - it doesn't work. The browser goes to a page <!-- w --><a class="postlink" href="http://www.domain.com/javascript:whateverCodeHere">www.domain.com/javascript:whateverCodeHere</a><!-- w --> . Why?

I need to put the code in the <a> tag because the html is an email, and email programs do not allow <script> tags when the code is interpreted

--Edit--

javascript is one word, I know! The forum software separates it. I typed it as one word.

--/Edit--
 
Top