fetch the variable from php to javascript and use it -
this meta.php . passing session value using java script
<!doctype html> <html> <head> <link rel="stylesheet" href="css/style.css"/> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> <script src="./js/jquery.js"></script> <script src="./js/laddubox.js"></script> <script src="./js/pop.js"></script> <script src="./js/jquery.js"></script> <script type="text/javascript"> var page = "<?php echo $_session['pa'] ?>"; </script> <title><?=$title?></title> </head>
this pop-up in js . want session value in pop-up , have created hidden input field pass value page
function sin() { var lbox = new laddubox(); lbox.init({ "width": 500, "height": 300, "html": '<div style="width:495px; height:272px; background-color:#ffffff; border:2px solid orange;"><table cellspacing="0" cellpadding="0" border="0" align="center" width="485" height="270" style="font-family:arial; font-size:20px; font-weight:bold;"><tr><td align="right" colspan="3"><img src="images/untitled-1.png" style="margin:10px; cursor:pointer;" id="btnclose"/></td></tr><tr><td height="30" colspan="3"><div style="font-family:arial; font-size:20px; color:#ff6c00; padding-left:200px;">sign in</div></td></tr><tr><td><form method="get"><div style="margin:10px; font-size:14px;">email<br><input type="text" name="email"/></div><br><div style="margin-left:10px; margin-top:-10px; font-size:14px;">password<br><input type="hidden" name="page" value=""/><input type="text" name="paswrd"/></div><br><input type="submit" value="submit" class="subbg"/></form></td><td><img src="images/orbar.png" /></td><td align="center"><a href=sign_in.php?val=1"><img src="images/redfb.png" style="margin-bottom:7px;"/></a><br><a href=sign_in.php?val=2"><img src="images/redgoogle.png" style="margin-bottom:7px;"/></a><br><a href=sign_in.php?val=3"><img src="images/redtwitter.png" /></a></td></tr></table></div>', 'btncloseid': '#btnclose' }); lbox.fire(); }
so please if knows answere please me
you have html snippet:
<input type="hidden" name="page" value=""/>
just insert php value there as:
<input type="hidden" name="page" value="<?php echo $_session['pa'] ?>"/>
Comments
Post a Comment