Dropping Session IDs
Dropping Session IDs
Hi
we are triailing this script inside a Shopping cart written in PHP, everything seems fine but The URLs however are dropping the session ID is there any syntax anyone knows of that will force the session id number to be carried thru the javascript?
and Yes the sessions are definately registered and open on every page throughout the script.
im afraid i cant post a public url as its a clients site under construction but if a moderator could perhaps PM or email me ill drop them the url as an example.
Thanks in Advance.
~dMc.
we are triailing this script inside a Shopping cart written in PHP, everything seems fine but The URLs however are dropping the session ID is there any syntax anyone knows of that will force the session id number to be carried thru the javascript?
and Yes the sessions are definately registered and open on every page throughout the script.
im afraid i cant post a public url as its a clients site under construction but if a moderator could perhaps PM or email me ill drop them the url as an example.
Thanks in Advance.
~dMc.
Something along these lines:
-- Andy
Code: Select all
aI("text=Session ID;url=test.php?sessionid=<?php echo sess$_SESSION["zim"];?>");
thanks for your reply Andy, Im still not having any joys with it at this stage. I can see what you mean by your example but its just not working inside our script.
Im getting Invalid Syntax Javascript Errors and no menu appearing. Im still calling the menu_data.php file from the same style JS tag is this correct? or will i need to include it as i would a normal php include?
Again cheers for your patience in this and thankyou for your help so far.
Dan
Im getting Invalid Syntax Javascript Errors and no menu appearing. Im still calling the menu_data.php file from the same style JS tag is this correct? or will i need to include it as i would a normal php include?
Again cheers for your patience in this and thankyou for your help so far.
Dan
What output do you get from the .php file.
You can see this by visiting it with your web browser.
The menu at milonic.com can be viewed by visiting http://milonic.com/menu_data.php If you can give us a URL to your data file, we'll be able to take a look.
Cheers
Andy
You can see this by visiting it with your web browser.
The menu at milonic.com can be viewed by visiting http://milonic.com/menu_data.php If you can give us a URL to your data file, we'll be able to take a look.
Cheers
Andy
Hi dMc,
I've noticed that one fairly common cause of js errors in dynamic menu creation is echoing one or more newlines to the string passed to the menu's aI() function. If the php output that builds the aI() string contains a newline, that will effecively break the line of js code prematurely, with no continuation character, causing an error.
As I said... a fairly common cause of js errors when building js code from php, so I just thought I'd throw that out there, FWIW.
Kevin
I've noticed that one fairly common cause of js errors in dynamic menu creation is echoing one or more newlines to the string passed to the menu's aI() function. If the php output that builds the aI() string contains a newline, that will effecively break the line of js code prematurely, with no continuation character, causing an error.
As I said... a fairly common cause of js errors when building js code from php, so I just thought I'd throw that out there, FWIW.
Kevin
Similar problem only a little more complicated
I have a similar problem in passing a session variable to the Milonic menu and it may well be with the same shopping program. My site is Cold Fusion driven and I use CF to call up the dbase that I draw from in a vertical Milonic menu. I will try to summarize the environment because it can get very confusing.
1. The shopping program is in php so all the files that display are .php files.
2. To make the site easily customizable, they work with a template directory that includes only .html files that are included in the php file that is displayed.
3. The problem relates to the fact that you can toggle between two stores in the program - a US store and a UK store and I use both of them on the site.
4. From the template directory, I include my menu which has been converted to a cfm file. I include it using the js include as follows:
<SCRIPT src="/club/awcb/amazon_new/nav_amazon.cfm?lang={CURRENT_LANG}" language="javascript"></SCRIPT>
The problem I have is that the menu is not picking up the session language and it always reverts to the default lang which is UK. It works when I pass the language in a search box as a hidden field but it does not work when I pass two variables in the same command as I do here:
aI("text=#category_name#;url=/club/awcb/amazon_new/shop.php?i=#category_id#&lang=#url.lang#;");
I use dreamweaver and it automatically bolds the second variable so I suspect that maybe the menu does not like me using the & sign to join the two variables.
You can see it in action at http://www.awcb.org/club/awcb/amazon_ne ... hp?lang=us
Am I on the right track here? How do you append two variables to a url in the menu?
Thanks
1. The shopping program is in php so all the files that display are .php files.
2. To make the site easily customizable, they work with a template directory that includes only .html files that are included in the php file that is displayed.
3. The problem relates to the fact that you can toggle between two stores in the program - a US store and a UK store and I use both of them on the site.
4. From the template directory, I include my menu which has been converted to a cfm file. I include it using the js include as follows:
<SCRIPT src="/club/awcb/amazon_new/nav_amazon.cfm?lang={CURRENT_LANG}" language="javascript"></SCRIPT>
The problem I have is that the menu is not picking up the session language and it always reverts to the default lang which is UK. It works when I pass the language in a search box as a hidden field but it does not work when I pass two variables in the same command as I do here:
aI("text=#category_name#;url=/club/awcb/amazon_new/shop.php?i=#category_id#&lang=#url.lang#;");
I use dreamweaver and it automatically bolds the second variable so I suspect that maybe the menu does not like me using the & sign to join the two variables.
You can see it in action at http://www.awcb.org/club/awcb/amazon_ne ... hp?lang=us
Am I on the right track here? How do you append two variables to a url in the menu?
Thanks
OK, 'nuther left-field. How 'bout calling the _data file with a cfinclude? Even though it's a mix of JS and CF, I'm wondering if the CF is actually getting processed, even though you have it defined as a .cfm
One of my _data files is also a .cfm (called with the standard JS call), but it does minimal CF stuff and no URLs - for it the + works.
Thinking about my suggestion - dumb idea. Sorry.
I'll take my ditterance and leave now...
One of my _data files is also a .cfm (called with the standard JS call), but it does minimal CF stuff and no URLs - for it the + works.
Thinking about my suggestion - dumb idea. Sorry.
I'll take my ditterance and leave now...

John
Hi Tubize,
our cart has been written in house and isnt in cold fusion but i think our problems are simliar though, our cart uses a main php script that contains all the functionality for the store then we use an ini file to handle the theme/layout in the site this ini file is included from within the main PHP script.
I have the menu_data.php being called from within the ini file which contains mainly html broken into blocks.
our cart has been written in house and isnt in cold fusion but i think our problems are simliar though, our cart uses a main php script that contains all the functionality for the store then we use an ini file to handle the theme/layout in the site this ini file is included from within the main PHP script.
I have the menu_data.php being called from within the ini file which contains mainly html broken into blocks.
Has anyone had any ideas on how this can be fixed yet, the url of the store im trying to setup is http://www.e-com.net.nz/test_mel/ im not sure if youll see anything different by looking at the site but im really pushed for time on solving this.