HTML for use with Silverlight Application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vpascuzzi
    New Member
    • Mar 2007
    • 23

    HTML for use with Silverlight Application

    Hi,

    I am currently working on a small Silverlight application, but cannot find out what is wrong in my HTML.

    [HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <title> WPF/E Analog Clock</title>

    <script type="text/Javascript" src="js/aghost.js"></script>
    <script type="text/Javascript" src="js/clock.js"></script>
    </head>

    <body>
    <form>
    <div id="agControlHo st">
    <script type="text/javascript">
    // Create the WPF/E ActiveX control.
    // The technique here enables your WPF/E content to receive
    // input before it's ActiveX control is clicked.
    new agHost(

    /* hostElementID (The HTML element inside of
    which the WPF/E ActiveX control is inserted.
    This element is usually a <div>.)
    If you change the name of the host HTML
    element, change it here too.*/

    "agControlHost" ,

    "agControl1 ", // The ID of the WPF/E ActiveX control to create.
    "250px", // The width of the control.
    "250px", // The height of the control.
    "#D6D6D6", // The background color of the control.
    null, // SourceElement (name of script tag containting XAML)
    "clock.xaml ", // The URL of the source file containing WPF/E content.
    "false", // IsWindowLess
    "30", // Maximum FPS
    null // OnError handler.
    );

    // Create a global variable for the WPF/E ActiveX control,
    // to use when you want to retreived named XAML elements.
    var agControl = document.getEle mentByID("agCon trol1");

    </script>
    </div>
    </form>
    </body>
    </html>[/HTML]

    For whatever reason, I just this error in the browser:

    Line: 182
    Char: 9
    Error: 'undefined' is null or is not an object
    Code: 0
    URL: <myfile>

    Any help would be greatfully appreciated.


    Thanks,

    Vincent Pascuzzi.
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    I guess Silverlight or xaml picks up that stuff between the body tags and interprets it? Otherwise that can't be put there because browsers won't know what to do with it.

    The problem you have is xaml and silverlight are Microsoft stuff that's not html or css and not even very good xml for that matter. But I don't know which forum to transfer this to.

    Comment

    • vpascuzzi
      New Member
      • Mar 2007
      • 23

      #3
      Originally posted by drhowarddrfine
      I guess Silverlight or xaml picks up that stuff between the body tags and interprets it? Otherwise that can't be put there because browsers won't know what to do with it.

      The problem you have is xaml and silverlight are Microsoft stuff that's not html or css and not even very good xml for that matter. But I don't know which forum to transfer this to.
      I have updated the code...

      Comment

      • vpascuzzi
        New Member
        • Mar 2007
        • 23

        #4
        I believe I could be receiving errors because I do not have the WPF/E SDK plugins, etc.

        I am at work at the moment, but when I get home I am going to try my code in Visual Studio 2008 Beta 2 and see if it makes a difference. I am getting errors in my JS script as well, because it makes reference to my XAML file which perhaps cannot be interpreted without the proper SDK.

        I will keep you guys posted when I try it out later today. If you have any further ideas/solutions though, please let me know.


        Thanks,

        Vincent Pascuzzi.

        Comment

        Working...