SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Javascript After URL

    Is it possible to have a link that when clicked, executes the javascript on a different page?

    For example, to download a particular file, the person must click this link, and then click on "download," which executes a javascript action. A popup then confirms that the download was successful. Would it be possible for all of this to happen from clicking on one link instead of the two that you have to?
    Last edited by Mittineague; Aug 2, 2011 at 01:58. Reason: removing unnecessary link

  2. #2
    SitePoint Addict tlacaelelrl's Avatar
    Join Date
    Apr 2011
    Location
    Mexico city, Mexico
    Posts
    353
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by broccollipie View Post
    Is it possible to have a link that when clicked, executes the javascript on a different page?

    For example, to download a particular file, the person must click this link, and then click on "download," which executes a javascript action. A popup then confirms that the download was successful. Would it be possible for all of this to happen from clicking on one link instead of the two that you have to?
    It is possible, just add a normal anchor with the link and then in the referenced page call the function without any user interaction
    Do you get bothered because I do the same thing every day?
    Do you question why I do it?
    Then find something that you actually like doing!!!

    Stop thinking on what I do.

  3. #3
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I neither own nor influence the site I am linking to.
    Any way to do this without that?

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    100 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by broccollipie View Post
    I neither own nor influence the site I am linking to.
    Any way to do this without that?
    Nope.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Tags for this Thread

Bookmarks

Posting Permissions

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