Results 1 to 2 of 2
  1. #1
    Join Date
    May 2007
    Posts
    2
    Plugin Contributions
    0

    help question on_loaded javascript not calling other funtions

    I have this:
    /includes/modules/pages/index/on_load_assign.js
    with this:
    Code:
    first_assign();
    and I have this:
    /includes/modules/pages/index/jscript_assign.js
    with this:
    Code:
    function first_assign() {
      alert('assignments called');
    }
    When I view the source of my index page I see this:
    Code:
    <script type="text/javascript" src="includes/modules/pages/index/jscript_assign.js"></script>
    </head>
    <body id="indexBody" onload="first_assign();">
    If I'm reading it right, when my page loads an alert box should pop up that reads "assignments called". But it's not doing that. Any ideas why?

    When I change on_load_assign.js to a simple alert function it works fine, but it doesn't seem to be able to call the outside function.

  2. #2
    Join Date
    May 2007
    Posts
    2
    Plugin Contributions
    0

    Default Re: on_loaded javascript not calling other funtions

    I lied.

    I had other stuff in my jscript_assign.js. It didn't look like it would interfere, and my webmaster toolbar didn't flag any javascript errors on the page, but it must have been doing something.

    I took out everything so that it exactly mirrored this post and it worked fine. I'm going to add stuff back in now and hopefully it will work.

 

 

Similar Threads

  1. Calling Images With Javascript
    By GodfatherAntiques in forum General Questions
    Replies: 7
    Last Post: 27 Jan 2011, 01:07 AM
  2. javascript calling problem
    By sn_aneesh in forum Basic Configuration
    Replies: 1
    Last Post: 28 Feb 2009, 06:10 PM
  3. calling javascript for thumbnail image
    By stevotj in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 12 Jan 2009, 08:54 AM
  4. Custom Javascript Calling images from unsecure folder
    By CoolCarPartsOnline in forum General Questions
    Replies: 0
    Last Post: 29 Dec 2008, 08:59 AM
  5. Calling Javascript file from main page
    By praiseandplay in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 5 Aug 2006, 04:41 AM

Posting Permissions

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