Hey friends,

I have a drop down box. onChange of that drop down box the option selected is $_POSTed to a php page where I'm grabbing that name and using it in a form on the new page.

Instead of it opening a new window for the php page, I'd love to make it more aesthetically pleasing and use Fancy Box and jQuery to open a popup window over the page that has an iframe of the php in it.

My issue: I can't figure out how to have the modal popup open when the dropdown is selected. I don't want to have to use a button to trigger it. Any way to trigger the popup AND also POST to the php page onChange of the selection box?

Hope that makes sense.

Thanks in advance for your help.

if your dropdown box is like <select> <option> then just make a function with jquery:

$(document).ready(function() {
 $("#selectElementId").onchange(function() {
  ...
 });
});

this is the way you can let jquery do something when your select-box is changed

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.