The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Special Forums > Web Programming, Web 2.0 and Mashups
.
grep unix.com with google



Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics.

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-21-2009
z1dane's Avatar
Registered User
 

Join Date: Aug 2007
Location: Brisbane, Australia
Posts: 39
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
  #2 (permalink)  
Old 11-21-2009
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 6,006
Write a web service backed by, for example, javascript.
  #3 (permalink)  
Old 11-21-2009
z1dane's Avatar
Registered User
 

Join Date: Aug 2007
Location: Brisbane, Australia
Posts: 39
Quote:
Originally Posted by jim mcnamara View Post
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!
  #4 (permalink)  
Old 1 Week Ago
z1dane's Avatar
Registered User
 

Join Date: Aug 2007
Location: Brisbane, Australia
Posts: 39
So here's the solution I came up with, using JavaScript

Code:
<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.

Last edited by vbe; 1 Week Ago at 02:03 PM.. Reason: added code tags
Sponsored Links
Reply

Bookmarks

Tags
anchor, hyperlink, web

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Difference between hard link and soft link kamakshi s UNIX for Dummies Questions & Answers 2 06-26-2008 09:05 AM
need some info about symbolic link and hard link detective linux UNIX for Dummies Questions & Answers 2 01-08-2008 07:36 AM
Need to log http requests fundidor UNIX for Dummies Questions & Answers 3 08-08-2006 09:34 AM
Difference between hard link and soft link in unix RAJACHOKALINGAM UNIX for Dummies Questions & Answers 2 08-01-2006 05:10 AM
Differences between hard link and soft link penguin-friend UNIX for Advanced & Expert Users 3 03-08-2002 03:49 PM



All times are GMT -4. The time now is 09:19 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0