Skip to content
View in the app

A better way to browse. Learn more.

Coldplaying

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Javascript Help

Featured Replies

if anyone knows anything about Javascript I have been stumped on this for weeks. I am very close with the following code but it is not working, can someone please help?

 

<HTML>

<HEAD>

<TITLE>New Wave Furniture</TITLE>

<SCRIPT LANGUAGE="JAVASCRIPT">

<!--Hide from old browsers

 

function addCookie(tag, value) {

var expireDate = new Date()

var expireString = ""

expireDate.setTime(expireDate.getTime() + (1000 * 60 * 60 * 24 * 365))

expireString = "expires=" + expireDate.toGMTString()

document.cookie = tag + "=" + escape(value) + ";" + expireString + ";"

}

 

function getCookie(tag) {

var value = null;

var myCookie = document.cookie + ";"

var findTag = tag + "="

var endPos

 

if (myCookie.length > 0) {

var beginPos = myCookie.indexOf(findTag)

if (beginPos != -1) {

beginPos += findTag.length

endPos = myCookie.indexOf(";", beginPos)

if (endPos == -1)

endPos = myCookie.length

value = unescape(myCookie.substring(beginPos, endPos))

}

}

return value

}

 

var CookieValue = 0

CookieValue= getCookie("VisitNumber")

if (CookieValue != null) {

CookieValue = parseInt(CookieValue) +1

}

else {

CookieValue = 1

}

addCookie("VisitNumber", CookieValue)

//-->

</SCRIPT>

</HEAD>

<BODY BGCOLOR="WHITE" TEXT="#00384A">

<TABLE WIDTH=100% BORDER=0>

<TR><TD ALIGN=LEFT>

chair.gif

</TD>

<TD ALIGN=RIGHT>

living.gif

</TD></TR>

</TABLE>

<H2 ALIGN="CENTER"><FONT COLOR="darkblue">New Wave Furniture</FONT></H2>

<CENTER>

Welcome to our Web page

 

 

<SCRIPT LANGUAGE="JAVASCRIPT">

<!--Hide from old browsers

 

var CookieValue= ""

 

CookieValue = getCookie("VisitNumber")

if(CookieValue != null) {

if(CookieValue == 1) {

document.write("<img src=newwave1.gif>")

}

 

if (CookieValue == 5) {

document.write("<img src=newwave5.gif>")

addCookie("VisitNumber", 1)

}

}

//-->

</SCRIPT>

</CENTER>

</BODY>

</HTML>

  • 2 weeks later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.