473,625 Members | 2,687 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTML for use with Silverlight Application

23 New Member
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.
Oct 16 '07 #1
3 3858
drhowarddrfine
7,435 Recognized Expert Expert
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
vpascuzzi
23 New Member
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
vpascuzzi
23 New Member
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
4197
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
1534
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 in? If so how? thanks - dave
4
1285
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 it's called Silverlight, it's in fact coded in, e.g. C#. Is it true? (Today we use ASP.NET coded in C# on the
1
2845
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 silverlight client to Silverlight streaming service. I tried to user WebClient and HttpWebRequest for that purpose but, unfortunately I can found the way to do so. There are some problems with both classes. 1. There is no property of get...
2
1248
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 Silverlighr1.1 Alpha Refresh. And i opened new silverlight scriptweb and created new aspx page.when i run that application i didn't get any changes according to silverlight. And there is a silverlight.js file by default.what is the use of that file...
7
7146
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 Silverlight 2.0. To get these tools please visit this page Get Started : The Official Microsoft Silverlight Site and follow Step 1. Occasionally you find the need to have users upload multiple files at once. You could use multiple FileUpload...
0
8182
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8352
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8494
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7178
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2614
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.