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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:21:19+00:00 2026-05-27T23:21:19+00:00

<script src=<?php echo site_url(‘bootstrapper/jqTimer’); ?>></script> So I’ve tried to call the controller below using

  • 0
<script src="<?php echo site_url('bootstrapper/jqTimer'); ?>"></script>

So I’ve tried to call the controller below using the script above but I get error not found. Any ideas as to why this method is not working?

function jqTimer() {
    $this->load->view("jquery.timers.js");
}
  • 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-27T23:21:20+00:00Added an answer on May 27, 2026 at 11:21 pm

    When loading javascript with a <script> tag, the src attribute is expecting a file name to a js file. You’re giving it a path to a controller method in your CI install.

    What you need to do is put the jquery.timers.js file in the public_html folder and access it from there:

    // assuming you have the script in a [javascripts] folder inside [public_html]
    <script src="<?php echo site_url('javascripts/jquery.timers.js'); ?>"></script>
    

    If you’d prefer to load your javascript through views, then you need to do this instead:

    <script><?php echo $this->load->view("jquery.timers.js", "", TRUE); ?></script>
    

    This will echo out the contents of the view file between the <script> tags for embedded javascript. (passing TRUE as the third parameter returns the content of the file, so you can echo it out)

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

Sidebar

Related Questions

(CrossSlide) (LightBox) This is my header: <script type=text/javascript src=<?php echo ROOT.'sources/js/jquery.js'; ?>></script> <script type=text/javascript
I'm trying to make a simple php script to find all src attributes from
i call on a PHP script that generates graph images for me, however, it
I am trying to send a name:value pair to a php script using the
If I have a script tag like this: <script id = myscript src =
Here's a snippet of code from a shell script I have written: for src
Here is my preload script: <script type=text/javascript> Image_1 = new Image(1,1); Image_1.src = images/sprites.png;
I made this bookmarklet: javascript:(function(){var s=document.createElement('script');s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');document.getElementsByTagName('body')[0].appendChild(s);$('#hldIntMain').hide();$('#fadeBackground').hide();return false;})() Formatted code: // Add in jQuery var
My script is generating a very long URL just like the one below and
The script below will replace selected word in a textarea. But it only works

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.