Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Internal link in dynamic url

Posted by: HEW Jun 16 2021, 03:19 PM

I have some code that's currently on a properly formatted page of its own. It has multiple internal links to the included glossary and footnotes. I need to add this to a website where the urls are constructed dynamically, and nothing I have tried is working.

The links are currently rendered, for example, as follows:

1. <a href="#General">Basic information</a><br>
2. <a href="#Comparison">Comparison of cinnamon varieties</a><br>
3. <a href="#Diabetes">Cinnamon for diabetes</a><br>
4. <a href="#Antioxidant">Cinnamon as an anti-inflammatory and anti-oxidant</a><br>

The target points are formatted appropriately and the whole thing has been working fine for years. But I need to add this to a website whose urls have a syntax of 'website.com/index.php?main_page=page&id=9&chapter=3/.' I tried using 'website.com/index.php?main_page=page&id=9&chapter=3/#General

That didn't work, nor did any of the other things I tried. Is this just not possible?

Thanks for any help.

Posted by: Christian J Jun 16 2021, 03:31 PM

QUOTE(HEW @ Jun 16 2021, 10:19 PM) *

I need to add this to a website whose urls have a syntax of 'website.com/index.php?main_page=page&id=9&chapter=3/.'

Should that URL really end with a slash? Then the PHP script would create a directory (which I'm not sure if it can be done that way).

I think this should work:
CODE
website.com/index.php?main_page=page&id=9&chapter=3#General

Posted by: HEW Jun 16 2021, 06:31 PM

QUOTE(Christian J @ Jun 16 2021, 04:31 PM) *

QUOTE(HEW @ Jun 16 2021, 10:19 PM) *

I need to add this to a website whose urls have a syntax of 'website.com/index.php?main_page=page&id=9&chapter=3/.'

Should that URL really end with a slash? Then the PHP script would create a directory (which I'm not sure if it can be done that way).

I think this should work:
CODE
website.com/index.php?main_page=page&id=9&chapter=3#General



Thank you, that did work. I was going by the link I was given for where my code would be put. It had a slash at the end, so that's what I was trying to use. I didn't even think about the fact that it shouldn't have been there. Much appreciated!

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)