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 7836481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:10:46+00:00 2026-06-02T14:10:46+00:00

When I dynamically load a script with jquery … options = { dataType: script,

  • 0

When I dynamically load a script with jquery

...
options = {
  dataType: "script",
  cache: true,
  url: "...appContr.js"
}
return jQuery.ajax(options);    
...

and I debug the script with firebug, this script has the name “1” and everything is in
one line (or in a few lines). I cannot use this for debugging.

I use Firefox 10.0.2 and Firebug 1.9.1.

When I use LAB.js

$LAB.script("...appContr.js").wait(function() {
      ...
    });         

or require.js

The file has its line breaks and the name of the script is “appContr”.

How can I change the jQuery command in order to get the same result?

Thanks a lot in advance

EDIT:

Thank you, Headshota, for your answer, but this does not help.
Besides, getscript does not cache the contents, and this is important for me.

EDIT:

Thank you, Marlin, for your answer:

The whole thing works without firebug enhancements when I load the script with lab.js or require.js, the problem is only with jquery script loading.

In firebug I have the tabs console, html, css, script, dom and network.
If I go – after jquery script loading – to script and view the script, there are no line breaks in the code.
But when I go to the “tab” console, I have one entry for the get request. When I click
“answer” in this get request, the script contains the line breaks. But this does not help me because in the “script” tag the line breaks are missing.

  • 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-06-02T14:10:47+00:00Added an answer on June 2, 2026 at 2:10 pm

    dataType: script tells jQuery.ajax() to interpret the response as JavaScript and evaluate it.

    “script”: Evaluates the response as JavaScript and returns it as plain
    text.

    An evaluated code basically has no file, line number and probably no white space. If you try to debug it in FireBug, it will probably tell you that it is “eval()ed” code.

    JavaScript loaders such as LABjs work by injecting a <script src> tag in your document; it is easier for FireBug to debug because the JavaScript filename, file content and line numbers are all available.

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

Sidebar

Related Questions

I have written a jquery script to dynamically load a form on a web
I'm trying to create a simple ajax load test script that dynamically creates divs,
When trying to dynamically load a Javascript file using jQuery I keep getting a
When using jQuery.load to dynamically load HTML content into a webpage, what is the
I am using an JavaScript (and AJAX) to dynamically load a PHP page into
I'm adding some <script> tags dynamically to the head element after page load. I
I use getScript to load dynamically my plugin: $.getScript('js/code.photoswipe.jquery-3.0.4.min.js', function () { //do magic
I'm using jQuery to dynamically add two divs on page load. It all works
I want to dynamically call fancybox to load an iframe. The URL of the
I'm using jQuery 1.5.2 trying to dynamically load a div from one source into

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.