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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:39:42+00:00 2026-05-29T04:39:42+00:00

Here is the issue: I have a page index.php and onclick of select element

  • 0

Here is the issue:
I have a page index.php and onclick of select element we load another page (ajax) from same folder into the index.php page.

The ajax request is performed using this:

var $cachedContent = $loadContainer.find(".foo").html();
var $preloadHTML = $('<div class="loader"><img src="images/loader.gif"></div>');  
$("#myads").change(function(){
//$("#adshowblock").load( $(this).val() );
var loadFile = $(this).val();
if (!!loadFile) {
    $loadContainer
    .html($preloadHTML)
    .load(loadFile, function() {
        $preloadHTML.remove();
    });
}
else {
 $loadContainer.html($cachedContent);             
}             
});
});

For example: On the index.php page, I click select box, and banner.php loads into the page via ajax request. All works perfect.

But on banner.php page we also need to load specific css and js files such as:

    <link rel='stylesheet' type='text/css' href='style.css' />
    <script type='text/javascript' src='js/upload.min.js'></script>
    <script type='text/javascript' src='js/swfobject.js'></script>
    <script type='text/javascript' src='js/myupload.js'></script>

The issue is these files don’t get loaded (if we inspect the index.php page) after banner.php is fetched they just aren’t there. Should we in the index page (for the ajax request be adding get script like below (pinched from another StackOverflow answer))

If so can anyone help me do this? It’s driving me crazy.

$.ajax({
cache: true,
dataType: "script",
url: "your_js_file.js",
success: yourFunction
});

P.S. The above code I have no idea how to initiate that using our load file ajax request script at top of page, a very helpful member on here made the code for us.

Thanks!

  • 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-29T04:39:43+00:00Added an answer on May 29, 2026 at 4:39 am

    Move your scripts to the bottom of the page.

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

Sidebar

Related Questions

So I'm not to OOP in PHP. Here is my issue I have a
I have a curious issue here In my ejbCreate() method from where i insert
Alright, here is my problem i'm trying to solve. I have an index page
I have a page that I load a select dropdown box but I want
I have a similar issue like here: http://social.msdn.microsoft.com/forums/en-US/biztalkgeneral/thread/87d5a6ec-04ee-4c6f-8267-f526ee105f0b I have an asp.net web page
Here's the issue: I have a hook in IE that reacts on WebBrowser.OnNavigateComplete2 event
Here's the issue: I have 2 data contexts that I would like to do
Here's the issue: I have a list of App names that I want to
Having an issue here that I have tried everything I can think of but
I'm have a weird issue here. I have a UITableView using custom UITableViewCells. Everything

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.