notacoder
11-06-2012, 05:34 PM
I need to create a pop up message that informs website viewers that they are leaving our site.
I have this in the header.
<script>
function leaveCheck(url) {
if(confirm("You are being redirected from our website and we are not responsible for transactions or services beyond this point."))window.open(url)
}
</script>
And I have the onlick reference on the link leaving our site which looks like this,
<a onclick="leaveCheck(this.href); return false" target="_blank" href="http://www.google.com">
This works great but the problem I have is we have a AccuWeather widget on our website and I can’t seem to make the pop up work on the link going back to AccuWeather.
Here is the code for the AccuWeather widget on our page.
<div style='width: 180px; height: 150px; background-image: url( http://vortex.accuweather.com/adcbin/netweather_v2/backgrounds/spring2_180x150_bg.jpg ); background-repeat: no-repeat; background-color: #607041;' ><div id='NetweatherContainer' style='height: 138px;' ><script src='http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2ex.asp?partner=netweather&tStyle=normal&logo=1&zipcode=61001&lang=eng&size=8&theme=spring2&metric=0&target=_blank'></script></div><div style='text-align: center; font-family: arial, helvetica, verdana, sans-serif; font-size: 10px; line-height: 12px; color: #FDEA11;' ></div></div>
Any suggestions on how to get a pop up message stating you are leaving our site when clicking on the AccuWeather link?
We have a State IT Audit going on and i'd like to get it fixed before they leave this week. Otherwise i'll have to remove it completely.
Thanks!
I have this in the header.
<script>
function leaveCheck(url) {
if(confirm("You are being redirected from our website and we are not responsible for transactions or services beyond this point."))window.open(url)
}
</script>
And I have the onlick reference on the link leaving our site which looks like this,
<a onclick="leaveCheck(this.href); return false" target="_blank" href="http://www.google.com">
This works great but the problem I have is we have a AccuWeather widget on our website and I can’t seem to make the pop up work on the link going back to AccuWeather.
Here is the code for the AccuWeather widget on our page.
<div style='width: 180px; height: 150px; background-image: url( http://vortex.accuweather.com/adcbin/netweather_v2/backgrounds/spring2_180x150_bg.jpg ); background-repeat: no-repeat; background-color: #607041;' ><div id='NetweatherContainer' style='height: 138px;' ><script src='http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2ex.asp?partner=netweather&tStyle=normal&logo=1&zipcode=61001&lang=eng&size=8&theme=spring2&metric=0&target=_blank'></script></div><div style='text-align: center; font-family: arial, helvetica, verdana, sans-serif; font-size: 10px; line-height: 12px; color: #FDEA11;' ></div></div>
Any suggestions on how to get a pop up message stating you are leaving our site when clicking on the AccuWeather link?
We have a State IT Audit going on and i'd like to get it fixed before they leave this week. Otherwise i'll have to remove it completely.
Thanks!