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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:38:06+00:00 2026-06-09T01:38:06+00:00

What I really need is a function like the hover-element in Firebug, where we

  • 0

What I really need is a function like the hover-element in Firebug, where we can get the selected HTML.

In our program we will load an URL, and that URL will open in an iFrame. Here we want to hover the elements, and when the user clicks on a certain element, we want the HTML source for that particular element.

So:

  • Can you interact (get hovered html) with the iFrame, so you get the selected HTML?
  • 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-06-09T01:38:08+00:00Added an answer on June 9, 2026 at 1:38 am

    Here is something like you wanted. It will run in a div called sourcecode.

    However you can put the sourcecode div in an iframe if you want.

    <div class="sourceCode">
    </div>
    <script type="text/javascript">
        (function ($) {
            $.fn.outerHTML = function () {
                return $(this).clone().wrap('<div></div>').parent().html();
            }
        })(jQuery);
    
        $(document).ready(function () {
            $("p,div").click(function () {
    
                var thisobject = this;
                var sourcecodes = $(thisobject).outerHTML();
                sourcecodes = htmlEscape(sourcecodes);
                $(".sourceCode").html(sourcecodes);
    
            });
    
        });
    
        function htmlEscape(str) {
            return String(str)
            .replace(/&/g, '&amp;')
            .replace(/"/g, '&quot;')
            .replace(/'/g, '&#39;')
            .replace(/</g, '&lt;')
            .replace(/>/g, '&gt;');
        }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I really need some help in Regular Expressions, i'm working on a function like
I dont really know how to explain exactly what function i need but ill
I'm in a need to optimize this really tiny, but pesky function. unsigned umod(int
I really need help with this last part of my program. I need to
I really need to get WordPress to sanitize them and replace them with S,
Hi I'd like to get the list of selected checkboxes ina page, actually what
I really need to create something like the following, I am building 2 classes,
Okay, if feel like this should be really simple and accomplished by a function
I really need help on this those function DATEDIFF OR DateAdd , because I
I am launching a process from ShellExecuteEx, and I really need to get 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.