Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6702135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:01:06+00:00 2026-05-26T07:01:06+00:00

I have an express app that has a bunch of static javascript files that

  • 0

I have an express app that has a bunch of static javascript files that aren’t being loaded even though they are registered in my app.js file. Even public scripts (like jQuery: http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js) aren’t processing. I can see the script tags in the generated html, but none of the functionality runs and I can’t see the files loading in the web inspector.

Here is the code that I have:

app.js

var express = require('express')
var app = module.exports = express.createServer();

// Configuration
var port = process.env.PORT || 3000;

app.configure(function(){
    app.set('views', __dirname + '/views');
    app.set('view engine', 'jade');
    app.use(express.bodyParser());
    app.use(express.methodOverride());
    app.use(app.router);
    app.use(express.static(__dirname + '/public'));
});

app.configure('development', function(){
    app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); 
});

app.configure('production', function(){
    app.use(express.errorHandler());
});

// Routes

app.get('/manage/new', function(req, res){
    res.render('manage/new', {
        title: 'Create a new widget'
    });
})

app.listen(port);
console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);

/views/manage/layout.jade

!!! 5
html(lang="en")
    head
        title= title

        link(rel="stylesheet", href="/stylesheets/demo.css")
        link(rel="stylesheet", href="/stylesheets/jquery.qtip.css")
        script(type="text/javascript", href="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js")

    body!= body
        script(type="text/javascript", href="/javascripts/jquery.formalize.js")
        script(type="text/javascript", href="/javascripts/jquery.form.js")
        script(type="text/javascript", href="/javascripts/jquery.qtip.js")
        script(type="text/javascript", href="/javascripts/formToWizard.js")
        script(type="text/javascript", href="/javascripts/widget.js")

/views/manage/new.jade

h1= title

div(style="float:left;")
    form(action="/manage/generate", method="post", enctype="multipart/form-data", name="create-widget")
        .errors

        fieldset
            legend Band / Album Information

        fieldset
            legend Social Networks

        fieldset
            legend Download

All of my javascript files are stored in /public/javascripts and all of my static CSS files are being served up just fine. I’m not sure what I’ve done wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:01:07+00:00Added an answer on May 26, 2026 at 7:01 am

    script takes the attribute src, not href

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my NodeJS express application I have app.js that has a few common routes.
I have a simple app that uses an SQL Express 2005 database. When the
I've an event-driven app that has recently started using SQL Express 2008 (instead of
I have a windows form for a desktop app that has 7 fields, how
I have a Java web application that has a 'disconnected' Java Swing desktop app.
So, I have an app that uses a SQL Server express db. I have
I have an NodeJS Express app that is getting really big in just one
I have a public/ directory that I have set up as containing static files
I have a Node.js app using Express that stores data in a mongoDB (locally).
I have built an application that uses SQL Express 2005 and I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.