954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Open FancyBox/ jQuery iframe popup onChange of drop down selection

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.

devinodaniel
Light Poster
47 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

if your dropdown box is like 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

Agarsia
Junior Poster
114 posts since Feb 2011
Reputation Points: 10
Solved Threads: 25
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: