This is a migrated thread and some comments may be shown as answers.

findPageViewByID not working in IE 10

2 Answers 68 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 04 Oct 2013, 11:28 AM
Hi,

My site contains a chunk of javascript that I want to run only when a certain RadTab is selected by the user (i.e. MultiPageView).
This code has to be javascript as it changes images on the page without posting back.
I want this code to only run on a certain Tab to reduce overhead* on the other tabs.
*The code changes up to 15 images dynamically.

My approach to this is as follows:

var multiPage = $find("<%=RadMultiPageAdmin.ClientID %>");
var newPage = multiPage.findPageViewByID("New");

    if (newPage.get_selected())
    {
        //run javascript
    }

 
(The MultiPage is called RadTabStripAdmin, the tab I want is called New)

This solution works perfectly in Chrome, FireFox, Opera etc, but not in IE (only IE 10 tested)
When testing the site locally on an ASP.NET dev server, this code does work in IE10.

When the site is published and deployed to the IIS server, the following error is produced (Only in IE 10):
SCRIPT5007: Unable to get property 'findPageViewByID' of undefined or null reference 

Please help!

Matt.

2 Answers, 1 is accepted

Sort by
0
Matt
Top achievements
Rank 1
answered on 07 Oct 2013, 09:59 AM
Solved.

To Telerik and anyone else who has similar problems:

If the site behaves differently on a development server and the deployment server, it is because Microsoft introduced different rendering methods for local and internet servers.. for reasons I cannot comprehend.

Because of this; Telerik javascript functions (such as get_selected mentioned here) do not work.

To fix the probem, add this to the <head> section of your ASPX file:
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>

This changes the compliancy mode of IE.

More information here:
http://sharovatov.wordpress.com/2009/05/18/ie8-rendering-modes-theory-and-practice/


Matt.
0
Nencho
Telerik team
answered on 09 Oct 2013, 11:47 AM
Hello Matt,

Thank you for sharing your solution with the community.

Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
TabStrip
Asked by
Matt
Top achievements
Rank 1
Answers by
Matt
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or