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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:51:37+00:00 2026-05-27T20:51:37+00:00

The scenario is to send the clicked link text to server where i have

  • 0

The scenario is to send the clicked link text to server where i have kept images of the text say (caps) in a file system(images/caps/thumbnails) and the paths are saved in mysql database with this table desc

+--------+-------------+------+-----+---------+----------------+
| Field  | Type        | Null | Key | Default | Extra          |
+--------+-------------+------+-----+---------+----------------+
| imgid  | int(11)     | NO   | PRI | NULL    | auto_increment |
| imgurl | varchar(75) | YES  |     | NULL    |                |
| family | varchar(20) | YES  |     | NULL    |                |
+--------+-------------+------+-----+---------+----------------+
3 rows in set (0.04 sec)

with that text php retrieve all the images(say 50 images) via mysql from the file system opens products.html in new tab and display it there with that 50 images.
plz go throgh the whole code which i have in my pages and then reply

below is my menu bar code in my index.html.

<ul class="dropdown">

        <li><a href="#">Man</a>
            <ul class="sub_menu">
            <li><a href="#">Caps</a></li>
                <li><a href="#">Shirts</a></li>
            <li><a href="#">T-shirts</a></li>
                <li><a href="#">Jeans</a></li>
            </ul>
        </li>

        <li><a href="#">Woman</a>
            <ul class="sub_menu">
                <li><a href="#">Caps</a></li>
                <li><a href="#">Coats</a></li>
                <li><a href="#">Shirts</a></li>
                <li><a href="#">Tshirts</a></li>
            <li><a href="#">Jeans</a></li>
            </ul>
        </li>

        </ul>

with below code i m grabbing the text if a user clicks the caps link the txt is grabbed below the alert is working but the $.ajax……no

    $(document).ready(function() {
    $('ul.sub_menu a').click(function() {
        var txt = $(this).text();  
        //alert("you clicked"+txt);
        $.ajax({
        type: 'POST',
        url: 'thegamer.php',
        data: {'txt':txt}
        });
    });
 });

further in my thegamer.php it is not get passed to this code as i m echoing it but not getting echoed

   <?php
    include 'dbconnect.php';
    $q=$_GET["txt"];
      echo $q;
    include 'dbclose.php';
    ?>

further with the clicked link text the php pulls with this query pulls the relevant images

select * from images where family='$q'

REMEMBER I DONT WANT THE AJAX TO RETRIEVE THE IMAGES OF CAPS AND DISPLAY ON THE SAME INDEX.HTML BUT TO OPEN A NEW WINDOW TAB WITH PRODUCTS.HTML AND DISPLAY THE IMAGES THERE

from further on here then how to play with that txt and retrieve images from the file system with mysql paths and further displaying that 50 images in products.html inside a divs i am completely blank i tried all the stackoverflow relevant questions and google but cant get an idea and process it

anyone please help me to go on further with code

  • 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-27T20:51:38+00:00Added an answer on May 27, 2026 at 8:51 pm

    try with this:

    var txt = $(this).text();
    $.ajax({
        type: 'POST',
        url: 'thegamer.php',
        data: 'txt=' + txt,
        });
    

    OR with your code:

    var txt = $(this).text();
    $.ajax({
        type: 'POST',
        url: 'thegamer.php',
        data: {send_txt: txt},
        success: function( data ){
          //now echo the data where you want
          // for example
          $('#result').html( data );
          // or you can see in on firebug
          console.log( 'Return:' + data );
        }
        });
    

    note that send_txt is a post variable which you can get with like $_REQUEST['send_txt'], hope it will work

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

Sidebar

Related Questions

I have the following scenario. I send a XML file to a server as
My scenario - I am trying to send a Assembly File from Server to
I have a scenario where I am to send email using our own SMTP
i have a scenario where in i need to send an xml as a
Scenario: Say I am on an invoice details page. I have a customer name
You know the scenario....You are adding functionality to your system to send out an
Scenario. I have a client with two network connections to a server. One connection
I have a scenario where I need to send a series of data across
The scenario is I have received a file for processing via my web service.
I have a scenario in which i'm required to allow the user to send

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.