PHPSESSID ruining things only the 1st time u browse the page

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
Talloula
Advanced
Advanced
Posts: 13
Joined: Sat Jul 20, 2002 7:04 am

PHPSESSID ruining things only the 1st time u browse the page

Post by Talloula »

if i browse my page in a new browser window, the menu doesn't appear
and there's errors in the page.

if i hit refresh, everything works great. i did a compare on the two sources and here's the difference.

before hitting refresh:

Code: Select all

else{if(ns4){hlnk="<a href="\?PHPSESSID=ab19f83147c87e463f92148dafafc01e"""+hlnk+"\" "+ltarg}else{hlnk=
after hitting refresh it becomes:

Code: Select all

else{if(ns4){hlnk="<a href=\""+hlnk+"\" "+ltarg}else{hlnk=
i cannot change the server's php settings.
is there a way to modify the script to prevent this, I assume the server is automatically inserting the PHPSESSID wherever it sees a href="....
right?
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

You could try changing mmenu.js and replace all href's with a split version like this

Code: Select all

else{if(ns4){hlnk="<a hr"+""+"ef=\""+hlnk+"\" "+ltarg}else{hlnk= 
I'm not sure at what point PHP is parsing mmenu.js so the above might not work though.

Also, if you have mmenu.js named mmenu.js then you must tell PHP not to parse .js files but I'm assuming you have renamed the .js file as .php

-- Andy
Last edited by Andy on Wed Jul 24, 2002 2:50 pm, edited 1 time in total.
Talloula
Advanced
Advanced
Posts: 13
Joined: Sat Jul 20, 2002 7:04 am

Post by Talloula »

I thought that I "had" to rename it to .php
is it possible to leave the file as a js and then include it in the code?

and if i do that, how do I tell php not to parse .js files?

thanks for all the prompt help, this is a great menu!!!
Talal
Talloula
Advanced
Advanced
Posts: 13
Joined: Sat Jul 20, 2002 7:04 am

it worked!

Post by Talloula »

breaking apart the "href" worked, no more PHPSESSID

and I also left the mmenu.js as a js file, and i just echoed the <script src=...></script> line in php and it worked like a charm.

thanks
Talloula
Post Reply