简体   繁体   中英

fancybox with drop-down list option pre-selected

This is my fancybox initiation:

 $("a.appointment_button").fancybox({ 'type': 'iframe', 'width': 400, 'padding': 0, 'scrolling': 'no', 'closeBtn': true, 'autoScale': false }); 

I'm trying to get drop-down list option pre-selected in my fancybox for different buttons.

So for instance: when number 1 button is clicked I want option 1 of the drop-down list to be pre-selected or when number 2 button is clicked I want option 2 of the drop-down list to be pre-selected when the fancybox loads.

Could you please advice?

You really did not give any useful info, for example, what and how are you trying to display in fancybox - is it html, inline content, ajax or iframe?

If you are displaying inline content (for example, a hidden form), then you do not need to do anything related to fancybox, all changes will be "live" and your content will keep all changes after opening/closing fancybox.

If you are using iframes, then the easiest solution would be to use url parameters, for example, appointment.php?selected_id=1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM