The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Pulling the current URL and making a change in a Link
Jopavo
post May 18 2021, 10:41 PM
Post #1





Group: Members
Posts: 2
Joined: 18-May 21
Member No.: 27,946



I am trying to figure out how to create a link that grabs the current URL and makes a change to it.

For example

www.website.com/apples/mainpage

I would like the link to automatically remove "mainpage" and change it to "secondarypage"

www.website.com/apples/secondarypage

The link is embedded in a part of the page that is imported no matter what fruit is selected and therefore I cant create a link for each fruit.

Any help you can provide will be appreciated.

This post has been edited by Jopavo: May 18 2021, 10:41 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post May 18 2021, 10:45 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



How are the fruits selected? Is a form used? You need to show us what you have.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Jopavo
post May 19 2021, 11:15 AM
Post #3





Group: Members
Posts: 2
Joined: 18-May 21
Member No.: 27,946



QUOTE(pandy @ May 18 2021, 11:45 PM) *

How are the fruits selected? Is a form used? You need to show us what you have.


The fruits are selected by searching from the main page.

The actual scenario is for a personal computer where the content created is made for multiple types of computers but the drivers may be different depending on which computer is selected. So the process would be for someone to find the computer they are having a problem with and then while figuring out their problem they may be recommended to download a driver. I want to create a link to this driver that is customized depending on what computer is selected.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th April 2024 - 02:13 AM