I have tried to insert a basic weather script into our cs2007 homepage of cs, but it doesn't fully load - just gets to "loading .." and stops with an error on the page. Why? Can anyone help? Here's the script:
<DIV id=wx_module_1262><A href="http://www.weather.com/weather/local/UKXX1423">Lichfield Weather Forecast, United Kingdom</A> </DIV><SCRIPT type=text/javascript>
/* Locations can be edited manually by updating 'wx_locID' below. Please also update */ /* the location name and link in the above div (wx_module) to reflect any changes made. */ var wx_locID = 'UKXX1423';
/* If you are editing locations manually and are adding multiple modules to one page, each */ /* module must have a unique div id. Please append a unique # to the div above, as well */ /* as the one referenced just below. If you use the builder to create individual modules */ /* you will not need to edit these parameters. */ var wx_targetDiv = 'wx_module_1262';
/* Please do not change the configuration value [wx_config] manually - your module */ /* will no longer function if you do. If at any time you wish to modify this */ /* configuration please use the graphical configuration tool found at */ /* https://registration.weather.com/ursa/wow/step2 */ var wx_config='SZ=180x150*WX=FHW*LNK=SSNL*UNT=C*BGI=seasonal1*MAP=null|null*DN=www.dpccnet.com*TIER=0*PID=1054988885*MD5=993bcec9a447f85b2ca8bcefa2479886';
document.write('<scr'+'ipt src="'+document.location.protocol+'//wow.weather.com/weather/wow/module/'+wx_locID+'?config='+wx_config+'&proto='+document.location.protocol+'&target='+wx_targetDiv+'"></scr'+'ipt>'; </SCRIPT>
Cheers,Jeff
Hi, this is a client side Javascript script; I am afraid that CS has nothing to do with it. I think the problem lies with the script itself. Have you tried to test it using an .html page to check if it works?
George J.
I'm having the same problem. It's not just the javascript -- works fine in htm page. The javascript error I'm getting is that the target div is undefined. Checked page source and target div is there, and proper id. When I look at the script source from weather.com there are comments about problems with ie and running the script before the target div has been loaded.
I've tried separating the target div that they give us from the script tags that are supposed to immediately follow. I've tried popping them into different places on home.aspx, home.master, and master.master, thinking that it's a problem of the script running before the target div is loaded. But this isn't working so far, especially when I consider that masters are basically user controls and loading after the content page. I haven't done much with community server (2007) so any direction someone might give would be great. PS, the code I'm using is just like the guy posted at the beginning of this thread.
PS, I realize this isn't a bug but thought I'd just continue the thread. If you want me to post elsewhere I shall..
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com