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

  • SEARCH
  • Home
  • 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 722783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:01:49+00:00 2026-05-14T06:01:49+00:00

I wanted to create one js file which includes every js files to attach

  • 0

I wanted to create one js file which includes every js files to attach them to the head tag where it is.

But i am getting this error

Microsoft JScript runtime error: Object expected

this is my code:

var baseUrl = document.location.protocol + "//" + document.location.host + '/yabant/';

// To find root path with virtual directory
function ResolveUrl(url) {
    if (url.indexOf("~/") == 0) {
        url = baseUrl + url.substring(2);
    }
    return url;
}

// JS dosyalarının tek noktadan yönetilmesi
function addJavascript(jsname, pos) {
    var th = document.getElementsByTagName(pos)[0];
    var s = document.createElement('script');
    s.setAttribute('type', 'text/javascript');
    s.setAttribute('src', jsname);
    th.appendChild(s);
}

addJavascript(ResolveUrl('~/js/1_jquery-1.4.2.min.js'), 'head');
$(document).ready(function() {
    addJavascript(ResolveUrl('~/js/5_json_parse.js'), 'head');
    addJavascript(ResolveUrl('~/js/3_jquery.colorbox-min.js'), 'head');
    addJavascript(ResolveUrl('~/js/4_AjaxErrorHandling.js'), 'head');
    addJavascript(ResolveUrl('~/js/6_jsSiniflar.js'), 'head');

    addJavascript(ResolveUrl('~/js/yabanYeni.js'), 'head');
    addJavascript(ResolveUrl('~/js/7_ResimBul.js'), 'head');
    addJavascript(ResolveUrl('~/js/8_HaberEkle.js'), 'head');
    addJavascript(ResolveUrl('~/js/9_etiketIslemleri.js'), 'head');
    addJavascript(ResolveUrl('~/js/bugun.js'), 'head');
    addJavascript(ResolveUrl('~/js/yaban.js'), 'head');
    addJavascript(ResolveUrl('~/embed/bitgravity/functions.js'), 'head');
});

Paths are right. I wanted to show you folder structure and watch panel:
alt text

Any help would be greatly appreciated.

  • 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-14T06:01:49+00:00Added an answer on May 14, 2026 at 6:01 am

    I think the issue is that jQuery isn’t finished loaded when you use the $ global. According to Loading Scripts Without Blocking, this mechanism does not always preserve execution order in IE.

    The simple solution is to use a static script tag to load jquery. I.E. explicitly put the HTML:

    <script type="text/javascript" "/js/1_jquery-1.4.2.min.js" />
    

    But do you really need to wait for the ready event to load the other scripts, or do you just need jQuery loaded?

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

Sidebar

Related Questions

I wanted to create my own Python exception class, like this: class MyException(BaseException): def
I wanted to generate one fix view using interface builder, but the size of
Let's say I woke up today and wanted to create a clone of StackOverflow.com,
I wanted to show the users Name Address (see www.ipchicken.com ), but the only
When I created the project I'm trying to deploy I selected that I wanted
I've just wasted the past two hours of my life trying to create a
Wanted to convert <br/> <br/> <br/> <br/> <br/> into <br/>
Wanted to get some consensus around a UI feature I'm working on right now.
I wanted some of those spiffy rounded corners for a web project that I'm
I wanted to emulate a popular flash game, Chrontron, in C++ and needed some

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.