Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

W3C?

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

W3C?

Post by n9mfk »

Hi all,
can a selverlight page pass w3c
http://validator.w3.org/check?uri=http% ... or%2F1.654
thanks
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: W3C?

Post by steve »

My page (http://sanday.org.uk/weather/realtime.htm) passes HTML 4.01 Transitional but not XHTML 1.0 Transitional. I can't claim to be an expert here, and I haven't looked into why it passes or fails. Someone here did come with a way of embedding that passes, but I'm not sure it works in all browsers.
Steve
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: W3C?

Post by n9mfk »

Hi All,
i have worked with this code line 22 is giving me a wc3 error what can i do with that line?

Code: Select all

   1.  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-US">
   4. <head>
   5. <meta http-equiv="content-type" content="application/xhtml+xml; charset=ISO-8859-1" />
   6. <meta name="description" content="Springfield weather data"/>
   7. <meta name="keywords" content="Cumulus,Springfield weather data, weather, data, weather station"/>
   8. <meta name="verify-v1" content="g4Y7bQjL7TrsdV4houfQo4DH/sGlcZwhrsVySA2Q4BY=" />
   9. <link rel="alternate" type="application/rss+xml" title="Springfield,IL Current Weather Conditions [RSS]"
  10. href="http:///feed.php" />
  11. <link href="weatherstyle.css" rel="stylesheet" type="text/css" />
  12. <title></title>
  13.
  14.
  15.
  16.
  17.
  18. <script type="text/javascript">
  19. function onSilverlightError(sender, args) {
  20.
  21. var appSource = "";
  22. if (sender != null && sender != 0) {
  23. appSource = sender.getHost().Source;
  24. }
  25. var errorType = args.ErrorType;
  26. var iErrorCode = args.ErrorCode;
  27.
  28. var errMsg = "Unhandled Error in Silverlight 2 Application " + appSource + "\n" ;
  29.
  30. errMsg += "Code: "+ iErrorCode + " \n";
  31. errMsg += "Category: " + errorType + " \n";
  32. errMsg += "Message: " + args.ErrorMessage + " \n";
  33.
  34. if (errorType == "ParserError")
  35. {
  36. errMsg += "File: " + args.xamlFile + " \n";
  37. errMsg += "Line: " + args.lineNumber + " \n";
  38. errMsg += "Position: " + args.charPosition + " \n";
  39. }
  40. else if (errorType == "RuntimeError")
  41. {
  42. if (args.lineNumber != 0)
  43. {
  44. errMsg += "Line: " + args.lineNumber + " \n";
  45. errMsg += "Position: " + args.charPosition + " \n";
  46. }
  47. errMsg += "MethodName: " + args.methodName + " \n";
  48. }
  49.
  50. throw new Error(errMsg);
  51. }
  52. </script>
  53.
  54. </head>
  55. <body>
  56. <div id='content'>
  57. <h1>Springfield weather</h1>
  58.
  59.
  60. <div id='errorLocation' style="font-size: small;color: Gray;"></div>
  61.
  62. <div id="silverlightControlHost">
  63. <object data="data:application/x-silverlight," type="application/x-silverlight-2" width="832" height="878">
  64. <param name="source" value="CumulusRealtime.xap?v=1.0.0.3"/>
  65. <param name="onerror" value="onSilverlightError" />
  66. <param name="background" value="silver" />
  67. <param name="minRuntimeVersion" value="2.0.31005.0" />
  68. <param name="autoUpgrade" value="true" />
  69. <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
  70. <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
  71. </a>
  72. </object>
  73. <iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
  74. </div>
  75. </div>
  76. </body>
  77. </html>

Thankks Beau
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: W3C?

Post by steve »

It's actually validating the javascript (I don't really understand why it includes javascript in its HTML validation) and complaining about the ampersands which in HTML would normally be required to be encoded as & - but you can't do that in javascript. As far as I'm aware the only (and recommended) way to get around this is to have the offending javascript in an external file. It just so happens that Microsoft provide such a file, Silverlight.js, which I've zipped and attached. Unzip it and upload it to your web site in the same place as Cumulus Realtime.

Edit your page, and replace lines 18 to 52 inclusive with the following:

Code: Select all

<script type="text/javascript" src="Silverlight.js"></script>
Your page willl now hopefully validate.
You do not have the required permissions to view the files attached to this post.
Steve
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: W3C?

Post by n9mfk »

Hi Steve
that works well
http://n9mfk.com/live.php
Thanks Beau
Post Reply