Sending two requests from one link

Hi everybody,

Is it possible to have a URL link i.e. <a href=""></a>, which sends out two requests to a site?

As an example, I want want to combine these two links. The first link loads files. The second link searches these files. But I want just one link, where went a user clicks on it, loads the files and then searches for it.

What would be the best way to implement something like this?

Thanks in advance!

Dave

Write a web service backed by, for example, javascript.

Ah cool! Thanks Jim.

Could you elaborate a little bit? I would create a JavaScript function (with two GET requests?) linked to the anchor and triggered by an onClick event?

That's all I could guess as to how I would use JavaScript to achieve this. Probably a silly approach.

I had a look here too Web service - Wikipedia, the free encyclopedia. But that just gave me an overview of the concept.

Thanks again!

So here's the solution I came up with, using JavaScript

<html>
   <head>
      <title>Link</title>

      <script type="text/javascript">
         <!-- hide
         function linkout(url){
            window.open('http://www.yahoo.com','newwindow');
            setTimeout("window.open('"+url+"','newwindow')",5000);
         }
         // done hiding -->
      </script>

   </head>

   <body>
   <input type="button" value="Go" onclick="linkout('http://www.google.com')"/>
   </body>
</html>

When a user clicks the Go button, a new window will open to Yahoo. After 5 seconds the Google search engine will open up in the same window ('newwindow'), which was exactly what I needed.