TreeView not expanding in some browsers

Discussion in 'ASP .Net Web Controls' started by mfr, Jun 14, 2006.

  1. mfr

    mfr Guest

    Hi,

    I have a treeview control in my default.master linked to a web.sitemap file.
    On all of the client machines I have access to, the treeview works correctly
    but a small number of the website's users are complaining that they cannot
    expand the tree.

    I have been told that the page loads but has a message in bottom left corner
    "Page loaded with errors". The user's are using IE5.5. When they click on the
    arrows to expand the tree nothing happens.

    I initially suspected the security and or Java settings on the affected
    browsers but have not been able to find any obvious settings that are
    different to mine. I've aso tried setting the website as a trusted site.

    The user's have contacted their own support staff who have checked the
    browser and are saying the fault is with the website.

    Any advise on where to go from here would be appreciate. Is their a
    particular browser setting I should check?

    The website is running under IIS 6, developed using C# and ASP.NET 2.0.

    Regards,
    Dave.
     
    mfr, Jun 14, 2006
    #1
    1. Advertising

  2. Hi Dave,

    Thank you for your post.

    When there're "Page loaded with errors" in bottom left corner, you can
    double click on it and see detailed error description. Also, you may turn
    off "Show friendly HTTP error messages" in IE's advanced options to see if
    it reports more information.

    I think it's more likely a security settings in IE which may prevents the
    javascript to run successfully. Would you mind telling me the IE version
    and its security settings? Thanks.


    Regards,
    Walter Wang
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jun 14, 2006
    #2
    1. Advertising

  3. mfr

    mfr Guest

    An interesting point I've just discovered. As a temporary measure, to allow
    the users to continue working, I've set the expand depth so that all branches
    are fully expanded when the page loads. These branches can now be closed and
    re-expaned again without problem - ie the tree works correctly.

    The browser is IE5.5. The website has been added to the trusted zone (in an
    attempt to fix this problem) using the default security settings.

    The error details from clicking on the 'page loaded with errors' gave the
    following details.

    -- Line: 88
    -- Char: 9
    -- Error : The download of the specified resource has failed.
    -- Code: 0

    And, incase this is significant - We are using sessions for state
    management, I have had to add the following code to convert the absolute
    paths back to relative paths.

    void Data_Bound(Object sender, TreeNodeEventArgs e)
    {
    String url = e.Node.NavigateUrl;

    int len = Request.ApplicationPath.Length;

    if (url.Length > len)
    {
    // we need to remove the application name from the start on the url
    String newUrl = "~";

    // if len is one then application name would be "/" otherwise it
    contain two slashes ( "/wsrp/" );
    if (len > 1)
    newUrl += url.Substring(len);
    else
    newUrl += url;

    e.Node.NavigateUrl = newUrl;
    }
    }
     
    mfr, Jun 14, 2006
    #3
  4. Hi Dave,

    Thank you for your update.

    By digging into the javascript generated by the TreeView control, it's
    using the XMLHttpRequest object, aka Ajax. I suspect it's related to
    different MSXML version. You can check out following website for how to
    determine installed msxml version:

    http://www.perfectxml.com/msxmlAnswers.asp?Row_ID=16

    This is only an possible cause, please feel free to post here if it doesn't
    work.

    Also, you may turn off the "EnableClientScript" option of treeview.

    Regards,
    Walter Wang
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jun 15, 2006
    #4
  5. Hi Dave,

    I am interested in this issue. Would you mind letting me know the result of
    the suggestions? If you need further assistance, feel free to let me know.
    I will be more than happy to be of assistance.

    Have a great day!

    Regards,
    Walter Wang
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jun 19, 2006
    #5
  6. mfr

    mfr Guest

    Walter,
    Sorry, I was out for a couple of days so am just following up your
    suggestions now.

    Regards,
    Dave.

    "Walter Wang [MSFT]" wrote:

    > Hi Dave,
    >
    > I am interested in this issue. Would you mind letting me know the result of
    > the suggestions? If you need further assistance, feel free to let me know.
    > I will be more than happy to be of assistance.
    >
    > Have a great day!
    >
    > Regards,
    > Walter Wang
    > Microsoft Online Community Support
    >
    > ==================================================
    > When responding to posts, please "Reply to Group" via your newsreader so
    > that others may learn and benefit from your issue.
    > ==================================================
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
     
    mfr, Jun 19, 2006
    #6
  7. mfr

    mfr Guest

    Walter,

    Our user has run the link as requested.

    The following are installed on her machine.

    Microsoft.XMLDOM
    Msxml2.DOMDocument
    Msxml2.DOMDocument.3.0

    The following are NOT installed on her machine.

    Msxml2.DOMDocument.2.6
    Msxml2.DOMDocument.4.0

    Regards,
    Dave.

    "Walter Wang [MSFT]" wrote:

    > Hi Dave,
    >
    > Thank you for your update.
    >
    > By digging into the javascript generated by the TreeView control, it's
    > using the XMLHttpRequest object, aka Ajax. I suspect it's related to
    > different MSXML version. You can check out following website for how to
    > determine installed msxml version:
    >
    > http://www.perfectxml.com/msxmlAnswers.asp?Row_ID=16
    >
    > This is only an possible cause, please feel free to post here if it doesn't
    > work.
    >
    > Also, you may turn off the "EnableClientScript" option of treeview.
    >
    > Regards,
    > Walter Wang
    > Microsoft Online Community Support
    >
    > ==================================================
    > When responding to posts, please "Reply to Group" via your newsreader so
    > that others may learn and benefit from your issue.
    > ==================================================
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
     
    mfr, Jun 19, 2006
    #7
  8. Hi Dave,

    Thank you for your update.

    It seems the MSXML is ok and it might not be related. Would you please help
    me clarify following points?
    1) You've said that some clients are ok, does they have the same version of
    IE and MSXML installed?

    Also, would you please help me do following test to see if it works:
    1) On your dev box, create a simple WebForm with a TreeView control and
    with some pre-defined tree nodes, do not bind it to any DataSource.
    2) Run the WebForm on your dev box and save the WebForm as a html file
    using type "Web Page, complete (*.htm;*.html)". This will create an HTML
    file with a subfolder contains the required javascript files.
    3) Copy the html file with its related files to the system which has
    problem expanding the nodes, and see if it works. The image may not render
    correctly since the resources didn't get saved but it's ok.

    If the nodes didn't get expanded or collapsed correctly, we can now know
    which exact line caused the error in the javascript file.

    I understand that this may be a lot of information to ask for at one time.
    However, by collecting this information now, it will help us move more
    quickly toward a solution.

    Regards,
    Walter Wang
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jun 20, 2006
    #8
  9. mfr

    mfr Guest

    Walter,

    A user that has a working system has all versions of MSXML installed.
    However, I don't know if all users that have a working tree have all versions
    installed.

    I added a simple web form, containing a treeview, onto our website and asked
    one of the affect users to try it. The tree didn't work but an error was
    generated

    "Error, object expected, Line 287, code 0 char 1"

    This is line 287....

    WebForm_InitCallback();var TreeView1_Data = new Object();

    I hope this helps.

    I'll post the html page in the next post.

    Regards,
    Dave.

    "Walter Wang [MSFT]" wrote:

    > Hi Dave,
    >
    > Thank you for your update.
    >
    > It seems the MSXML is ok and it might not be related. Would you please help
    > me clarify following points?
    > 1) You've said that some clients are ok, does they have the same version of
    > IE and MSXML installed?
    >
    > Also, would you please help me do following test to see if it works:
    > 1) On your dev box, create a simple WebForm with a TreeView control and
    > with some pre-defined tree nodes, do not bind it to any DataSource.
    > 2) Run the WebForm on your dev box and save the WebForm as a html file
    > using type "Web Page, complete (*.htm;*.html)". This will create an HTML
    > file with a subfolder contains the required javascript files.
    > 3) Copy the html file with its related files to the system which has
    > problem expanding the nodes, and see if it works. The image may not render
    > correctly since the resources didn't get saved but it's ok.
    >
    > If the nodes didn't get expanded or collapsed correctly, we can now know
    > which exact line caused the error in the javascript file.
    >
    > I understand that this may be a lot of information to ask for at one time.
    > However, by collecting this information now, it will help us move more
    > quickly toward a solution.
    >
    > Regards,
    > Walter Wang
    > Microsoft Online Community Support
    >
    > ==================================================
    > When responding to posts, please "Reply to Group" via your newsreader so
    > that others may learn and benefit from your issue.
    > ==================================================
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
     
    mfr, Jun 20, 2006
    #9
  10. mfr

    mfr Guest

    This is the html file that was generated from the simple aspx page containing
    a treeview.

    ----------------------------------------
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    <!-- saved from
    url=(0065)http://localhost/wsrp/(S(01vavxnemahqmuvpiwrk3hrd))/treetest.aspx
    -->
    <HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Untitled Page</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=utf-8"><LINK
    href="TreeViewTest_files/default.css" type=text/css rel=stylesheet>
    <STYLE type=text/css>.TreeView1_0 {
    TEXT-DECORATION: none
    }
    </STYLE>

    <META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
    <BODY>
    <FORM id=form1 name=form1 action=treetest.aspx method=post>
    <DIV><INPUT id=TreeView1_ExpandState type=hidden value=ccnnnnnnncnnnnnnn
    name=TreeView1_ExpandState> <INPUT id=TreeView1_SelectedNode type=hidden
    name=TreeView1_SelectedNode> <INPUT id=__EVENTTARGET type=hidden
    name=__EVENTTARGET> <INPUT id=__EVENTARGUMENT type=hidden
    name=__EVENTARGUMENT>
    <INPUT id=TreeView1_PopulateLog type=hidden name=TreeView1_PopulateLog>
    <INPUT
    id=__VIEWSTATE type=hidden
    value=/wEPDwUKMTQ2ODY5MjA1MA9kFgICAw9kFgICAQ88KwAJAgAPFgYeDU5ldmVyRXhwYW5kZWRkHgxTZWxlY3RlZE5vZGVkHglMYXN0SW5kZXgCEWQIFCsABmQUKwACZBQrAAVkFCsAAmQUKwAFZBQrAAIWAh4IRXhwYW5kZWRnZBQrAAIWAh8DZ2QUKwACFgIfA2dkFCsAAhYCHwNnZBQrAAIWAh8DZ2QUKwACFgIfA2dkFCsAAhYCHwNnZBQrAAJkFCsABWQUKwACFgIfA2dkFCsAAhYCHwNnZBQrAAIWAh8DZ2QUKwACFgIfA2dkFCsAAhYCHwNnZBQrAAIWAh8DZ2QUKwACFgIfA2dkZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUJVHJlZVZpZXcx3ZLahNK2yNq1SuImiwRrgcepMsA=
    name=__VIEWSTATE> </DIV>
    <SCRIPT type=text/javascript>
    <!--
    var theForm = document.forms['form1'];
    if (!theForm) {
    theForm = document.form1;
    }
    function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
    theForm.__EVENTTARGET.value = eventTarget;
    theForm.__EVENTARGUMENT.value = eventArgument;
    theForm.submit();
    }
    }
    // -->
    </SCRIPT>

    <SCRIPT src="TreeViewTest_files/WebResource.axd"
    type=text/javascript></SCRIPT>

    <SCRIPT
    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(1).axd"
    type=text/javascript></SCRIPT>

    <SCRIPT>
    <!--
    function TreeView_PopulateNodeDoCallBack(context,param) {

    WebForm_DoCallback(context.data.treeViewID,param,TreeView_ProcessNodeData,context,TreeView_ProcessNodeData,false);
    }
    // -->
    </SCRIPT>

    <DIV><A
    href="http://localhost/wsrp/(S(01vavxnemahqmuvpiwrk3hrd))/treetest.aspx#TreeView1_SkipLink"><IMG
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    height=0 alt="Skip Navigation Links."
    src="TreeViewTest_files/WebResource.gif"
    width=0></A>
    <DIV id=TreeView1>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD><A id=TreeView1n0

    href="javascript:TreeView_ToggleNode(TreeView1_Data,0,TreeView1n0,'%20',TreeView1n0Nodes)"><IMG
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px;
    BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px"
    alt="Expand Cars"

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(1).gif"></A></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t0
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t0');"

    href="javascript:__doPostBack('TreeView1','sCars')">Cars</A></TD></TR></TBODY></TABLE>
    <DIV id=TreeView1n0Nodes style="DISPLAY: none">
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><A id=TreeView1n1

    href="javascript:TreeView_ToggleNode(TreeView1_Data,1,TreeView1n1,'%20',TreeView1n1Nodes)"><IMG
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px;
    BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px"
    alt="Expand Expensive"

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(1).gif"></A></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t1
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t1');"

    href="javascript:__doPostBack('TreeView1','sCars\\Expensive')">Expensive</A></TD></TR></TBODY></TABLE>
    <DIV id=TreeView1n1Nodes style="DISPLAY: none">
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t2
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t2');"

    href="javascript:__doPostBack('TreeView1','sCars\\Expensive\\Jaguar')">Jaguar</A></TD></TR></TBODY></TABLE>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t3
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t3');"

    href="javascript:__doPostBack('TreeView1','sCars\\Expensive\\BMW')">BMW</A></TD></TR></TBODY></TABLE>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t4
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t4');"

    href="javascript:__doPostBack('TreeView1','sCars\\Expensive\\Rolls%20Royce')">Rolls
    Royce</A></TD></TR></TBODY></TABLE>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t5
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t5');"

    href="javascript:__doPostBack('TreeView1','sCars\\Expensive\\Skoda')">Skoda</A></TD></TR></TBODY></TABLE></DIV>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t6
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t6');"

    href="javascript:__doPostBack('TreeView1','sCars\\Ford')">Ford</A></TD></TR></TBODY></TABLE>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t7
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t7');"

    href="javascript:__doPostBack('TreeView1','sCars\\Vauxhall')">Vauxhall</A></TD></TR></TBODY></TABLE>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t8
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t8');"

    href="javascript:__doPostBack('TreeView1','sCars\\Toyota')">Toyota</A></TD></TR></TBODY></TABLE></DIV>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD><A id=TreeView1n9

    href="javascript:TreeView_ToggleNode(TreeView1_Data,9,TreeView1n9,'%20',TreeView1n9Nodes)"><IMG
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px;
    BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px"
    alt="Expand Boats"

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(1).gif"></A></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t9
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t9');"

    href="javascript:__doPostBack('TreeView1','sBoats')">Boats</A></TD></TR></TBODY></TABLE>
    <DIV id=TreeView1n9Nodes style="DISPLAY: none">
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t10
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t10');"

    href="javascript:__doPostBack('TreeView1','sBoats\\Enterprise')">Enterprise</A></TD></TR></TBODY></TABLE>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t11
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t11');"

    href="javascript:__doPostBack('TreeView1','sBoats\\Laser')">Laser</A></TD></TR></TBODY></TABLE>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t12
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t12');"

    href="javascript:__doPostBack('TreeView1','sBoats\\Dragon')">Dragon</A></TD></TR></TBODY></TABLE>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD>
    <DIV style="WIDTH: 20px; HEIGHT: 1px"></DIV></TD>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t13
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t13');"

    href="javascript:__doPostBack('TreeView1','sBoats\\Flying%20Fifteen')">Flying
    Fifteen</A></TD></TR></TBODY></TABLE></DIV>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t14
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t14');"

    href="javascript:__doPostBack('TreeView1','sLorries')">Lorries</A></TD></TR></TBODY></TABLE>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t15
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t15');"

    href="javascript:__doPostBack('TreeView1','sBuses')">Buses</A></TD></TR></TBODY></TABLE>
    <TABLE
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH:
    0px; BORDER-RIGHT-WIDTH: 0px"
    cellSpacing=0 cellPadding=0>
    <TBODY>
    <TR>
    <TD><IMG alt=""

    src="S:\Root\General_Documentation\TreeViewTest_files\WebResource(2).gif"></TD>
    <TD style="WHITE-SPACE: nowrap"><A class=TreeView1_0 id=TreeView1t16
    onclick="TreeView_SelectNode(TreeView1_Data, this,'TreeView1t16');"

    href="javascript:__doPostBack('TreeView1','sTrains')">Trains</A></TD></TR></TBODY></TABLE></DIV><A
    id=TreeView1_SkipLink></A></DIV>
    <SCRIPT type=text/javascript>
    <!--
    var TreeView1_ImageArray = new Array('', '', '',
    '/WSRP/WebResource.axd?d=cIqWt1PDj94lvzio2eGOMKmSkBptWrWqPkb-cIlCwvg1&t=632680032825475000',
    '/WSRP/WebResource.axd?d=cIqWt1PDj94lvzio2eGOMMOR0ih5EPCqg48qAxoxhNk1&t=632680032825475000',
    '/WSRP/WebResource.axd?d=cIqWt1PDj94lvzio2eGOMMc7640wctWVchlg_p-dXiE1&t=632680032825475000');
    // -->
    </SCRIPT>

    <DIV><INPUT id=__EVENTVALIDATION type=hidden
    value=/wEWEgLnq6z9BQL6vr/BBgKysbr5BALjjPH+CQLQwp7WCgKf4KtUAuD6p64DAtqP0MIHAtmwhfYIAoXgi90PAovspsMPAoLh9OsBArLZ/IACApPLwLUCApGp6poIArLHqccKAqSIlZsLAraP//wBUDVsYilspGiBCuQYk87frbAbbLY=
    name=__EVENTVALIDATION> </DIV>
    <SCRIPT type=text/javascript>
    <!--

    WebForm_InitCallback();var TreeView1_Data = new Object();
    TreeView1_Data.images = TreeView1_ImageArray;
    TreeView1_Data.collapseToolTip = "Collapse {0}";
    TreeView1_Data.expandToolTip = "Expand {0}";
    TreeView1_Data.expandState = theForm.elements['TreeView1_ExpandState'];
    TreeView1_Data.selectedNodeID = theForm.elements['TreeView1_SelectedNode'];
    for (var i=0;i<6;i++) {
    var preLoad = new Image();
    if (TreeView1_ImageArray.length > 0)
    preLoad.src = TreeView1_ImageArray;
    }
    TreeView1_Data.lastIndex = 17;
    TreeView1_Data.populateLog = theForm.elements['TreeView1_PopulateLog'];
    TreeView1_Data.treeViewID = 'TreeView1';
    TreeView1_Data.name = 'TreeView1_Data';
    // -->
    </SCRIPT>
    </FORM></BODY></HTML>
     
    mfr, Jun 20, 2006
    #10
  11. Hi Dave,

    This is a quick note to let you know that I am performing research on this
    issue and will get back to you as soon as possible. I appreciate your
    patience.

    Regards,
    Walter Wang
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jun 21, 2006
    #11
  12. Hi Dave,

    From your post about the javascript error, it looks like function
    WebForm_InitCallback() is not defined, which should be included in the
    javascript src file "TreeViewTest_files/WebResource.axd". Would you please
    posting it here or sending to me? My email address is my newsgroup account
    by removing the 'online.' part. Also, I noted that the html source you
    posted includes an absolute path to another javascript source file, this
    maybe the problem of not being able to find the function correctly.

    Based on my research, the TreeView will use two javascript source files
    generated by WebResource.axd, one is used by Script Callback in ASP.NET
    2.0, another is used by the TreeView control itself.

    From your second post about the error description "The download of the
    specified resource has failed", I suspect it's because the client browser
    cannot download the javascript source file generated by WebResource.axd.
    For example, when you view source of html, you will normally see following
    script file reference:

    <script
    src="/tree1/WebResource.axd?d=Rv-sPALmcsiC7BFZzlz7qw2&amp;t=6328167188497884
    18" type="text/javascript"></script>

    In this case, you should be able to save the javascript source file by copy
    the path into address bar and save it locally.

    Also, is the client browser using proxy? Maybe some other addon of IE is
    blocking the resource?


    Regards,
    Walter Wang
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jun 22, 2006
    #12
  13. mfr

    mfr Guest

    Walter,

    Thank you for you continuing support.

    Here are the contents of the webresource.asd file. The
    WebForm_InitCallback() does appear to be defined in this file.


    Dave.


    -----------------

    function WebForm_PostBackOptions(eventTarget, eventArgument, validation,
    validationGroup, actionUrl, trackFocus, clientSubmit) {
    this.eventTarget = eventTarget;
    this.eventArgument = eventArgument;
    this.validation = validation;
    this.validationGroup = validationGroup;
    this.actionUrl = actionUrl;
    this.trackFocus = trackFocus;
    this.clientSubmit = clientSubmit;
    }
    function WebForm_DoPostBackWithOptions(options) {
    var validationResult = true;
    if (options.validation) {
    if (typeof(Page_ClientValidate) == 'function') {
    validationResult = Page_ClientValidate(options.validationGroup);
    }
    }
    if (validationResult) {
    if ((typeof(options.actionUrl) != "undefined") && (options.actionUrl
    != null) && (options.actionUrl.length > 0)) {
    theForm.action = options.actionUrl;
    }
    if (options.trackFocus) {
    var lastFocus = theForm.elements["__LASTFOCUS"];
    if ((typeof(lastFocus) != "undefined") && (lastFocus != null)) {
    if (typeof(document.activeElement) == "undefined") {
    lastFocus.value = options.eventTarget;
    }
    else {
    var active = document.activeElement;
    if ((typeof(active) != "undefined") && (active != null)) {
    if ((typeof(active.id) != "undefined") && (active.id
    != null) && (active.id.length > 0)) {
    lastFocus.value = active.id;
    }
    else if (typeof(active.name) != "undefined") {
    lastFocus.value = active.name;
    }
    }
    }
    }
    }
    }
    if (options.clientSubmit) {
    __doPostBack(options.eventTarget, options.eventArgument);
    }
    }
    var __pendingCallbacks = new Array();
    var __synchronousCallBackIndex = -1;
    function WebForm_DoCallback(eventTarget, eventArgument, eventCallback,
    context, errorCallback, useAsync) {
    var postData = __theFormPostData +
    "__CALLBACKID=" + WebForm_EncodeCallback(eventTarget) +
    "&__CALLBACKPARAM=" + WebForm_EncodeCallback(eventArgument);
    if (theForm["__EVENTVALIDATION"]) {
    postData += "&__EVENTVALIDATION=" +
    WebForm_EncodeCallback(theForm["__EVENTVALIDATION"].value);
    }
    var xmlRequest,e;
    try {
    xmlRequest = new XMLHttpRequest();
    }
    catch(e) {
    try {
    xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch(e) {
    }
    }
    var setRequestHeaderMethodExists = true;
    try {
    setRequestHeaderMethodExists = (xmlRequest &&
    xmlRequest.setRequestHeader);
    }
    catch(e) {}
    var callback = new Object();
    callback.eventCallback = eventCallback;
    callback.context = context;
    callback.errorCallback = errorCallback;
    callback.async = useAsync;
    var callbackIndex = WebForm_FillFirstAvailableSlot(__pendingCallbacks,
    callback);
    if (!useAsync) {
    if (__synchronousCallBackIndex != -1) {
    __pendingCallbacks[__synchronousCallBackIndex] = null;
    }
    __synchronousCallBackIndex = callbackIndex;
    }
    if (setRequestHeaderMethodExists) {
    xmlRequest.onreadystatechange = WebForm_CallbackComplete;
    callback.xmlRequest = xmlRequest;
    xmlRequest.open("POST", theForm.action, true);
    xmlRequest.setRequestHeader("Content-Type",
    "application/x-www-form-urlencoded");
    xmlRequest.send(postData);
    return;
    }
    callback.xmlRequest = new Object();
    var callbackFrameID = "__CALLBACKFRAME" + callbackIndex;
    var xmlRequestFrame = document.frames[callbackFrameID];
    if (!xmlRequestFrame) {
    xmlRequestFrame = document.createElement("IFRAME");
    xmlRequestFrame.width = "1";
    xmlRequestFrame.height = "1";
    xmlRequestFrame.frameBorder = "0";
    xmlRequestFrame.id = callbackFrameID;
    xmlRequestFrame.name = callbackFrameID;
    xmlRequestFrame.style.position = "absolute";
    xmlRequestFrame.style.top = "-100px"
    xmlRequestFrame.style.left = "-100px";
    try {
    if (callBackFrameUrl) {
    xmlRequestFrame.src = callBackFrameUrl;
    }
    }
    catch(e) {}
    document.body.appendChild(xmlRequestFrame);
    }
    var interval = window.setInterval(function() {
    xmlRequestFrame = document.frames[callbackFrameID];
    if (xmlRequestFrame && xmlRequestFrame.document) {
    window.clearInterval(interval);
    xmlRequestFrame.document.write("");
    xmlRequestFrame.document.close();
    xmlRequestFrame.document.write('<html><body><form
    method="post"><input type="hidden" name="__CALLBACKLOADSCRIPT"
    value="t"></form></body></html>');
    xmlRequestFrame.document.close();
    xmlRequestFrame.document.forms[0].action = theForm.action;
    var count = __theFormPostCollection.length;
    var element;
    for (var i = 0; i < count; i++) {
    element = __theFormPostCollection;
    if (element) {
    var fieldElement =
    xmlRequestFrame.document.createElement("INPUT");
    fieldElement.type = "hidden";
    fieldElement.name = element.name;
    fieldElement.value = element.value;

    xmlRequestFrame.document.forms[0].appendChild(fieldElement);
    }
    }
    var callbackIdFieldElement =
    xmlRequestFrame.document.createElement("INPUT");
    callbackIdFieldElement.type = "hidden";
    callbackIdFieldElement.name = "__CALLBACKID";
    callbackIdFieldElement.value = eventTarget;

    xmlRequestFrame.document.forms[0].appendChild(callbackIdFieldElement);
    var callbackParamFieldElement =
    xmlRequestFrame.document.createElement("INPUT");
    callbackParamFieldElement.type = "hidden";
    callbackParamFieldElement.name = "__CALLBACKPARAM";
    callbackParamFieldElement.value = eventArgument;

    xmlRequestFrame.document.forms[0].appendChild(callbackParamFieldElement);
    if (theForm["__EVENTVALIDATION"]) {
    var callbackValidationFieldElement =
    xmlRequestFrame.document.createElement("INPUT");
    callbackValidationFieldElement.type = "hidden";
    callbackValidationFieldElement.name = "__EVENTVALIDATION";
    callbackValidationFieldElement.value =
    theForm["__EVENTVALIDATION"].value;

    xmlRequestFrame.document.forms[0].appendChild(callbackValidationFieldElement);
    }
    var callbackIndexFieldElement =
    xmlRequestFrame.document.createElement("INPUT");
    callbackIndexFieldElement.type = "hidden";
    callbackIndexFieldElement.name = "__CALLBACKINDEX";
    callbackIndexFieldElement.value = callbackIndex;

    xmlRequestFrame.document.forms[0].appendChild(callbackIndexFieldElement);
    xmlRequestFrame.document.forms[0].submit();
    }
    }, 10);
    }
    function WebForm_CallbackComplete() {
    for (i = 0; i < __pendingCallbacks.length; i++) {
    callbackObject = __pendingCallbacks;
    if (callbackObject && callbackObject.xmlRequest &&
    (callbackObject.xmlRequest.readyState == 4)) {
    WebForm_ExecuteCallback(callbackObject);
    if (!__pendingCallbacks.async) {
    __synchronousCallBackIndex = -1;
    }
    __pendingCallbacks = null;
    var callbackFrameID = "__CALLBACKFRAME" + i;
    var xmlRequestFrame = document.getElementById(callbackFrameID);
    if (xmlRequestFrame) {
    xmlRequestFrame.parentNode.removeChild(xmlRequestFrame);
    }
    }
    }
    }
    function WebForm_ExecuteCallback(callbackObject) {
    var response = callbackObject.xmlRequest.responseText;
    if (response.charAt(0) == "s") {
    if ((typeof(callbackObject.eventCallback) != "undefined") &&
    (callbackObject.eventCallback != null)) {
    callbackObject.eventCallback(response.substring(1),
    callbackObject.context);
    }
    }
    else if (response.charAt(0) == "e") {
    if ((typeof(callbackObject.errorCallback) != "undefined") &&
    (callbackObject.errorCallback != null)) {
    callbackObject.errorCallback(response.substring(1),
    callbackObject.context);
    }
    }
    else {
    var separatorIndex = response.indexOf("|");
    if (separatorIndex != -1) {
    var validationFieldLength = parseInt(response.substring(0,
    separatorIndex));
    if (!isNaN(validationFieldLength)) {
    var validationField = response.substring(separatorIndex + 1,
    separatorIndex + validationFieldLength + 1);
    if (validationField != "") {
    var validationFieldElement = theForm["__EVENTVALIDATION"];
    if (!validationFieldElement) {
    validationFieldElement =
    document.createElement("INPUT");
    validationFieldElement.type = "hidden";
    validationFieldElement.name = "__EVENTVALIDATION";
    theForm.appendChild(validationFieldElement);
    }
    validationFieldElement.value = validationField;
    }
    if ((typeof(callbackObject.eventCallback) != "undefined") &&
    (callbackObject.eventCallback != null)) {

    callbackObject.eventCallback(response.substring(separatorIndex +
    validationFieldLength + 1), callbackObject.context);
    }
    }
    }
    }
    }
    function WebForm_FillFirstAvailableSlot(array, element) {
    var i;
    for (i = 0; i < array.length; i++) {
    if (!array) break;
    }
    array = element;
    return i;
    }
    var __nonMSDOMBrowser =
    (window.navigator.appName.toLowerCase().indexOf('explorer') == -1);
    var __theFormPostData = "";
    var __theFormPostCollection = new Array();
    function WebForm_InitCallback() {
    var count = theForm.elements.length;
    var element;
    for (var i = 0; i < count; i++) {
    element = theForm.elements;
    var tagName = element.tagName.toLowerCase();
    if (tagName == "input") {
    var type = element.type;
    if ((type == "text" || type == "hidden" || type == "password" ||
    ((type == "checkbox" || type == "radio") &&
    element.checked)) &&
    (element.id != "__EVENTVALIDATION")) {
    WebForm_InitCallbackAddField(element.name, element.value);
    }
    }
    else if (tagName == "select") {
    var selectCount = element.options.length;
    for (var j = 0; j < selectCount; j++) {
    var selectChild = element.options[j];
    if (selectChild.selected == true) {
    WebForm_InitCallbackAddField(element.name, element.value);
    }
    }
    }
    else if (tagName == "textarea") {
    WebForm_InitCallbackAddField(element.name, element.value);
    }
    }
    }
    function WebForm_InitCallbackAddField(name, value) {
    var nameValue = new Object();
    nameValue.name = name;
    nameValue.value = value;
    __theFormPostCollection[__theFormPostCollection.length] = nameValue;
    __theFormPostData += name + "=" + WebForm_EncodeCallback(value) + "&";
    }
    function WebForm_EncodeCallback(parameter) {
    if (encodeURIComponent) {
    return encodeURIComponent(parameter);
    }
    else {
    return escape(parameter);
    }
    }
    var __disabledControlArray = new Array();
    function WebForm_ReEnableControls() {
    if (typeof(__enabledControlArray) == 'undefined') {
    return false;
    }
    var disabledIndex = 0;
    for (var i = 0; i < __enabledControlArray.length; i++) {
    var c;
    if (__nonMSDOMBrowser) {
    c = document.getElementById(__enabledControlArray);
    }
    else {
    c = document.all[__enabledControlArray];
    }
    if ((typeof(c) != "undefined") && (c != null) && (c.disabled ==
    true)) {
    c.disabled = false;
    __disabledControlArray[disabledIndex++] = c;
    }
    }
    setTimeout("WebForm_ReDisableControls()", 0);
    return true;
    }
    function WebForm_ReDisableControls() {
    for (var i = 0; i < __disabledControlArray.length; i++) {
    __disabledControlArray.disabled = true;
    }
    }
    var __defaultFired = false;
    function WebForm_FireDefaultButton(event, target) {
    if (!__defaultFired && event.keyCode == 13 && !(event.srcElement &&
    (event.srcElement.tagName.toLowerCase() == "textarea"))) {
    var defaultButton;
    if (__nonMSDOMBrowser) {
    defaultButton = document.getElementById(target);
    }
    else {
    defaultButton = document.all[target];
    }
    if (defaultButton && typeof(defaultButton.click) != "undefined") {
    __defaultFired = true;
    defaultButton.click();
    event.cancelBubble = true;
    if (event.stopPropagation) event.stopPropagation();
    return false;
    }
    }
    return true;
    }
    function WebForm_GetScrollX() {
    if (__nonMSDOMBrowser) {
    return window.pageXOffset;
    }
    else {
    if (document.documentElement && document.documentElement.scrollLeft) {
    return document.documentElement.scrollLeft;
    }
    else if (document.body) {
    return document.body.scrollLeft;
    }
    }
    return 0;
    }
    function WebForm_GetScrollY() {
    if (__nonMSDOMBrowser) {
    return window.pageYOffset;
    }
    else {
    if (document.documentElement && document.documentElement.scrollTop) {
    return document.documentElement.scrollTop;
    }
    else if (document.body) {
    return document.body.scrollTop;
    }
    }
    return 0;
    }
    function WebForm_SaveScrollPositionSubmit() {
    if (__nonMSDOMBrowser) {
    theForm.elements['__SCROLLPOSITIONY'].value = window.pageYOffset;
    theForm.elements['__SCROLLPOSITIONX'].value = window.pageXOffset;
    }
    else {
    theForm.__SCROLLPOSITIONX.value = WebForm_GetScrollX();
    theForm.__SCROLLPOSITIONY.value = WebForm_GetScrollY();
    }
    if ((typeof(this.oldSubmit) != "undefined") && (this.oldSubmit != null)) {
    return this.oldSubmit();
    }
    return true;
    }
    function WebForm_SaveScrollPositionOnSubmit() {
    theForm.__SCROLLPOSITIONX.value = WebForm_GetScrollX();
    theForm.__SCROLLPOSITIONY.value = WebForm_GetScrollY();
    if ((typeof(this.oldOnSubmit) != "undefined") && (this.oldOnSubmit !=
    null)) {
    return this.oldOnSubmit();
    }
    return true;
    }
    function WebForm_RestoreScrollPosition() {
    if (__nonMSDOMBrowser) {
    window.scrollTo(theForm.elements['__SCROLLPOSITIONX'].value,
    theForm.elements['__SCROLLPOSITIONY'].value);
    }
    else {
    window.scrollTo(theForm.__SCROLLPOSITIONX.value,
    theForm.__SCROLLPOSITIONY.value);
    }
    if ((typeof(theForm.oldOnLoad) != "undefined") && (theForm.oldOnLoad !=
    null)) {
    return theForm.oldOnLoad();
    }
    return true;
    }
    function WebForm_TextBoxKeyHandler(event) {
    if (event.keyCode == 13) {
    var target;
    if (__nonMSDOMBrowser) {
    target = event.target;
    }
    else {
    target = event.srcElement;
    }
    if ((typeof(target) != "undefined") && (target != null)) {
    if (typeof(target.onchange) != "undefined") {
    target.onchange();
    event.cancelBubble = true;
    if (event.stopPropagation) event.stopPropagation();
    return false;
    }
    }
    }
    return true;
    }
    function WebForm_AppendToClassName(element, className) {
    var current = element.className;
    if (current) {
    if (current.charAt(current.length - 1) != ' ') {
    current += ' ';
    }
    current += className;
    }
    else {
    current = className;
    }
    element.className = current;
    }
    function WebForm_RemoveClassName(element, className) {
    var current = element.className;
    if (current) {
    if (current.substring(current.length - className.length - 1,
    current.length) == ' ' + className) {
    element.className = current.substring(0, current.length -
    className.length - 1);
    return;
    }
    if (current == className) {
    element.className = "";
    return;
    }
    var index = current.indexOf(' ' + className + ' ');
    if (index != -1) {
    element.className = current.substring(0, index) +
    current.substring(index + className.length + 2, current.length);
    return;
    }
    if (current.substring(0, className.length) == className + ' ') {
    element.className = current.substring(className.length + 1,
    current.length);
    }
    }
    }
    function WebForm_GetElementById(elementId) {
    if (document.getElementById) {
    return document.getElementById(elementId);
    }
    else if (document.all) {
    return document.all[elementId];
    }
    else return null;
    }
    function WebForm_GetElementByTagName(element, tagName) {
    var elements = WebForm_GetElementsByTagName(element, tagName);
    if (elements && elements.length > 0) {
    return elements[0];
    }
    else return null;
    }
    function WebForm_GetElementsByTagName(element, tagName) {
    if (element && tagName) {
    if (element.getElementsByTagName) {
    return element.getElementsByTagName(tagName);
    }
    if (element.all && element.all.tags) {
    return element.all.tags(tagName);
    }
    }
    return null;
    }
    function WebForm_GetElementDir(element) {
    if (element) {
    if (element.dir) {
    return element.dir;
    }
    return WebForm_GetElementDir(element.parentNode);
    }
    return "ltr";
    }
    function WebForm_GetElementPosition(element) {
    var result = new Object();
    result.x = 0;
    result.y = 0;
    result.width = 0;
    result.height = 0;
    if (element.offsetParent) {
    result.x = element.offsetLeft;
    result.y = element.offsetTop;
    var parent = element.offsetParent;
    while (parent) {
    result.x += parent.offsetLeft;
    result.y += parent.offsetTop;
    var parentTagName = parent.tagName.toLowerCase();
    if (parentTagName != "table" &&
    parentTagName != "body" &&
    parentTagName != "html" &&
    parentTagName != "div" &&
    parent.clientTop &&
    parent.clientLeft) {
    result.x += parent.clientLeft;
    result.y += parent.clientTop;
    }
    parent = parent.offsetParent;
    }
    }
    else if (element.left && element.top) {
    result.x = element.left;
    result.y = element.top;
    }
    else {
    if (element.x) {
    result.x = element.x;
    }
    if (element.y) {
    result.y = element.y;
    }
    }
    if (element.offsetWidth && element.offsetHeight) {
    result.width = element.offsetWidth;
    result.height = element.offsetHeight;
    }
    else if (element.style && element.style.pixelWidth &&
    element.style.pixelHeight) {
    result.width = element.style.pixelWidth;
    result.height = element.style.pixelHeight;
    }
    return result;
    }
    function WebForm_GetParentByTagName(element, tagName) {
    var parent = element.parentNode;
    var upperTagName = tagName.toUpperCase();
    while (parent && (parent.tagName.toUpperCase() != upperTagName)) {
    parent = parent.parentNode ? parent.parentNode : parent.parentElement;
    }
    return parent;
    }
    function WebForm_SetElementHeight(element, height) {
    if (element && element.style) {
    element.style.height = height + "px";
    }
    }
    function WebForm_SetElementWidth(element, width) {
    if (element && element.style) {
    element.style.width = width + "px";
    }
    }
    function WebForm_SetElementX(element, x) {
    if (element && element.style) {
    element.style.left = x + "px";
    }
    }
    function WebForm_SetElementY(element, y) {
    if (element && element.style) {
    element.style.top = y + "px";
    }
    }
     
    mfr, Jun 23, 2006
    #13
  14. mfr

    mfr Guest

    Walter,

    re: the absolute paths...

    I hadn't noticed the absolute paths, which were pointing to a folder not
    available to the users. I've amended the html file and am now waiting for the
    user to report back.

    Regards,
    Dave.

    "Walter Wang [MSFT]" wrote:

    > Hi Dave,
    >
    > From your post about the javascript error, it looks like function
    > WebForm_InitCallback() is not defined, which should be included in the
    > javascript src file "TreeViewTest_files/WebResource.axd". Would you please
    > posting it here or sending to me? My email address is my newsgroup account
    > by removing the 'online.' part. Also, I noted that the html source you
    > posted includes an absolute path to another javascript source file, this
    > maybe the problem of not being able to find the function correctly.
    >
    > Based on my research, the TreeView will use two javascript source files
    > generated by WebResource.axd, one is used by Script Callback in ASP.NET
    > 2.0, another is used by the TreeView control itself.
    >
    > From your second post about the error description "The download of the
    > specified resource has failed", I suspect it's because the client browser
    > cannot download the javascript source file generated by WebResource.axd.
    > For example, when you view source of html, you will normally see following
    > script file reference:
    >
    > <script
    > src="/tree1/WebResource.axd?d=Rv-sPALmcsiC7BFZzlz7qw2&t=6328167188497884
    > 18" type="text/javascript"></script>
    >
    > In this case, you should be able to save the javascript source file by copy
    > the path into address bar and save it locally.
    >
    > Also, is the client browser using proxy? Maybe some other addon of IE is
    > blocking the resource?
    >
    >
    > Regards,
    > Walter Wang
    > Microsoft Online Community Support
    >
    > ==================================================
    > When responding to posts, please "Reply to Group" via your newsreader so
    > that others may learn and benefit from your issue.
    > ==================================================
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
     
    mfr, Jun 23, 2006
    #14
  15. mfr

    mfr Guest

    OK, the user has reported back that the tree view now has the graphics ok but
    still doesn't expand. The Error-on-page messages is

    Line 1, character 1 error object expected. code 0

    which, to me, doesn't seem to be very usefull.

    Dave.

    "mfr" wrote:

    > Walter,
    >
    > re: the absolute paths...
    >
    > I hadn't noticed the absolute paths, which were pointing to a folder not
    > available to the users. I've amended the html file and am now waiting for the
    > user to report back.
    >
    > Regards,
    > Dave.
    >
    > "Walter Wang [MSFT]" wrote:
    >
    > > Hi Dave,
    > >
    > > From your post about the javascript error, it looks like function
    > > WebForm_InitCallback() is not defined, which should be included in the
    > > javascript src file "TreeViewTest_files/WebResource.axd". Would you please
    > > posting it here or sending to me? My email address is my newsgroup account
    > > by removing the 'online.' part. Also, I noted that the html source you
    > > posted includes an absolute path to another javascript source file, this
    > > maybe the problem of not being able to find the function correctly.
    > >
    > > Based on my research, the TreeView will use two javascript source files
    > > generated by WebResource.axd, one is used by Script Callback in ASP.NET
    > > 2.0, another is used by the TreeView control itself.
    > >
    > > From your second post about the error description "The download of the
    > > specified resource has failed", I suspect it's because the client browser
    > > cannot download the javascript source file generated by WebResource.axd.
    > > For example, when you view source of html, you will normally see following
    > > script file reference:
    > >
    > > <script
    > > src="/tree1/WebResource.axd?d=Rv-sPALmcsiC7BFZzlz7qw2&t=6328167188497884
    > > 18" type="text/javascript"></script>
    > >
    > > In this case, you should be able to save the javascript source file by copy
    > > the path into address bar and save it locally.
    > >
    > > Also, is the client browser using proxy? Maybe some other addon of IE is
    > > blocking the resource?
    > >
    > >
    > > Regards,
    > > Walter Wang
    > > Microsoft Online Community Support
    > >
    > > ==================================================
    > > When responding to posts, please "Reply to Group" via your newsreader so
    > > that others may learn and benefit from your issue.
    > > ==================================================
    > >
    > > This posting is provided "AS IS" with no warranties, and confers no rights.
    > >
    > >
     
    mfr, Jun 23, 2006
    #15
  16. Hi Dave,

    Thank you for your update.

    In javascript "object expected" normally means some javascript function or
    object is not defined, which also means some required javascript source
    files are not loaded correctly.

    As I said in my last post, the TreeView is using some embedded javascript
    source files which generated by WebResource.axd. They should be downloaded
    by IE correctly. For those system that have problem with this, I think
    there must be some specific security setting or tools/addon which prevents
    the resource from loading.

    I think you can also try to use other browsers to see if this problem
    exists or not. That might narrow down some possibilities.

    If this issue is urgent or critical to your product, I suggest you contact
    MSDN representatives to submit your questions online or through phone:
    http://msdn.microsoft.com/subscriptions/support/default.aspx
    As an MSDN Subscriber, you are entitled to receive up to four support
    incidents depending on your subscription level.


    Regards,
    Walter Wang (, remove 'online.')
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jun 23, 2006
    #16
  17. mfr

    mfr Guest

    Walter,

    After your last comment I passed the call back to the client's support team
    with the details of this thread. I've now received (limited) feedback from
    them.....

    "Javascript functions enabled. Call resolved"

    I was originally told that they'd checked this.

    Anyway, thanks for your help.

    Regards,
    Dave.


    "Walter Wang [MSFT]" wrote:

    > Hi Dave,
    >
    > Thank you for your update.
    >
    > In javascript "object expected" normally means some javascript function or
    > object is not defined, which also means some required javascript source
    > files are not loaded correctly.
    >
    > As I said in my last post, the TreeView is using some embedded javascript
    > source files which generated by WebResource.axd. They should be downloaded
    > by IE correctly. For those system that have problem with this, I think
    > there must be some specific security setting or tools/addon which prevents
    > the resource from loading.
    >
    > I think you can also try to use other browsers to see if this problem
    > exists or not. That might narrow down some possibilities.
    >
    > If this issue is urgent or critical to your product, I suggest you contact
    > MSDN representatives to submit your questions online or through phone:
    > http://msdn.microsoft.com/subscriptions/support/default.aspx
    > As an MSDN Subscriber, you are entitled to receive up to four support
    > incidents depending on your subscription level.
    >
    >
    > Regards,
    > Walter Wang (, remove 'online.')
    > Microsoft Online Community Support
    >
    > ==================================================
    > When responding to posts, please "Reply to Group" via your newsreader so
    > that others may learn and benefit from your issue.
    > ==================================================
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
     
    mfr, Jun 30, 2006
    #17
  18. Hi Dave,

    Thank you for your update.

    Please feel free to post here if you need more help on this.

    Have a nice day!



    Regards,
    Walter Wang (, remove 'online.')
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jul 3, 2006
    #18
  19. mfr

    Marcus Li Guest

    Hello there, my problem is that I am trying to develop a web part to
    navigate the sharepoint site using TreeView from ASP.NET 2.0 and
    Sharepoint Portal Server 2003.

    However, everytime the web part gets rendered I receive the exact same
    error:

    Error: object expected
    Char: 1

    I am viewing the web part using IE 6, so I was wondering how to set the
    javascript on IE to get rid of this error.

    Thanks so much for your help.
    Marcus.



    *** Sent via Developersdex http://www.developersdex.com ***
     
    Marcus Li, Jul 10, 2006
    #19
  20. mfr

    matt vaughn Guest

    I have been researching something similiar to this for applications using the new Callback. There are (2) JavaScript methods that used by this mechanism and really handled by the WebResources.axd handler.

    In my case I get WebForm_InitCallback() and WebForm_DoCallback() - - > "Object expected" errors.

    The only way I get it to work is to:
    1. go to the IIS console
    2. right-click the site and select Properties
    3. Click on the "Configuration" button
    4. Select the .axd Extension and click Edit
    5. Uncheck the box "Check that file exists".

    In addition:
    1. restart IIS
    2. dump any Temporay Internet files from the browser Tools | Options
    3. I even clear the Tempary ASP.Net files from the Framework directories.
     
    matt vaughn, Aug 8, 2006
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. volts
    Replies:
    0
    Views:
    501
    volts
    Apr 7, 2004
  2. JJ
    Replies:
    26
    Views:
    1,366
    Mark Rae
    Mar 19, 2007
  3. El Kabong

    Browsers, browsers! Quo vadis?

    El Kabong, May 11, 2007, in forum: HTML
    Replies:
    23
    Views:
    905
    dorayme
    May 13, 2007
  4. JamesHead

    Treeview Client side expanding and collapsing of nodes

    JamesHead, Jan 24, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    204
    JamesHead
    Jan 24, 2005
  5. John Roper
    Replies:
    3
    Views:
    565
    Harolds
    Jun 15, 2005
Loading...

Share This Page