It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Passing session id width JS not working

Passing session id width JS not working

Postby renzocj on Fri Nov 11, 2011 6:51 pm

In order to pass a session Id using the URL

This works fine:

Code: Select all
<h1 id="goHome"><a href="home.php?<?php echo htmlspecialchars(SID); ?>">Inicio</a></h1>


The h1 tags are inside little divs like buttoms, so the divs are links to home.php to:

Code: Select all
function myMenu() {
olinkA=document.getElementById("goHome");
//add event...
addEvent(oLinkA,'click',goNow);
}


//this does not work
//the home.php has no session at all
function goNow() {
location.href="home.php?<?php echo htmlspecialchars(SID); ?>";
}



Any idea ? how can I send the session ID to the next page using Javascript as a link sender (location.href) ?

Thanks
renzocj
 
Posts: 2
Joined: Thu Sep 01, 2011 3:51 pm

Who is online

Users browsing this forum: No registered users and 2 guests