Re: [PHP] PHP driven frame

2002-11-06 Thread Marek Kilimajer
top frame:
form target=bottom_frame action=show_form.php
select name=form onChange=this.form.submit()
option value= -- choose a form -- /option
option value=form1 first form /option
option value=form2 second form /option
/select
input type=submit
/form


bottom frame (show_form.php):
switch($_GET['form']){
   case 'form1':
   include 'form1.php';
   break;
   case 'form2':
   include 'form2.php';
   break;
   case '':
   echo 'choose a form';
   break;
}

I showed you just the basics, don't forget to name the bottom
frame bottom_frame (or change the target). This can be done also
on a simple page

Chris Rehm wrote:


Good point, lack of javascript is a consideration.

The request is for a form where the second half format is dependent on
the first half. In other words, they make some choices on the top that
determine what the form on the bottom will be. But the guy who wants
this, wants it to be one screen.

Marek Kilimajer wrote:
 Did you get a request for a two part form, or for a form on 2 pages? The
 problem I see is with browsers
 without javascript (either turned of or not implemented)





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP driven frame

2002-11-05 Thread Marek Kilimajer
Did you get a request for a two part form, or for a form on 2 pages? The 
problem I see is with browsers
without javascript (either turned of or not implemented)

Chris Rehm wrote:

I'd just like to see if I can get some feedback from PHP pros to see 
if anyone is doing anything like this.

I've got a request to build a two part form, I was thinking it would 
be a page built with frames, when the top portion is filled out, the 
selections there would determine what page would fill the bottom 
portion. But since the bottom would also be a form for submission, I 
just thought I'd build it with PHP so that hidden fields on it would 
store the data from the top portion. Then, a submit gets all the data 
on one form.

Is anyone doing this? Any problems I'm overlooking? I was thinking of 
a simple javascript action on the upper form to kick off the php for 
the lower frame.

I'd appreciate any feedback regarding this. Is this something I should 
be using PHP for?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP driven frame

2002-11-05 Thread Justin French
Yuk.  I'll admit I don't like frames at the best of times, but is there any
reason why the two-part form can't be two *pages* rather than two *frames*?

The way I usually do that stuff is get them to fill in part a, then part b:

1) validates part a
2) decides what the part b form should look like
3) includes the contents of part a as hidden fields


But if you *have* to have the form split into two frames, then javascript
would submit the first form contents to the second frame, which would then
act like part b as above.

You would need to ask a javascript list about that tho :)


Justin




on 05/11/02 5:18 PM, Chris Rehm ([EMAIL PROTECTED]) wrote:

 I'd just like to see if I can get some feedback from PHP pros to see if
 anyone is doing anything like this.
 
 I've got a request to build a two part form, I was thinking it would be
 a page built with frames, when the top portion is filled out, the
 selections there would determine what page would fill the bottom
 portion. But since the bottom would also be a form for submission, I
 just thought I'd build it with PHP so that hidden fields on it would
 store the data from the top portion. Then, a submit gets all the data on
 one form.
 
 Is anyone doing this? Any problems I'm overlooking? I was thinking of a
 simple javascript action on the upper form to kick off the php for the
 lower frame.
 
 I'd appreciate any feedback regarding this. Is this something I should
 be using PHP for?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP driven frame

2002-11-05 Thread John W. Holmes
Just store the results of the first page into the session, get the
results from the second page, and then process everything.

Or serialize $_POST from the first page and pass it through the second
page in a hidden field.

I'd advise against using frames, just use two pages to get your results.

---John Holmes...

 -Original Message-
 From: Chris Rehm [mailto:chris;javadisciple.com]
 Sent: Tuesday, November 05, 2002 2:18 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP driven frame
 
 I'd just like to see if I can get some feedback from PHP pros to see
if
 anyone is doing anything like this.
 
 I've got a request to build a two part form, I was thinking it would
be
 a page built with frames, when the top portion is filled out, the
 selections there would determine what page would fill the bottom
 portion. But since the bottom would also be a form for submission, I
 just thought I'd build it with PHP so that hidden fields on it would
 store the data from the top portion. Then, a submit gets all the data
on
 one form.
 
 Is anyone doing this? Any problems I'm overlooking? I was thinking of
a
 simple javascript action on the upper form to kick off the php for the
 lower frame.
 
 I'd appreciate any feedback regarding this. Is this something I should
 be using PHP for?
 
 --
 Chris Rehm
 [EMAIL PROTECTED]
 
 For all the law is fulfilled in one word, even in this; Thou shalt
love
 thy neighbour as thyself.
 Gal. 5: 14
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP driven frame

2002-11-05 Thread Justin French
Well, he's asking you to do something that goes against what the web is good
at.  The simple solution is a two page form.

I've also had some luck with hiding/showing parts of the form with
css/javascipt... it worked really well, but needed (of course) a modern
browser with good JS and CSS support.  For that particular case, it was for
an intranet, so there were no problems... but I'd *NEVER* rely on JS in a
public form.


Justin French


on 06/11/02 3:04 AM, Chris Rehm ([EMAIL PROTECTED]) wrote:

 Good point, lack of javascript is a consideration.
 
 The request is for a form where the second half format is dependent on
 the first half. In other words, they make some choices on the top that
 determine what the form on the bottom will be. But the guy who wants
 this, wants it to be one screen.
 
 Marek Kilimajer wrote:
 Did you get a request for a two part form, or for a form on 2 pages? The
 problem I see is with browsers
 without javascript (either turned of or not implemented)
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php