TBolt Posted February 10, 2007 Share Posted February 10, 2007 Hi, all. I'm new to web dev, as you'll be able to tell.I have posted a small script from Accuweather.com to a test web page HERE. When a visitor clicks on the weather map or any graphical part of the weather window, the user leaves my site and goes to Accuweather.com. Does anyone know what code I can add in order to force the click to open in a new window?I'm not familiar with scripts at all. I very much appreciate your help on this. <!--begin accuweather--></div><div style="text-align: center;"><script src="http://netwx.accuweather.com/netweatherV2.asp?lang=eng&zipcode=93650&size=1&theme=1&metric=0"></script><br></div><div style="text-align: center;"><span style="font-family: Arial; font-size: 10px;"><a href="http://wwwa.accuweather.com/adcbin/public/index.asp?partner=netWeather" target="_blank">WeatherForecasts</a> | <a href="http://wwwa.accuweather.com/maps-satellite.asp?partner=netWeather" target="_blank">WeatherMaps</a> | <a href="http://wwwa.accuweather.com/index-radar.asp?partner=netWeather" target="_blank">WeatherRadar</a></span><!--end accuweather-->Cheers! Link to comment Share on other sites More sharing options...
justsomeguy Posted February 13, 2007 Share Posted February 13, 2007 It looks like the code to open the window is coming from Accuweather. If you look at the script you are getting from them, this is the last line:RunNetWeather ("id", "netWxV2", "minversion", "8,0,0,0", "movie","http://netwx.accuweather.com/netWx-V21?zipcode=93650&customtheme=&theme=1&metric=0&target=_self&lang=eng&url=&video=&category=","src",'>http://netwx.accuweather.com/netWx-V21?zipcode=93650&customtheme=&theme=1&metric=0&target=_self&lang=eng&url=&video=&category=","src", "http://netwx.accuweather.com/netWx-V21?zipcode=93650&customtheme=&theme=1&metric=0&target=_self&lang=eng&url=&video=&category=", "width", "240","height", "420", "name", "netWxV2", "wmode","transparent");You will notice several "target=_self" in there, which means to open the window in the same window. So, you will either have to get Accuweather to give you a script that doesn't do that, or you will have to save the Accuweather script, modify it slightly, and use your copy instead of theirs. Link to comment Share on other sites More sharing options...
TBolt Posted February 14, 2007 Author Share Posted February 14, 2007 Can I just change _self to something else, like _blank or something? I'm not very familiar with script writing.Thank you much. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 14, 2007 Share Posted February 14, 2007 You can, but the problem is you are getting the script from Accuweather. The tag on your page looks like this: <script src="http://netwx.accuweather.com/netweatherV2.asp?lang=eng&zipcode=93650&size=1&theme=1&metric=0"> If you load that in a browser, you'll see the Javascript. So you are including that straight from Accuweather. What you would need to do is save that script to your computer, then change the _self to _blank, and then include the script on your computer instead of the one from Accuweather. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now