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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:58:08+00:00 2026-06-11T03:58:08+00:00

When I click on image(html tag), I would like show a popup panel (ex:like

  • 0

When I click on image(html tag), I would like show a popup panel (ex:like popup pane in facebook when we click on picture).
note: popup pane should contain image and text(retrieve from database).

How could I do that ?
thx you in advance

  • 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-11T03:58:10+00:00Added an answer on June 11, 2026 at 3:58 am

    Something along the lines of this:

    In your HTML page, add this kind of code:

    (first include Jquery on your page of course)

    When I click on image(html tag),

    $('#idOfWhateveriWant').on('click',function(){
    
    });
    

    I would like show a popup panel (ex:like popup pane in facebook when we click on picture).

    $('#idOfWhateveriWant').on('click',function(){
       //window.open("whatever") 
       //ABOVE NOT RECOMMENDED
    
       //use below instead
    
       $.ajax({
       url: 'ajax/test.php',
       success: function(data) {
          $('.result').html(data);
          //or use some jquery plugin you made 
          //or external plugin
          // to make your pane appear
          //$.WHateverPopupPanePlugin(whatever,data)
          alert('Load was performed.');
       }); //SEE http://api.jquery.com/jQuery.ajax/
    });
    

    note: popup pane should contain image and text(retrieve from
    database).

    IN ajax/test.php:

    1. configure mysql database first,
    2. put some data in it
    3. Add some code like this to access stuff from your database and echo it as a JSON object

    Php example below:

     <?php 
    
      //--------------------------------------------------------------------------
      // Example php script for fetching data from mysql database
      //--------------------------------------------------------------------------
      $host = "localhost";
      $user = "root";
      $pass = "root";
    
      $databaseName = "ajax01";
      $tableName = "variables";
    
      //--------------------------------------------------------------------------
      // 1) Connect to mysql database
      //--------------------------------------------------------------------------
      include 'DB.php';
      $con = mysql_connect($host,$user,$pass);
      $dbs = mysql_select_db($databaseName, $con);
    
      //--------------------------------------------------------------------------
      // 2) Query database for data
      //--------------------------------------------------------------------------
      $result = mysql_query("SELECT * FROM $tableName");          //query
      $array = mysql_fetch_row($result);                          //fetch result    
    
      //--------------------------------------------------------------------------
      // 3) echo result as json 
      //--------------------------------------------------------------------------
      echo json_encode($array);
    
    ?>
    

    Additional help:

    • http://api.jquery.com/jQuery.ajax/
    • http://api.jquery.com
    • http://openenergymonitor.org/emon/node/107
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to send POST data using an html tag. I know that
take look at this: http://www.templatemonster.com/demo/35403.html In this template you can click on the image
How can I click in a image/function with javascript? Something like: document.getElementById(check-in-banner).click(); the source
I am going to display the Flexigrid in html div tag when click a
I would like to have a Google Chrome extension to rehost any image I
I've got an html ul tag where I have something like this: <div id=sidebar>
On click a image how can another page be previewed in the same page
I had image for Products and i want user when click on image appear
Right now the problem is that the first time when I click the image,
I have a problem... In my view i have Image.If i click on image

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.