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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:14:39+00:00 2026-06-16T15:14:39+00:00

First of all: ‘Locally’ neither means localhost, nor local folder. It means a code

  • 0

First of all: ‘Locally’ neither means “localhost”, nor “local folder”. It means a code area or a code space or a code region.

I have two JS (*.js) files for my site. One is to show a news ticker and other is to load something on hover. They are conflicting, and I can’t remove any one of ’em because I need ’em.

So a thing comes up to my mind is: as I can make many things locally, why not I load a js file locally? Suppose:

<?php 
if('condition') {
DO IT ONCE;
}
?>

<?php 
if('other_condition') {
DO STH ELSE ONCE;
}
?>

In such case, the first condition doesn’t bother the second condition. Even though the first one is doing, the second one is also doing well. No conflict, nothing.

If I can load a JS locally for a specific purpose and then break the JS loading further, then if I load other JS, she won’t find any JS before, because that’s for a specific purpose for the specific region only.

I think I’m clear with my idea. I’m here with a WordPress site, loading code specifically for home page using is_home() function. I want such a way to load a JS file for a region, and then break it to let the other JS function properly.

  • 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-16T15:14:41+00:00Added an answer on June 16, 2026 at 3:14 pm

    If you’ve designed your Javascript well, you can have two scripts that don’t interfere. Without seeing the actual scripts, it’s hard to recommend improvement. You could introduce new scopes for each of the scripts:

    script1.js

    (function() {
        var script_variable = document.getElementById("my_form");
        script_variable.onchange = function() { /* ... */ };
    })();
    

    script2.js

    (function() {
        // Same name!
        var script_variable = document.getElementById("other_element");
        script_variable.onclick = function() { /* ... */ };
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all I want to mention two things, One: My code isn't perfect
First of all, this code , as ugly as it is, works, for all
i have this code which i use in order to extract first all users
I have this code below, with which I select first all id's from table
First of all, pardon my hacky code, I'm just trying to try this out
First of all, this isn't for a keylogger, it's for an input in a
first of all some details: I configured security as below in web.xml view plaincopy
First of all, I'm quite new to the Android and JAVA world (coming from
first of all i would like to say i know its probably an easy
First of all there is probably a question like this already but i couldn't

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.