0

I am developing an HTML web page which contains a table with hyperlinks in it. I want to add a button which on click refreshes all the hyperlinks in the table.

Please see a draft code below:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="generator" content="CoffeeCup HTML Editor (www.coffeecup.com)">
    <meta name="dcterms.created" content="Wed, 12 Nov 2014 06:53:22 GMT">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <title></title>

    <!--[if IE]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
  </head>
  
  <body>
    <style type="text/css">
      .tg {border-collapse:collapse;border-spacing:0;border-color:#aaa;}
      .tg td {font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#aaa;color:#333;background-color:#fff;}
      .tg th {font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#aaa;color:#fff;background-color:#f38630;}
    </style>
    
    <table class="tg" style="undefined;table-layout: fixed; width: 240px">
      <colgroup>
        <col style="width: 68.88888883590698px">
        <col style="width: 61.88888883590698px">
        <col style="width: 108.88888883590698px">
      </colgroup>
      <tr>
        <th class="tg-031e"></th>
        <th class="tg-031e"></th>
        <th class="tg-031e"></th>
      </tr>
      <tr>
        <td class="tg-031e"><a href="http://www.google.com">aaa</a></td>
        <td class="tg-031e"><a href="http://www.google.com">bbb</a></td>
        <td class="tg-031e"><a href="http://www.google.com">ccc</a></td>
      </tr>
      <tr>
        <td class="tg-031e"><a href="http://www.google.com">ddd</a></td>
        <td class="tg-031e"><a href="http://www.google.com">eee</a></td>
        <td class="tg-031e"><a href="http://www.google.com">fff</a></td>
      </tr>
    </table>
  </body>
</html>
myfunkyside
  • 3,890
  • 1
  • 17
  • 32
karan
  • 9
  • 1
  • 1
    what do you mean with "refresh" the hyperlinks? – k-nut Nov 12 '14 at 07:09
  • can you clearly explain your requirement ? – fidel castro Nov 12 '14 at 07:18
  • The requirement is to set certain hyperlinks in the table and add a refresh button at its side .on the click of the button it should ping all the hyperlinks and give its status weather they are up or not by respective color codes.this is baically to check the availability of the hyperlinks or servers.Please suggest any suitable way to do the same. – karan Nov 12 '14 at 07:41
  • do you have any javascript code to show? – k-nut Nov 12 '14 at 07:45
  • No , If you have any better way for doing it, please assist. – karan Nov 12 '14 at 07:53
  • I don't see the point of refreshing hyperlinks.. – Azrael Nov 12 '14 at 09:30
  • Please suggest a better approach if you have in mind... – karan Nov 12 '14 at 09:34
  • ` – myfunkyside Nov 12 '14 at 09:34
  • And please put your comment about the requirement inside the question, so people know what you actually want to achieve – myfunkyside Nov 12 '14 at 09:34
  • Check http://stackoverflow.com/q/1591401/3407923 and http://stackoverflow.com/q/3915634/3407923 – myfunkyside Nov 12 '14 at 09:40
  • the requirement is that on click of a button http links present in a table are hit and there status is being reflected by chenge in color of that particular tab. Eg : if a link is up and running that cell should chenge to green where as if a link is down giving 404 error or any other error that cell should chenge red.Please suggest a way out for this. – karan Nov 17 '14 at 09:15
  • I want to call multple urls in a table on click of a button and store there http codes for eg 404 or Success 2xx .Can somebody help in this...? – karan Nov 19 '14 at 12:08

0 Answers0