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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:53:09+00:00 2026-05-26T07:53:09+00:00

What i’m trying to do is i have an image display on the page

  • 0

What i’m trying to do is i have an image display on the page and another image lays on top with many frames selection implemented by JQuery from the following tutorial:

http://www.queness.com/post/3036/create-a-custom-jquery-image-gallery-with-jcarousel

With JCarousel, one of the images from many selected will be assigned with “active” class to the

  • and the each of the images are within list, for example

    <li><a href="#"><img src="#" /></a></li>
    

    What i want to do is to get the image src location with “active” state (class) whenever user click or select and pass into php. Does anyone mind to offer some suggestion or tips on how can i do that?

    Thank you for your time reading my Question.

    • 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-26T07:53:10+00:00Added an answer on May 26, 2026 at 7:53 am

      The following jQuery should select what you want in JavaScript:

      var activeImageSource = $('li.active').find('img').attr('src');
      

      As for passing it to PHP, it depends on how you are submitting information. You could submit the src via an HTTP <form> POST (where the action is the PHP file that is coded to parse the request) or via an AJAX request. You can access the posted data in the PHP $_POST array.

      JavaScript

      var activeImageSource = $('li.active').find('img').attr('src');
      
      $.ajax({
        type: 'POST',
        url: 'some.php',
        data: 'activeImage=' + activeImageSource,
      }).done(function(msg) {
        console.log('Success');
      });
      

      PHP

      <?php
        echo 'activeImage source is ' . htmlspecialchars($_POST['activeImage']);
      ?>
      
      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report

    Sidebar

    Related Questions

    Basically, what I'm trying to create is a page of div tags, each has
    I am trying to understand how to use SyndicationItem to display feed which is
    I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
    I have a text area in my form which accepts all possible characters from
    I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
    I have a view passing on information from a database: def serve_article(request, id): served_article
    I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
    I am trying to loop through a bunch of documents I have to put
    I have a bunch of posts stored in text files formatted in yaml/textile (from
    I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

    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.