Results 1 to 2 of 2

Thread: javascript files not loading

  1. #1
    Join Date
    Sep 2011
    Posts
    25

    Default javascript files not loading

    Some javascript files are not loading in my roo app.


    In the load-scripts.tagx file are the following lines:


    Code:
      
      <script src="${spring_url}" type="text/javascript"></script>
      <script src="${dojo_url}" type="text/javascript"></script>
      <script src="${spring_dojo_url}" type="text/javascript"></script>
      <script language="Javascript" type="text/javascript">dojo.require("dojo.parser");</script>
    The last three don't load.
    You can put them in any order you like. The first one will load, the others will not.
    They are all present in the html.

    And if I look at the source in Firefox for example, the first line always has correct syntax colour highlighting, the others are all in uniform black. The syntax is perfectly correct for all four.

    It may of course be that I have messed around with something that has caused this.
    Any help gratefully received.


    Here is the entire file:
    Code:
    <jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:spring="http://www.springframework.org/tags" version="2.0">
    
      <jsp:output omit-xml-declaration="yes" />
    
     		<link rel="stylesheet" href="/css/int/general.css" type="text/css"/>
    		<link rel="stylesheet" href="/css/int/header.css" type="text/css"/>
    
    
      <spring:theme code="styleSheet" var="roo_css" />
      <spring:url value="/${roo_css}" var="roo_css_url" />
      <spring:url value="/resources/dojo/dojo.js" var="dojo_url" />
      <spring:url value="/resources/dijit/themes/tundra/tundra.css" var="tundra_url" />
      <spring:url value="/resources/spring/Spring.js" var="spring_url" />
      <spring:url value="/resources/spring/Spring-Dojo.js" var="spring_dojo_url" />
      <spring:url value="/resources/images/favicon.ico" var="favicon" />
      <link rel="stylesheet" type="text/css" href="${tundra_url}" />
      <link rel="stylesheet" type="text/css" media="screen" href="${roo_css_url}" />
      <link rel="SHORTCUT ICON" href="${favicon}" />
    
      <!-- Get the user local from the page context (it was set by Spring MVC's locale resolver) -->
     
      <c:set var="userLocale">
        <c:set var="plocale">${pageContext.response.locale}</c:set>
        <c:out value="${fn:replace(plocale, '_', '-')}" default="en" />
      </c:set>
    
      <script type="text/javascript">var djConfig = {parseOnLoad: false, isDebug: false, locale: '${fn:toLowerCase(userLocale)}'};</script>
    
     
      <script src="${spring_url}" type="text/javascript"></script>
      <script src="${dojo_url}" type="text/javascript"></script>
      <script src="${spring_dojo_url}" type="text/javascript"></script>
      <script language="Javascript" type="text/javascript">dojo.require("dojo.parser");</script>
    
    
    </jsp:root>

  2. #2
    Join Date
    Sep 2011
    Posts
    25

    Default got the answer

    The answer is:

    at some point I removed the phrase
    Code:
    <!-- required by FF3 and Opera -->
    between the
    Code:
    <script>
    and
    Code:
    </script>
    .

    I hadn't understood what they meant.
    For those like me who are still wondering what they're there for, a couple of browsers get confused when showing .jspx pages if there's nothing between the script tags: the pages just won't work properly. And not just FF3 either, I've got the latest version of Firefox.


    Sorry for the bovver.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •