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

xhtml problems

4 Answers 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Caesar
Top achievements
Rank 1
Caesar asked on 26 Mar 2010, 01:52 PM
Hi!

I have set the doctype to xhtml:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

When setting this, some new browsers works differenty. For example the following lines of code will give error in both Opera 10.51 and Firefox 4 Alpha:
var tableElement = document.createElement('TABLE');
...
var row = tableElement.insertRow(-1);

This code is copied from the RadWindow.js.
The reason is that when upper case is used (TABLE), then a generic html element is created and the insertRow function will not be valid.
Instead the following code would work:
var tableElement = document.createElement('table');
...
var row = tableElement.insertRow(-1);

When searching your javascript code, this error may exist in more controls, but for now my only problem is the RadWindow that wont open for this reason.

An other similar problem that I have experienced with my own javascript is that getElementsByTagName also should be used with lower case. Found many places in your code that are using this function with upper case. I haven't verified any errors in RadControls with this function, but there should be...

Regards
Rikard










4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 29 Mar 2010, 02:48 PM
Hello Rikard,

I created a sample page with that doctype and RadWindow, and tested in in Opera 10.51. Everything worked as expected on our side - I have attached the test setup and a screenshot of the result. Could you please check them and let me know if we are missing something?


Regards,
Georgi Tunev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Caesar
Top achievements
Rank 1
answered on 31 Mar 2010, 11:08 AM
Hello!

Found out that our web application has an updated browser file, which makes asp.net to output xhtml as contenttype="application/xhtml+xml" for browsers that actually supports this (for example Opera 10.51 and Firefox 4 alpha).
This contenttype is actually the only allowed content type for xhtml 1.1, according to w3c. So my guess is that you will have more problems in a near future because of the invalid javascript in RadWindow and other controls.

The effect is the same with the following code (since this code always sets contenttype, more browsers will be affected):
<%@ Page Language="C#" %>

<script runat="server">
    void Page_Load()
    {
        Response.ContentType = "application/xhtml+xml";
    }
</script>


<!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">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="http://www.google.com">
    </telerik:RadWindow>
    <button onclick="openWin(); return false;">
        Test</button>

    <script type="text/javascript">
        function openWin() {
            var oWnd = $find("<%= RadWindow1.ClientID %>");
            oWnd.show();
        }
    
    </script>

    </form>
</body>
</html>

The only difference from your example is marked with bold.

Regards
Andreas
0
Tsvetie
Telerik team
answered on 02 Apr 2010, 12:23 PM
Hi Caesar,
Thank you for the additional information. I was able to reproduce the problem and forwarded it to our developers - we will fix it as soon as possible.

I have updated your Telerik points for bringing the problem to our attention.

Sincerely yours,
Tsvetie
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Svetlina Anati
Telerik team
answered on 09 Apr 2010, 11:59 AM
Hello Caesar,

I want to thank you once again for your kind cooperation and to inform you that your suggestion was accepted and it is already done as you can also see from our PITS system where you have private access to this item. This being said, the change will be available in the next internal build as well as any later build.

Best wishes,
Svetlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Caesar
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Caesar
Top achievements
Rank 1
Tsvetie
Telerik team
Svetlina Anati
Telerik team
Share this question
or