SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,388
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How do I redirect to load content into other table column?

    How do I load the URL into the other empty table column of id colOne? Right now if you click on the link, it will open the URL as a separate page. (I don't want to use an iFrame because it is notoriously fickle in Android devices.) Or can it be loaded on top of the page in some way?

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title>FROM: http://forums.digitalpoint.com/showthread.php?t=1110096</title>
    <script>
    function load(url)
    {
    window.open(url,'_blank');
    }
    </script>
    
    <style type="text/css">
    table { width: 800px; border: 3px dotted #aaa; }
    #colOne, #colTwo { width:50%; }
    </style>
    
    </head>
    
    <body>
    
    <table>
    <tr>
    <td id="colOne">
    
    </td>
    <td id="colTwo">
    <a href=#  onClick="load('listsub.html'); return false;">Show Menu</a>
    </td>
    </tr>
    </table>
    
    </body>
    </html>
    Steve Husting

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,197
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    In your load() function change _blank to _self and it will open the link in the same window.

  3. #3
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,388
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No, it doesn't do what I really want, which is to load it in a <td> cell. Somehow I need to load the HTML content into a variable, then show the contents of that variable in the cell, perhaps by inner HTML. However, I don't know if it's possible to load external HTML (in an iPhone or Android app) and display it on the HTML page's cell.
    Steve Husting


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
  •