> Date: Sat, 29 May 2010 11:50:50 -0400
> To: php-general@lists.php.net; aj...@alumni.iu.edu
> From: tedd.sperl...@gmail.com
> Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different   
> Forms
> 
> At 7:31 PM -0400 5/28/10, Alice Wei wrote:
> >
> >Anything I want?
> >
> >Seriously, I do know how to pass a "non-dynamic" element from one 
> >page to another page, but when I started researching on how to 
> >utilize dynamic menus based on user input, I found Ajax, until this 
> >problem that I am running into hits me.
> >
> >Is there some way that I could generate dynamic select menus without 
> >using Ajax? Or, is that asking too much?
> >
> >Thanks for your help.
> >
> >Alice
> 
> Alice:
> 
> No offense, but considering what you posted when you started this 
> exchange, it did not appear that you knew how to use forms. But on 
> the other hand, I don't know what "non-dynamic" elements are.
> 
> Now on to your problem -- you want to "generate dynamic select menu" 
> -- I'm not sure what those are either. I think you need to start 
> using the terminology used in html, controls, and such. You can't 
> just throw terms together hoping that the person at the other end 
> knows what you're talking about.
> 
> In any event, here's something for you to consider:
> 
> http://www.webbytedd.com/a/ajax-controls/
> 
> It shows how to use javascript to detect user's actions in input 
> elements (i.e., text, radio, checkboxes, etc.) and select elements. 
>  From those routines, you should be able to construct whatever 
> "dynamic select menus" you want. All the code is there -- just review 
> it.
> 
> It would be a trivial matter to add a Submit button to the form to 
> pass these values to the server via traditional means and thus the 
> Submit was omitted to show how Ajax Controls work.
> 
> However, it is important to note that the example provided above is 
> not unobtrusive -- it is an early example of how all of this was 
> done. There are more appropriate ways to accomplish this, but they 
> require more abstraction, which would probably lead to more confusion 
> on your part -- no offense meant.
> 
> I suggest you read "DOM Scripting" and "Advance DOM Scripting" both 
> published by Friends of ED. They are well worth the cost/effort to 
> read and would give you a better understanding of the processes 
> involved.
> 
> Cheers,
> 
> tedd
> 


At the time of writing this, I got all the functionality I wanted, only that it 
takes 3 submits, which is 4 pages in total, which includes two dependent select 
menus based on user input by clicking on the radio button and some other static 
drop downs and text inputs. 

I am not sure if it is possible to cut it down two only two submits, I just 
went online and found this, 
http://www.w3schools.com/dhtml/tryit.asp?filename=trydhtml_event_onchange. If I 
could change this function to using the radio button, and process the other 
searching for the dependent drop downs using case statements with PHP , do you 
think this is a good idea?

Anyway, I found this method is kind of ugly for the time being, but less 
daunting with what I was doing before. Thanks. 

Alice


> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
                                          
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

Reply via email to