When I have an included js file my theme does not get applied and Atlas stops working

Last post 10-13-2006 3:29 AM by Gordon-Freeman. 2 replies.

Sort Posts:

  • When I have an included js file my theme does not get applied and Atlas stops working

    10-12-2006, 6:09 PM
    • Member
      178 point Member
    • fark
    • Member since 04-28-2005, 10:43 PM
    • Posts 48

    In the code below if I include <script type="text/javascript" src="Calendar.js" />  my theme does not get applied and Atlas stops working.  As soon as I take this out the Ajax in my content page works great and the theme is applied just like normal. ????

    When I have these code snippets

    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="DesignProjects.master.cs" Inherits="DesignProjects" EnableTheming="true" EnableViewState="true" %>

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >

    <head runat="server">

     

     

     

     

     

    <title>Projects Database</title>

    <script type="text/javascript" src="Calendar.js" />

    </head>

    <body onunload="CheckWindow();" style="margin: 0px;">

     

    <form id="form1" runat="server">

    ******* The Calendar.js looks like this

    // JScript File

    function GetDate(CtrlName)

    {

    /**************************************************** Use Javascript method (window.open) to PopUp a new window which contain a Calendar Control. In the meantime, we'll pass the Parent Form Name and Request Control Name in the QueryString! *****************************************************/

    ChildWindow = window.open('Calendar.aspx?FormName=' + document.forms[0].name + '&CtrlName=' + CtrlName, "PopUpCalendar", "width=270,height=300,top=200,left=200,toolbars=yes,scrollbars=no,status=no,resizable=no");

    }

    function GetDateAutoFill(CtrlName, AutoFillCtrlName)

    {

    /**************************************************** Use Javascript method (window.open) to PopUp a new window which contain a Calendar Control. In the meantime, we'll pass the Parent Form Name and Request Control Name in the QueryString! *****************************************************/

    ChildWindow = window.open('CalendarAutoFill.aspx?FormName=' + document.forms[0].name + '&CtrlName=' + CtrlName + '&AutoFillCtrlName=' + AutoFillCtrlName, "PopUpCalendar", "width=270,height=300,top=200,left=200,toolbars=yes,scrollbars=no,status=no,resizable=no");

    }

     

    function CheckWindow()

    {

    ChildWindow.close();

    ChildWindow1.close();

    }

     

    function ViewFeatureEnhancement(ID)

    {

    ChildWindow1 = window.open('ViewFeatureEnhancement.aspx?ID=' + ID, "ViewFeatureEnhancement", "width=700,height=400,top=200,left=200,toolbars=yes,scrollbars=yes,status=no,resizable=yes");

    }

     

    function GetHelpWindow(CtrlName)

    {

    /**************************************************** Use Javascript method (window.open) to PopUp a new window which contain a TextBox Control. In the meantime, we'll pass the Parent Form Name and Request Control Name in the QueryString! *****************************************************/

    ChildWindow1 = window.open('HelpWindow.aspx?FormName=' + document.forms[0].name + '&CtrlName=' + CtrlName, "HelpWindow", "width=670,height=600,top=200,left=200,toolbars=yes,scrollbars=yes,status=no,resizable=yes");

    }

     

    function EditOwnerList()

    {

    /**************************************************** Use Javascript method (window.open) to PopUp a new window which contain a TextBox Control. In the meantime, we'll pass the Parent Form Name and Request Control Name in the QueryString! *****************************************************/

    ChildWindow1 = window.open('UpdateProjectOwner.aspx', "HelpWindow", "width=450,height=600,top=200,left=200,toolbars=yes,scrollbars=yes,status=no,resizable=yes");

    }

  • Re: When I have an included js file my theme does not get applied and Atlas stops working

    10-12-2006, 11:31 PM
    • All-Star
      17,453 point All-Star
    • albertpascual
    • Member since 05-23-2003, 2:11 PM
    • Riverside, CA
    • Posts 3,474

    A javascript error may be stopping the completion of your page, check if you see any javascript error at the end of the page. Also you can always set the browser to show the javascripts errors.

     

    Cheers
    Al
    My Blog
    MapStats.NET
    Please click on 'Mark as Answer' if this post answered your question!
  • Re: When I have an included js file my theme does not get applied and Atlas stops working

    10-13-2006, 3:29 AM
    Answer
    • Contributor
      4,635 point Contributor
    • Gordon-Freeman
    • Member since 07-17-2006, 4:19 AM
    • SH, PRC
    • Posts 909

    Hi~ Atlas may have problem with other js on page, you may try to import the js in ScriptManager directive and see if it works: 

    <atlas:ScriptManager runat="server" ID="ScriptManager1">
      <Scripts>
        <atlas:ScriptReference ScriptName="Calendar.js" />
      </Scripts>
    </atlas:ScriptManager>
    
     
    你好! Just FYI o_O
Page 1 of 1 (3 items)