stinger608
Dedicated TPU Cruncher & Folder
- Joined
- Nov 11, 2008
- Messages
- 11,250 (1.85/day)
- Location
- Wyoming
System Name | 2023 Ryzenfall |
---|---|
Processor | AMD Ryzen 5800X |
Motherboard | Asus ROG STRIX B550-F Gaming Wifi |
Cooling | SilverStone AH240 AIO |
Memory | 32 gigs G.Skill TridentZ NEO DDR4 |
Video Card(s) | EVGA GTX 1080 FTW Hybrid Gaming |
Storage | Dual Samsung 980 Pro M2 NVME 4.0 |
Display(s) | Overlord 27" 2560 x 1440 |
Case | Corsair Air 540 |
Audio Device(s) | On board |
Power Supply | Seasonic modular 850 watt Platinum |
Software | Windows 10 Pro |
Just wondering if this script to include a JavaScript pop up look correct? Kind of new to all of this, so any advice would be much appreciated



Code:
<script type="text/javascript">
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
return "";
}
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}
function checkCookie()
{
username=getCookie('username');
if (username!=null && username!="")
{
alert('Welcome back, glad you stopped by '+username+'!');
}
else
{
username=prompt('Please enter your name:',"");
if (username!=null && username!="")
{
setCookie('username',username,365);
}
}
}
</script>