Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Jul 2005
    Posts
    2
    Member #
    10540
    Hello, I just started up a HTML heavy classicsneaks.com because the only other language/tool I am familiar with is ASP(and my hosting service wants more $$ to get it enabled).

    ANYWAYS, my browse page has an inline frame to show the different brands of shoes. Now, If I want to put a link on my homepage, (not that browse page) for the purpose of going to the browse page, and pulling up a specific page in the inline frame automatically.

    Is this possible in html?

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Not in pure HTML, no. You'd need a little bit of helper JavaScript.

  4. #3
    Junior Member
    Join Date
    Jul 2005
    Posts
    2
    Member #
    10540
    Would you mind pointing me in the right direction as far as a tutorial?

    Thank you

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Give me a couple of hours and I'll post how to do it :-).

  6. #5
    Senior Member hyperair's Avatar
    Join Date
    May 2005
    Posts
    452
    Member #
    9892
    u can do so by means of the query string and some javascript to parse it. for example, if the browsing page is called browse.html, and u want it to go to a page called page1.html, u make a link that makes it go to "browse.html?page=page1.html". then on the browse.html, u must name ure iframe (for example, "sample". for the script to work perfectly on all browsers, u have to add both name and id attributes in the iframe tag). then, u must have some javascript to retrieve it.. as shown below:
    Code:
    <script type="text/javascript">
    var requestedurl = window.self.location.toString();
    var positionofqmark = requestedurl.indexOf('?');
    var input = new Array();
    // edit iframename (replace "sample" with the name of your iframe)
    var iframename = 'sample';
    if (positionofqmark != -1) {
     var querystring = requestedurl.substring(positionofqmark + 1,requestedurl.length);
     if (querystring.indexOf('&') != -1) {
      var data = querystring.split('&');
      var arraylen = data.length;
      for (i=0;i<=arraylen;i++) {
       var temp = data.split('=');
       input[temp[0]] = temp[1];
      }
     } else {
      var temp = querystring.split('=');
      input[temp[0]] = temp[1];
     }
    }
    document.getElementById(iframename).src = input['page'];
    </script>
    i have tested it and it works on ie and firefox. hope this helps.
    Hyperair

  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Aye, that's exactly the method I was going for.

  8. #7
    Senior Member hyperair's Avatar
    Join Date
    May 2005
    Posts
    452
    Member #
    9892
    then y did u need a couple of hours? that code takes about half an hour to complete..
    Hyperair

  9. #8
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Quote Originally Posted by hyperair
    then y did u need a couple of hours? that code takes about half an hour to complete..
    Though this probably doesn't deserve a reply, I'll reply anyway. I had this thing called `other things to do'. As such, I didn't get around to looking at it since you got to it first. When I said a couple of hours, it wasn't time-to-come-up-with-a-solution, it was time-to-get-to-the-problem. And actually, the code takes about ten minutes.

  10. #9
    Senior Member hyperair's Avatar
    Join Date
    May 2005
    Posts
    452
    Member #
    9892
    ok ok let's cut the flaming. i apologize for my untactful remark.
    Hyperair


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:39 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com