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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:50:51+00:00 2026-06-13T07:50:51+00:00

I have made a working webpage but when i try to take the jscript

  • 0

I have made a working webpage but when i try to take the jscript into an external file it no longer is called. i have put in the code in my header to include the file name but still unable to call it. Here is my jscript please help me out
by the way just a quick edit I got the isMobile function from here http://www.abeautifulsite.net/blog/2011/11/detecting-mobile-devices-with-javascript/

<script>        
    var isMobile = {
      Android: function() {
        return navigator.userAgent.match(/Android/i);
      },
      BlackBerry: function() {
        return navigator.userAgent.match(/BlackBerry/i);
      },
      iOS: function() {
        return navigator.userAgent.match(/iPhone|iPad|iPod/i);
      },
      Opera: function() {
        return navigator.userAgent.match(/Opera Mini/i);
      },
      Windows: function() {
        return navigator.userAgent.match(/IEMobile/i);
      },
      any: function() {
        return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
      }
    };
    function load()
    {
      var w=((screen.availWidth)/50)*49;
      var h=(w/4)*3;
      if( isMobile.any() ){
        var t=w;
        w=h;
        h=t;

      }
      var a=document.getElementById('banner');
      a.style.width=w+'px';
      a.style.height=(h/4)+'px';
      var b=document.getElementById('main');
      b.style.width=w+'px';
      b.style.height=Math.round((h/7)*4)+'px';
    }
  </script>
  • 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-13T07:50:52+00:00Added an answer on June 13, 2026 at 7:50 am

    When referencing an external JavaScript file, its contents should not be surrounded by a <script> tag. The <script> tag in the main file is what informs the browser that the contents should be parsed as JavaScript. Remove the surrounding <script> tag from the external file.

    Proper reference in the main file:

    <script type='text/javascript' src='path/to/external.js'></script>
    

    The language='JavaScript' attribute has been deprecated and is unnecessary. You may include type='text/javascript'.

    The contents of the external file should contain only JavaScript code, not surrounding <script> tags as in:

    // File external.js
    alert('Look, no script tag!');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made this code working but I want to have an alert ,
I have made a script, but it's not working as expected, and I need
I have made a working clock widget app in android but would like it
I have made a program with a scroll pane, but it is not working.
I have made a drop down menu which is working fine, but when i
I have written an ActiveX control in C# and have made it working using
I have made an android app which working fine. I implemented the Login functionality
I have made a ViewController in XCode for an iPhone project I'm working on,
I have a small self made gallery which im still working on it: http://springbreak.enteratenorte.com
I have made a code that read data from flash Nand (without filesystem). fd

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.