Forum Moderators: open

Message Too Old, No Replies

Existing URL Variable into new link problem

How to get an existing URL Variable from one page into the next...

         

asc_rta

2:42 pm on Oct 8, 2009 (gmt 0)

10+ Year Member



Apologies if this has already been asked here but I couldn't seem to find this exact problem in the forums.

Also, scroll down to the ---------- section below for the actual question and lack of useless background about me and my work.

Firstly some background. Although I'm very experienced in IT and software development, I've always stayed away from web development until this week where I've been thrown in at the deep end. So I understand alot about other things but am now having to embrace the wonderful world of the Internet, The Intranet and in particular SharePoint.

So here's the problem. We have some (3rd Party) webparts on our SharePoint system that someone was developing with. These webparts are excellent and really bring out interesting information from within our SharePoint lists.

However, in the unexpected absence of the developer I've been tasked with covering his work until his possible return. It's gone good apart from this problem that I've come across...

-----------------------

The URL on our page gets a variable from a previous page when you click on something in one of the webparts....

http://example.com/directory/code/pagename.aspx?Programme=Prog1

I'd like to create a basic link that picks up the variable in the URL (Programme=Prog1) so that the next page displays it's wonderful data in relation to that Variable.

Is it a simple bit of code, or even a variable I create in the HTML or Content Editor that I can put in to carry that variable over?

-----------------------

Also, if there's multiple variables could I carry all of them? This last question isn't as important as the main one.

[edited by: tedster at 3:18 pm (utc) on Oct. 8, 2009]
[edit reason] make the url generic [/edit]

heathclifft

5:33 pm on Oct 8, 2009 (gmt 0)

10+ Year Member



I have had this very same issue before and still have yet to resolve it. I hope someone answers us soon :)

[edited by: tedster at 6:10 pm (utc) on Oct. 8, 2009]
[edit reason] no personal urls - see Charter [/edit]

tedster

6:17 pm on Oct 8, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use Javascript to capture the parameter at the end of the current url and add it to the end of the new url. See these posts in our Javascript Forum [google.com] for details.