I am trying to implements a Silverlight object into my ASP.NET Webform due to assignment requirement.
so i've decide to implements photo into the webform, but i found a problem which is the JS runtime error.. but i don't where do i code wrong because i am follow the guideline of internet to do it..

i add a function into the js file
here is my js file

function createSilverlightPlugin(placeHolder, width, height, xamlfile) {
    var parentElement = document.getElementById(placeHolder);
    Silverlight.createObject
    (
        xamlfile,
        parentElement,
        placeHolder,
        {
            width: width,

            height: height,

            inplaceInstallPrompt: false,

            background: '#fecefe',
            isWindowless: 'false',

            framerate: '24',
            version: '1.0'
        },
        {
            onError: null,
            onLoad: null
        },
        null
    );
}

but i can't find out why my js file will runtime error. :/

can someone help me?

the problem i facing is
"Microsoft JScript runtime error: Object expected"
while read till the call the functions which inside the js file

.aspx page

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Payment.aspx.cs" Inherits="Olympia_Open_College.Payment" %>

<!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 runat="server">
    <script src="Silverlight.js" type="text/javascript"></script> 
     <script language="jscript" type="text/jscript">
         createSilverlightPlugin('paymentSilverlightPluginHost', '400', '1000', 'PaymentHeader.xaml')
    </script>
    <title>Payment</title>
</head>
<body>
    <form id="frmPayment" runat="server">

    <div id="paymentSilverlightPluginHost">

        <asp:Image ID="imgPaymentHeader" runat="server"/>

    </div>
    ....
</body>
</html>

and inside the js file function is exactly the same.

i've the problem by importing .xap file. the reason why i don't have the .xap file is because my silverlight version does not match with my vs2010 so it can't create Silverlight Application as new project. TQ anyway