Help with PHP & Form Popup

A

amerar

Hi Everyone,

I am very new to this, so I'm hoping someone can help.

I have a form with buttons that a user can click. What I need to do
is that when a user clicks a button, before the form submits, I need
to show a popup window with a drop down list of values which were
returned from a MySQL query. And, the value selected will help drive
the next page shown to the user.

I've created the simple PHP to query the MySQL database, and, it
properly returns the values which I store in an array. However, I
have no clue on how to do a Javascript popup, let alone passing the
results from the MySQL query to be drawn on that popup html
page........

Can anyone help by either showing me some code or point me to a page
that has what I'm looking for? I've been at this for a few hours
already.

Thanks in advance!
 
A

amerar

@v33g2000cwv.googlegroups.com:









Please take a moment to re-think what you're doing. A pop-up window with
choices is SOOOooo 1990s. This is 2007! (Of course, if your paying
customer wants it that way, you might need to oblige her. Or if this is
a class assignment, it will be best to do it that way. Otherwise,
revise!)

Better way: When user clicks a radio button, the drop-down list (called a
select control) appears _on the same page_. More user-friendly, and
easier to code, too.- Hide quoted text -

- Show quoted text -


Do you have any examples of this 'select control' that appears? It is
hidden until you want it to appear?
 
D

Darko

Yes, the select control is hidden initially. When the radio button is
clicked, use the radio's onfocus method to change the select control's
class from 'hide' to 'show'. (This will require CSS with classes named
'hide' and 'show'.) For an example of hiding and showing, see

http://support.internetconnection.net/CODE_LIBRARY/Javascript_Show_Hi...
html

I completely agree with Jim, not only is that 1990's, but it's pretty
ugly (users think it's a popup ad or something), and is way harder to
code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top