Jump to content

Choose dropdown list and display picture. Not sure where to start.


BrettHartel

Recommended Posts

Thanks for taking the time to help me.

 

I am not sure where to start with the effect I would like.

 

There will be a dropdown list and I would like a picture next to it.

 

Then, as the user selects different inputs from the dropdown list the picture will change accordingly.

 

I appreciate any help I can receive.

 

Thank you,

 

Brett Hartel

Link to comment
Share on other sites

Thanks for taking the time to help me.

 

I am not sure where to start with the effect I would like.

 

There will be a dropdown list and I would like a picture next to it.

 

Then, as the user selects different inputs from the dropdown list the picture will change accordingly.

 

I appreciate any help I can receive.

 

Thank you,

 

Brett Hartel

 

You can use Ajax and jquery for onchange of dropdownlist value and submit the value. On that value show image

$.("#drpdn).change(function(){

$.ajax({

type: "POST",

url: "image.php", //your current php file

data: 'drpdn':$("#drpdn").val(),

dataType: 'html',

success: function() {

 

}

});

});

 

get the value of drpdn and use it to find image corresponding to it like

if(isset($_POST['drpdn']))

{

$drpdn=$_POST['drpdn'];

///code to find image corresponding to $drpdn

Edited by Dharmender
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.