Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

76
Views
Dynamic Pages using Jquery .load conflicts

I'm trying to make a single page website that loads pages to a div with a id of #content however sometimes my form elements gets mess up like datepickers and autocompletes not rendering. So i suspected that there's to many scripts to load and it cause conflicts since all of my pages has source links.

My first adjustment was to remove all source links from my child pages and move it to the main page. but when child pages load using jquery .load i get a bunch of errors on my consoles like autocomplete is not a function and Synchronous XMLHttpRequest. Any suggestions to fix this?

//My code to load pages.

$(".click").on("click",function(){

        var page = $(this).data('link');

        $("#content").html("<img src='img/142.gif' width='150' />").load(page);

        //console.log('Click function was called');

});

enter image description here

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

There are errors because the javascript source files loaded after but your javascript code executed first. You can use iframe element and in order to load new page dynamically change the src then reload the iframe.

$(".click").on("click",function(){

    var page = $(this).data('link');
    var iFrame = $('iframe');
    iFrame.html("<img src='img/142.gif' width='150' />");
    iFrame.load(page); 

});
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!