GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Quick help with linking HTML code (https://gfy.com/showthread.php?t=857725)

camperjohn64 09-26-2008 04:30 PM

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?

plyndrty 09-26-2008 04:36 PM

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

Quote:

<head>
<base href="http://www.test.com/>
</head>

camperjohn64 09-26-2008 04:41 PM

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

Serge Litehead 09-26-2008 04:42 PM

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

Lycanthrope 09-26-2008 04:52 PM

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

FlexxAeon 09-26-2008 04:53 PM

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

Code:

<a href="<?php print $_SERVER['PHP_SELF'];?>?a=2">next page</a>

Eriic 09-26-2008 04:55 PM

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

camperjohn64 09-26-2008 05:02 PM

Quote:

Originally Posted by Lycanthrope (Post 14813490)
<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?...


All times are GMT -7. The time now is 02:39 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123