Skip to main content

Microsoft Silverlight

Answered Question Avoid "Click to active and use this control"RSS Feed

(0)

Qbus
Qbus

Member

Member

607 points

269 Posts

Avoid "Click to active and use this control"

When you deploy a silverlight application using the "ASP.NET 3.5" way by inserting a ScripManager and a SilverlightControl to embed your app, all seems to work great!

But what if you are going to deploy your app to a ASP.NET 1.1, ASP.NET 2.0, ASP, PHP, JSP or what ever site?

I know you can insert your app using the normal <object> html tag with the right type, no problems there. My problem is that if I'm doing that I get this  "Click to active and use this control" message around my app in IE, which looks very stupid.

How to I avoid this? Should I use the Silverlight.js file here to embed the app through JavaScript?

 

Thanks in advance,

Qbus

--------------------------
Please mark the post as answered if this answers your question
http://www.laumania.net

preishuber
preishuber

Contributor

Contributor

3570 points

655 Posts

Re: Avoid "Click to active and use this control"

the "click to activate"  should be away with newest patches. Was  a workaround causing from legal issues. Some company had a patent

http://blogs.msdn.com/ie/archive/2007/11/08/ie-automatic-component-activation-changes-to-ie-activex-update.aspx

-Hannes

http://www.preishuber.net http://weblogs.asp.net/hpreishuber

Qbus
Qbus

Member

Member

607 points

269 Posts

Re: Re: Avoid &quot;Click to active and use this control&quot;

 Do you mean the RC0 release? It should be gone there?

--------------------------
Please mark the post as answered if this answers your question
http://www.laumania.net

Herthoren
Herthoren

Member

Member

85 points

82 Posts

Answered Question

Re: Re: Avoid &quot;Click to active and use this control&quot;

I believe he meant latest patches for Internet Explorer.

AFAIK this problem is unrelated to silverlight.

Have you tried getting the latest updates for IE?

http://www.microsoft.com/windows/downloads/ie/getitnow.mspx

or http://windowsupdate.microsoft.com

 

 

Qbus
Qbus

Member

Member

607 points

269 Posts

Re: Re: Re: Avoid &amp;quot;Click to active and use this control&amp;quot;

 Ok, I google it a bit more my self. This is not something that is removed in the newest patch of Silverlight, but in a patch for IE.

I found some sample of how to work around this, assuming that not ALL my users have the newest patch for IE (my virtual machine didn't for instance). Not of the samples work our of the box. Therefore I essembled my own here:

You can use it as you want :)

 

<!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></title>
    <script src="Silverlight.js" type="text/javascript"></script>
</head>
<body>

<div id="SilverlightContent">
Silverlight not installed...please do so :)
</div>

<script language="javascript" type="text/javascript">
var parentElement = document.getElementById('SilverlightContent');
var altHTML = parentElement.innerHTML;

    Silverlight.createObject(
        "ClientBin/DeployTest.xap",         // Source property value.
        parentElement,                      // DOM reference to hosting DIV tag.
        "myPlugin",                         // Unique plug-in ID value.
        {                                   // Plug-in properties.
            width:'1024',                   // Width of rectangular region of plug-in in pixels.
            height:'530',                   // Height of rectangular region of plug-in in pixels.
            //background:'white',             // Background color of plug-in.
            //isWindowless:'false',           // Determines whether to display plug-in in windowless mode.
            //framerate:'24',                 // MaxFrameRate property value.
            version:'2.0',                   // Silverlight version.
            alt: altHTML                    // Alternate HTML to display if Silveright is not installed
        },
        {
            onError:null,                   // OnError property value -- event-handler function name.
            onLoad:null                     // OnLoad property value -- event-handler function name.
        },
        null,                               // initParams -- user-settable string for information passing.
        null); 
        
</script>

</body>
</html>
  

--------------------------
Please mark the post as answered if this answers your question
http://www.laumania.net

Qbus
Qbus

Member

Member

607 points

269 Posts

Re: Re: Avoid &quot;Click to active and use this control&quot;

Herthoren:

I believe he meant latest patches for Internet Explorer.

AFAIK this problem is unrelated to silverlight.

Have you tried getting the latest updates for IE?

http://www.microsoft.com/windows/downloads/ie/getitnow.mspx

or http://windowsupdate.microsoft.com

 

Yeah i figured out it were IE he were talking about :)

As i stated in my post above this one, my Virtual machine didn't had this patch, which is why I had my problem. My guess is there is some people out there that don't have it either, which is why I think it is a good idea to use this "work around" for some time.

Actually I'm updating my virtual machine right now :)

 

Thanks for all your fast replies.

--------------------------
Please mark the post as answered if this answers your question
http://www.laumania.net
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities