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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:19:11+00:00 2026-05-25T19:19:11+00:00

Here is my jquery: $.ajax({ url: hash, success: function(data){ var thePage = $(data); alert(data);

  • 0

Here is my jquery:

$.ajax({
url: hash,
    success: function(data){
        var thePage = $(data);
        alert(data);
        $('#slider_menu').html($('div#menu_bg', thePage).html());
    }
});

The alert(data) returns this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>Pharma Mix</title>
    <link href="style.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        var currentX = 0;
        var currentY = 0;
        var pixelIncrement = 39;
        var currentFrame = 0;
        var currentImage = '';
        $('#rotator').mousemove(function(e){
            currentY = e.clientY - this.offsetTop;
            currentX = e.clientX - this.offsetLeft;
            currentFrame = (parseInt(currentX / pixelIncrement) + 1);
                //$(this).html(currentFrame);
                if(currentFrame < 12)
                {
                currentImage = String(currentFrame) + ".jpg" 
                $(this).css({'backgroundImage':'url("images/' + currentImage + '")'});
                }
        });
     });    
    </script>
</head>

<body>

    <div id="menu_bg">
        <div id="wrapper">       
            <div style="height:30px; background:#009de4"></div>
            <div id="homepage_menu">
                <div style="float:left"><br><a href="#healthcare.php"><img src="images/hcpbutton.jpg" style="margin-right:25px"></a><a href="#pharma.php"><img src="images/pharmabutton.jpg"></a></div>
                <div style="float:right"><br><img src="images/pharmamixlogo.jpg" alt=""></div>  
            </div> <!-- #homepage_menu -->                   
        </div> <!-- #wrapper -->  
    </div> <!-- #menu_bg -->        


    <div id="homepage_bg"> 

        <div id="homepage_wrapper">

            <div style="text-align:center"><img src="images/homepage_heading.jpg" alt=""></div>

            <div id="homepage_leftboxes">
                <div class="homepage_box1">
                    <p class="homepage_boxtext">
                    "Thanks for delivering an outstanding event. Feedback has been excellent all round - in terms of programme, venue, ambiance, technical delivery and the conference team."
                    <br><br>
                    <b>Tracey Guise</b>, BSAC
                    </p>
                </div> <!-- #homepage_box1 -->              
                <div class="homepage_box3">
                    <p class="homepage_boxtext">
                    The whole event ran very well - Debbie did an excellent job of keeping it all running very smoothly indeed.
                    <br><br>
                    <b>Anthony Grosso</b>, UCLH
                    </p>
                </div> <!-- #homepage_box3 -->
            </div> <!-- #homepage_leftboxes -->         

            <div id="rotator" style="width:430px;height:336px; float:left;" class="initalise"></div>

            <div id="homepage_rightboxes">            
                <div class="homepage_box2">
                    <p class="homepage_boxtext">
                    "The understanding and creative thinking that Pharma Mix have demonstrated has provided some genuine and demonstratable return on investment to the Evolution brand."<br><br>
                    <b>Luke Rudman</b>, Evolution Homecare
                    </p>
                </div> <!-- #homepage_box2 -->
                <div class="homepage_box4">
                    <p class="homepage_boxtext">
                    "I would like to thank Debbie & her team for the excellence in the delivery of this superb website & her patience with us."
                    <br><br>
                    Kevin Palmer, Mundipharma
                    </p>                        
                </div> <!-- #homepage_box4 -->

            </div> <!-- #homepage_rightboxes -->  

            <div style="height:170px;"><img src="images/homepage_clients.jpg"></div>

        </div><!-- #homepage_wrapper --> 

    </div><!-- #homepage_bg --> 

    <div style="color:white; text-align:center; padding-top:30px">Contact Us: 28b Priestgate  .  Peterborough  .  PE1 1JA  .  UK   Tel: 01733 554472</div>

</body>
</html> 

But the #menu_bg div won’t return its content! 🙁

This WORKS for any divs embedded further into the document (eg This will work) but I really don’t have any say over the content of the page being requested.

Any ideas why this won’t work? Or how to make it work?

Thank you

  • 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-25T19:19:12+00:00Added an answer on May 25, 2026 at 7:19 pm

    Had to change the returned code… there was no answer – it must be a bug, or similar.

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

Sidebar

Related Questions

Here's my jQuery: var docname = $('#doc').val(); function parseXml(xml) { $(xml).find(rsp).each(function() { alert(success); });
I am doing an AJAX call that returns some HTML and jQuery: <div id='selected'>Here
Here's some simple Javascript: (function($){ var ajax_callback = function(data) { window.location.hash = data.h1; };
I've got a little jQuery here: $.ajax({ url: $this.fileUploadUrl, data: 'url=' + encodeURIComponent(file.name), type:
Here is my jQuery code: $.get('/Home/GetList', function(data) { debugger; $('#myMultiSelect').val(data); }); Here is my
I have the following jQuery ajax call setup: function Testing() { var result =
By using jquery ajax function, I can do something like: $.ajax({ url: url, type:
I'm trying to send some data via JQuery ajax to a grails controller Here's
I am trying to get a URL variable into a jQuery ajax function, in
I am trying to load html asynchronously using jQuery ajax function. But I for

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.