Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Mar 2003
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Spawning multiple events

    I'm not sure how to go about this. I want to be able to cause two events when someone clicks on a link. For example, go to a new page AND spawn a pop-up. Or, go to a new page AND activate an audio file.

    Here's the catch: I can't put the pop-up or audio code in the new page.

    Thanks in advance.
    David

  • #2
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    a link?
    <a href="" onclick="">blah</a>
    i think you can use document.writein to not have the code on a new page.
    its best to use writein, in a new window or frame.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <A HREF="#" OnClick="dothis();dothat();">blah</A>

    the # is a way of saying do nothing, its for a bookmark use normally but in this case it goes no where. the functions will be executed in the order there in.

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by scroots
    the # is a way of saying do nothing
    But of course you wouldn't really do that would you .. obviously in practise you'd have a real HREF so that it's a normal link for non-javsacript browsers
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Netscape

    yes but it goes to the page in the link and doesn't do your javascript for javascript enable browsers

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •