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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:57:38+00:00 2026-05-15T15:57:38+00:00

After seeing many questions about how jQuery.load() handles tags in the content to be

  • 0

After seeing many questions about how jQuery.load() handles tags in the content to be loaded, I see that jQuery strips out inline tags. But, I’d like to use Kontactr for the contact page in my site, and the much nicer AJAX embed they have is two script tags as in the code examples below. How can I work around the jQuery.load() constraints to make these script tags run in the jQuery.load(file, callback()) callback() function?

index.html

<html>
<head>
    <!--include css, jquery, scripts -->
    <script type="text/javascript">
        $(document).ready(function() {
            $('#main_content').load('contact.html #main_content', function(){
                //what can I put here to run the Kontactr inline script code
                //when contact.html is loaded?
            });
        });
    </script>
</head>
<body>
    <div id="main_content"><!--content will load here--></div>
</body>
</html>

contact.html

<div id="main_content">
    <h1>Please Contact Us With The Form Below</h1>
    <!-- jQuery.load will strip out these script tags 
         and the form will not be embedded. -->
    <script type="text/javascript"> id = 1; </script>
    <script type="text/javascript" src="http://kontactr.com/wp.js"></script>
</div>

I’ve thought maybe I can put a <div id="contact_form"/> in contact.html and then maybe eval the script tags in the callback function inside of
$('#contact_form').html(//eval script tags result here);, but I’m not sure how to do that syntactically.

  • 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-15T15:57:39+00:00Added an answer on May 15, 2026 at 3:57 pm

    So, in case anyone else runs into this issue, there’s a pretty simple solution.

    That http://kontactr.com/wp.js script just document.write()s an iframe to the page. What I wound up doing was this:

    <div id="main_content">
        <h1>Please Contact Us With The Form Below</h1>
        <center>
            <iframe id="kontactr-iframe" src="http://kontactr.com/w.php?id=1&referrer=http://www.theurlyourrequestingfrom.com&color=000000-FFFFFF-000000-FFFFFF" width="475px" height="475px" frameborder="0"></iframe>
        </center>
    </div>
    

    It works like a charm.

    Notes: The color argument is optional, and the id argument is specific to your Kontactr account. The referrer argument is populated with window.top.location.href in the http://kontactr.com/wp.js script. I just put the URL of the $.load() page there.

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

Sidebar

Related Questions

there are many related questions/answers about that in SO. I took a look to
After seeing a conversation in a forum from many years ago that was never
After reading many of the replies to this thread , I see that many
There are many similar questions, but nothing that answers this specifically after googling around
After looking at several questions/answers here, I'm not seeing what I think I need.
I’m after some thoughts on how people go about calculating database load for the
After seeing tons of web site using modal window with a nice expansion animation
I'm seeking further clarification after seeing What is responsible for releasing NSWindowController objects? I'm
I'm working on an editor for novel authors . After seeing programs like DarkRoom
I'm seeing this exception message coming from XslCompiledTransform.Transform(), but after handling the exception the

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.