I’ve got a popup that launches when a person hits the page that has a link to have the person set the page as their home page. I want that link to:
- Set the viewer’s home page to the current page
- Set a cookie (so they don’t get the popup next visit)
- Close the window
I tried making a single function to be called onClick but it didn’t work. I then added into the link itself to get it going and everything (except the cookie setting) works.
<a href="#" onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://myron/'); document.cookie='name=myronHomePage expires=01/01/2007 00:00:00'; MyWindow=window.close();">Please click here to make this your default homepage!</a>
I’m pretty new to JavaScript so I’m just sitting here getting frustrated! :hair:
What the heck am I doing wrong here?