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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.