Quick help with linking HTML code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • camperjohn64
    Confirmed User
    • Feb 2005
    • 1531

    #1

    Quick help with linking HTML code

    I forget how to do this: When I am on page test.html?a=1 and want to link to page test.html?a=2, but I don't want to use the test.html part (I want to link from anypage.html?a=1 to anypage.html?a=2 etc...to the next page), I USED to do this:

    Code:
     
    test.html?a=1
     
    <a href="?a=2">next page</a>
    But now that seems to have stopped working. It goes to my root page with a=2. ie: http://www.mywebsite.com/?a=2 when what I really want it to do is go to http://www.mywebsite.com/test.html?a=2

    I want to be able to add parameters to a page, without having to force the entire page in the URL so that it will correctly go to http://www.mywebsite.com/test.html?a=2. I forget how to do that.

    I always thought that the rule was: that if the / is used, it goes from root URL, if not, it appends to current url. "/?a=2" is different than "?a=2" What I am getting, is a link that is behaving like a /?a=2 when what I want is ?a=2

    What am I missing?
    www.gimmiegirlproductions.com
  • plyndrty
    Confirmed User
    • Jul 2003
    • 1477

    #2
    I think I know what your talking about. But not a 100% sure. Maybe this is what your looking for

    <head>
    <base href="http://www.test.com/>
    </head>
    Free Porno You Porn Fuck

    Comment

    • camperjohn64
      Confirmed User
      • Feb 2005
      • 1531

      #3
      Not exactly.

      Im looking for this functionality:

      <a href="http://www.test.com/page.html?a=1">page 1</a>
      <a href="http://www.test.com/page.html?a=2">page 2</a>
      <a href="http://www.test.com/page.html?a=3">page 3</a>
      <a href="http://www.test.com/page.html?a=4">page 4</a>

      But in this form as if it is on page.html:

      <a href="?a=1">page 1</a>
      <a href="?a=2">page 2</a>
      <a href="?a=3">page 3</a>
      <a href="?a=4">page 4</a>

      In other words, I don't want to have to make every page, know what page it is on. I just want:

      <a href="whatever page we are on, plus a=1">page 1</a>
      <a href="whatever page we are on, plus a=2">page 2</a>
      <a href="whatever page we are on, plus a=3">page 3</a>
      ...

      This works fine in IE, but not in Firefox, which means I need to make it work always. For some reason, Firefox is taking all links as absolute links and not relative links...
      www.gimmiegirlproductions.com

      Comment

      • Serge Litehead
        Confirmed User
        • Dec 2002
        • 5190

        #4
        the code sample you show is correct and should work fine, just checked and it works here

        Comment

        • Lycanthrope
          Confirmed User
          • Jan 2004
          • 4517

          #5
          <a href="#?a=2">Next</a>

          Comment

          • FlexxAeon
            Confirmed User
            • May 2003
            • 3765

            #6
            probably a browser thing. will this work? (didn't test it)

            Code:
            <a href="<?php print $_SERVER['PHP_SELF'];?>?a=2">next page</a>
            flexx [dot] aeon [at] gmail

            Comment

            • Eriic
              So Fucking Banned
              • Jan 2008
              • 2995

              #7
              I am sorry but you are not allowed to link codes that way since your CP conviction back in 93 aren't I right?

              Comment

              • camperjohn64
                Confirmed User
                • Feb 2005
                • 1531

                #8
                Originally posted by Lycanthrope
                <a href="#?a=2">Next</a>
                Nope, doesn't work.

                Here is the page:

                http://www.bodydot.com/view/608/Whit...ern-River.html

                Click on the "Videos" tab, in Firefox. It should take you to

                http://www.bodydot.com/view/608/Whit...iver.html?cv=v

                But instead it takes you to

                http://www.bodydot.com/?cv=v

                I hate FireFox. Why can't they just make agood browser like IE?...
                www.gimmiegirlproductions.com

                Comment

                Working...