# Bookmark page code



## RandyG (Jun 26, 2000)

Hi All!

I do my best to stay out of this forum cause my brain hurts every time I come here, but I have found a code that will allow me to place a "bookmark this page" instead of a "Bookmark this site". My problem involves my sessionIDs and other variables.

http://www.devon-worldwide.com/html/code5.html describes the code, and it works a charm. I just want to be able to remove all of the variables in the bookmark.

For example, if someone were at my site, looking at a specific Ring, the url might be

```
http://www.tapn2ireland.com/scripts/project1.dll/viewproduct?sessionid=123456789012345&productid=CelHerJew-0236&groupid=Jewellery&SubGroupId=Wedding%20Rings&SID=123456789
```
(yeah, i know, uglier than dirt, isn't it).

I do not want the bookmark there to save the sessionid or the SID, but to save everything else, so it would look like

```
http://www.tapn2ireland.com/scripts/project1.dll/viewproduct?productid=CelHerJew-0236&groupid=Jewellery&SubGroupId=Wedding%20Rings
```
And, to make matters worse, the sessionid and sid are not always in the same locations.

Since my site is a database driven site using only templates with DB tags, it would be impossible, to my mind, to do what I want from the templates, but this comes the closest, if I can only get rid of the sessions and sids.

Site is running on Website Pro 3 and db is Interbase, with connectivity application built using delphi.

Anyone who can give me an idea on delphi code to do this, so I don't have to mess with templates, or suggest some code I can place on the templates.

Thanx for your time.


----------



## DudeXP (Jul 5, 2003)

Somehere in your code where ever your going to make a bookmark link... do this..

I didn't make the JavaScript code, so I don't even know if that works... Anyway I wrote the PHP code for php4.3.x+ ... It might work for older versions..


----------



## brendandonhu (Jul 8, 2002)

Is there maybe a way to reconstruct the URL based on the database fields, eg.
Put productid, group ID, and SubGroupID into variables out of the database, then add them together to get something like
http://www.tapn2ireland.com/scripts...?productid=ID&groupid=GroupID&SubGroupId=SGID
and set that to a variable.
Then in the script, change window.location to the variable holding the URL.


----------



## DudeXP (Jul 5, 2003)

If you need help with coding I can free lance for you for a while... But I requre the following:

Trust
FTP Access
Must Have AIM

AIM sn: Scriptor2k2


----------



## RandyG (Jun 26, 2000)

Thanx Dude and Brendan!

I guess I jumped the gun. I had been trying to get the developer to sort out being able to link to our site without the sessionid and sid, and he had finally gotten it sorted. It used to just default to the home page if those variable were missing. What I didn't want, was something like that to happen if a Shortcut was made using those variables, and the session had timed out. however, after telling the developer that I posted this, he just sort of shook his head, and showed me that the link with the session will go where it is supposed to, even if that session timed out. It just recreates the session and sid.

That being said, I don't have to worry about it anymore, cause this will work for the nonce, till we sort out how we are going to get rid of those nasty long urls.


Dude - Thanx for the offer, but first I never use AIM, or any messenger. Second, I don't know you well enough to grant Trust to a site I am responsible for, but the bosses paid for, if you get my meaning

Bren - Yeah, i think it would be very handy to clean up the order the variables appear in the url, but, as said above, we will be moving to a different structure relatively soon.


Thanx for the input folks!


----------

