473,405 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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.dtd">

<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="agControlHost">
<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.getElementByID("agControl1");

</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.
Oct 16 '07 #1
3 3844
drhowarddrfine
7,435 Expert 4TB
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.
Oct 16 '07 #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.
I have updated the code...
Oct 16 '07 #3
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.
Oct 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Artificer | last post by:
Any idea if MS will try to promote Silverlight over ASP.NET for web development or will silverlight remain just as a adobe's flash like tecnology?
4
by: David Thielen | last post by:
Hi; Is this the right forum for questions of silverlight on ASP.NET? If so, is it possible for a Silverlight 2 application to trigger an ASP.net/ASP.net AJAX event in the page it is embedded...
4
by: K Viltersten | last post by:
I'm considering suggesting a switch from JS (which we use today at our company) to Silverlight but i can't see any newsgroup devoted to that subject. It gives me the impression that allthough...
1
by: Faisal Shafiq | last post by:
I want to upload a file direct to the Silverlight Streaming Service from a Web Client such as silverlight application. As per our product requirement we want to upload a .WMV file directly from...
2
by: pavanip | last post by:
Hi, I am a beginner to silverlight.i would like to know what are the installers to get silverlight effects. I installed Microsoft Silverlight1.1 Tools Alpha for Visual Studio 2008 and Microsoft...
7
Curtis Rutland
by: Curtis Rutland | last post by:
Building A Silverlight (2.0) Multi-File Uploader All source code is C#. VB.NET source is coming soon. Note: This project requires Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.