Eve Support Community
Forums
Resources
Development, & Software Talk
pulling out username from eve cookies|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Groupee Member |
Howdy,
I would like to use the display name of our members for passing to a java applet. I have had a look at the source code of the display page of the board eg
the term 'eve_cookie.u.replace(/\+/g," ")' from above is the display name. Anyone have any ideas of a simple script to pass that to a variable say $USERNAME, which I could then use in the applet? Thanks. Regards Ozbob |
||
|
|
Groupee Member |
I have put this together
<html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Get Cookie</title> <script language="javascript" type="text/javascript"> /** * Gets the value of the specified cookie. * * name Name of the desired cookie. * * Returns a string containing value of specified cookie, * or null if cookie does not exist. */ function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else { begin += 2; } var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } return unescape(dc.substring(begin + prefix.length, end)); } </script> </head> <body> <a href="#" onclick='document.write(getCookie("site_9506080871"))'>Get Cookie!</a> </body> </html> this will read our site cookie and give the cookie information. What I need to do is to somehow parse that to extract the u name eg. u=Wombat&md5p=38A116CE83F2A448F71FD54FE618CD68&user_oid=908107749&pref_datetime=200452894156&perms_datetime=200531792030&pl=Y |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Eve Support Community
Forums
Resources
Development, & Software Talk
pulling out username from eve cookies
