locked
Strange pivotviewer behavior?? Need help. RRS feed

  • Question

  • I am inserting the silverlight <object> into the html page through code behind coz I build up the initparams.

    Here is the strange behavior, when the page loads. The pivotviewer doesnt load until the mouse cursor moves over it.

    Check out the behavior here: http://demo.adlive.co.za/search/property-for-sale/western-cape

    The properties should have loaded automatically.

     

    Any ideas?? 

    Friday, March 25, 2011 4:25 AM

Answers

  • It  works fine in IE8 or IE9 standards mode but in IE7 or earlier looks like the control doesn’t have focus. 

    Actually in IE7 it takes more than a mouse over, you have to click or tab into the control for it to load.

    Can we find out if the script is actually trying to set focus to the control as it loads and if not if we could test setfocus?

    Monday, April 4, 2011 6:19 PM

All replies

  • I don't think it has anything to do with Silverlight or PivotViewer. The Silverlight XAP does not start to load so there must be something wrong in the sequence of events and handlers in your ASP.NET/Javascript such that the html fragment containing the SL object is not added to the DOM until some event triggers it.

    Friday, March 25, 2011 5:13 AM
  • I have an asp.net literal control that gets injected with the HTML markup for the silverlight object in the page_load event on the server. Surely that should mean the DOM elements exist before and javascript fires.

    I even went into the silverlight.js file and wrapped all the code with $(function(){ ...  }); not that it needed it.

     

    Is there a better way I can do it? or do you notice anthing wrong in my way of doing it?

     

    Many thanks.

    Friday, March 25, 2011 5:48 AM
  • When I use Developer Tools (F12 IE8) to look at the DOM I can see the <object> tag but I am not sute about the content of the attribute 'altHtml'.

    Can you remove that part to simplify the DHTML to see if it is the cause?

    Friday, March 25, 2011 6:41 AM
  • Hi, I think I found the cause of this strange behavior. But now to investigate why.

    When I add the following meta tag.

        <meta http-equiv="X-UA-Compatible" content="IE=7" />

    The xap file is not loaded until I move the mouse cursor over the DIV hosting the silverlight object.

    I would like to run the page in IE7 compatibility mode, but its causing the Silverlight object to behave strangely. Any advice?

    Saturday, March 26, 2011 6:25 PM
  • It  works fine in IE8 or IE9 standards mode but in IE7 or earlier looks like the control doesn’t have focus. 

    Actually in IE7 it takes more than a mouse over, you have to click or tab into the control for it to load.

    Can we find out if the script is actually trying to set focus to the control as it loads and if not if we could test setfocus?

    Monday, April 4, 2011 6:19 PM