PDA

View Full Version : Link with 2 actions



masterstanf2k
January 1st, 2006, 05:06 AM
Hello, I was wondering if it was possible to make a link with too actions.

For example, I have a hidden span which opens up using javascript once you click on a link.

I was wondering if I could have the link do the following:
unhide the span and then scroll down to the anchor.

so.. it would be <a href="javascriptcall & #anchor">

What's the syntax?

skOOb
January 1st, 2006, 12:05 PM
you could try <a href="#anchor" onClick="javascript call">click</a>. Due to my laziness, it isn't tested. Just first thing I came up with.

hth

masterstanf2k
January 1st, 2006, 12:07 PM
actually, I used the javascript call as an example.... my true question is that I'm sure you all know the aim commands... so, what I'm trying to do is aim:goIm and aim:addBuddy from click one link.... possible?

skOOb
January 1st, 2006, 12:19 PM
you could write a javascript function or run the commands together.

ex:

<script language="javascript">
function goAIM() {
aim:goIm;
aim:addBuddy(); // don't know the syntax for aim
}
</script>

<a href="#" onClick="goAIM()">link</a>

or


<a href="#" onClick="aim:goIm(); aim:addBuddy();">link</a>

not tested, good luck though.