Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #26510

Re: Error can't find variable: $

Date 2015-01-08 20:08 -0600
Subject Re: Error can't find variable: $
From Bint <bint@ign.com>
Newsgroups comp.lang.javascript
Message-ID <D0D4944A.FB3E%bint@ign.com> (permalink)
References <D0D433D8.FB25%bint@ign.com> <m8mum7$k6e$1@dont-email.me>

Show all headers | View raw


On 1/8/15, 4:00 PM, in article m8mum7$k6e$1@dont-email.me, "Denis McMahon"
<denismfmcmahon@gmail.com> wrote:

> On Thu, 08 Jan 2015 13:17:12 -0600, Bint wrote:
> 
>> I tried to add a date formatting script to my html file, and I started
>> getting this error -- it doesn't happen every time, though.  I was
>> already including jQuery in my <head>.  I put the new script include at
>> the bottom of the <body>, but it still gives me the error.  Anyone know
>> what I can do to fix it?
>> 
>> I haven't gotten this error when using jQuery on my own -- just once I
>> tried to include this date formatter..
> 
> It's a good job that we're all psychic and can feel our way across the
> internet to your machine to read your code and see the error message
> you're getting, because otherwise, inb the absence of you posting the
> actual code and error messages, we wouldn't have a clue as to what the
> problem is.
> 
> The problem at the moment is that you have no idea how to ask for coding
> help:
> 
> 1) Post the code that gives the error
> 2) If it gives an error message, post the error message message
> 3) If otherwise it's not doing what you want, tell us (a) what you want
> it to do and (b) what it actually does.
> 

Well I can't post the whole program. I thought maybe it was a simple newbie
error.  Did you not read my subject line?  The error message is " Error
can't find variable: $" just like it says in the message subject line.

Basically I am including this script like this:
<script type="text/javascript" src="date.js"></script>

And like I said, I include it at the bottom of my body.  I already include
jQuery like this in my <head>

 <script type="text/javascript" src="jquery-1.11.2.min.js"></script>

Other than that I am not sure what you want.  I am not even trying to use
the library, simply including it causes the error.  And like I said, the
error doesn't happen every time, just about half the time.

It seems like a timing thing, where it is trying to parse the date.js script
before it has parsed jQuery.  But besides including Jquery in the head and
this other script in the body, I don't know what to do to make sure the
library gets loaded after jQuery.

Sorry if the question is still unclear.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Error can't find variable: $ Bint <bint@ign.com> - 2015-01-08 13:17 -0600
  Re: Error can't find variable: $ Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-08 22:26 +0100
  Re: Error can't find variable: $ Denis McMahon <denismfmcmahon@gmail.com> - 2015-01-08 22:00 +0000
    Re: Error can't find variable: $ Bint <bint@ign.com> - 2015-01-08 20:08 -0600
      Re: Error can't find variable: $ Andrew Poulos <ap_prog@hotmail.com> - 2015-01-09 13:51 +1100
        Re: Error can't find variable: $ Doc O'Leary  <droleary@2usenet2014.subsume.com> - 2015-01-09 03:12 +0000
      Re: Error can't find variable: $ Denis McMahon <denismfmcmahon@gmail.com> - 2015-01-09 03:04 +0000
      Re: Error can't find variable: $ Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-09 10:29 +0100
        Re: Error can't find variable: $ Bint <bint@ign.com> - 2015-01-09 12:21 -0600
          Re: Error can't find variable: $ Tim Streater <timstreater@greenbee.net> - 2015-01-09 18:26 +0000
            Re: Error can't find variable: $ "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-01-09 20:19 +0100
              Re: Error can't find variable: $ Bint <bint@ign.com> - 2015-01-09 17:43 -0600
                Re: Error can't find variable: $ "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-01-10 01:17 +0100
                Re: Error can't find variable: $ "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-01-10 11:38 +0100
                Re: Error can't find variable: $ Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-01-14 14:11 +0100
          Re: Error can't find variable: $ Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-09 20:03 +0100
  Re: Error can't find variable: $ Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-01-09 16:39 -0200
    Re: Error can't find variable: $ Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-09 20:08 +0100

csiph-web