Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

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.

apprentice

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    apprentice reacted to Ashley Byrom in Why doesn't this work?   
    I'm probably wrong, I'm no Javascript godfather but from general scripting knowledge I'm thinking there could be a problem with the if statements. Don't you need a semicolon at the end of each line of code? And don't you normally use == instead of = for a comparison? I know you do in lots of other scripting languages... Try this...
     

    function getlink() { var e = document.getElementById("percentage1"); var p = e.options[e.selectedIndex].value; if(p=="10%") { change1("link1","link1.com"); } else if(p=="20%") { change1("link1","link2.com"); } }
     
    I'm presuming that's why you're returning the 20% code every time. You set it to 10% because you only used '=' and then you set it to 20% because you only used '=' so you're not comparing it, you're changing it.

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.