Forum Moderators: coopster

Message Too Old, No Replies

Need help on implementing link with form popup

         

Kallym

3:07 am on May 31, 2010 (gmt 0)

10+ Year Member



I have a PHP script that requires input from the user for a variable. The PHP script is a simple image uploader that I use in a custom CMS setup. Usually the script is accessed through a form on the CMS home page. The user selects the number of images to upload from a drop-down menu.

I would also like to have a link to this page in the navigation menu, so the user can jump straight to this page without going back to the home page first (where the form is). So I'd like to figure out a way for the user to input the number of images when they click on the link. Maybe something on the order of a little popup box that asks for the number of images, or has the form in it to select the number of images.

Does anyone have any ideas for the most elegant way to do this? Maybe with Ajax? I thought of doing a modal box, like Greybox, with the form in it, but I am not sure how to make the modal box close and then go to the correct page. Another idea would be a div that is visible onclick and has the form in it.

Thank You!

Kallym

4:17 am on May 31, 2010 (gmt 0)

10+ Year Member



I found a solution (that happens sometimes when I start typing out a problem). I got to thinking about the hidden div solution, so did a search and came up with this:
<snip>

The only problem was the absolute positioning. My site is centered. So I did another search and came up with this:
<snip>

This was a really simple solution. I guess I was over thinking it at first. :-)

[edited by: dreamcatcher at 6:53 am (utc) on May 31, 2010]
[edit reason] No urls please. See TOS. [/edit]