[Proto-Scripty] Re: grabbing form values from multiple pages.

2009-02-05 Thread Squared

Walter, I am using a testing server currently, and it is Apache. I
checked with our Internet Provider before I started with php and they
told me the site would be hosted on a Unix Server... that is all I
know for now. I can try to find more info if I need to.

Squared

On Feb 4, 4:28 pm, Walter Lee Davis wa...@wdstudio.com wrote:
 I deliberately made the server side a sketch. I use a framework here  
 that lets me write something that terse and get a result. If you would  
 let me know what server environment you are working in, I can  
 recommend some additional information.

 Walter

 On Feb 4, 2009, at 5:06 PM, Squared wrote:

  If you or anyone else
  can give me any more info on the server side it would be greatly
  appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: grabbing form values from multiple pages.

2009-02-04 Thread david

Hi sqaured,

It seems, that you only transmit the value of the previous form to the
DB, and for the third form to be generated, you need to pass first AND
second one !
So this could be done in a couple of lines (I think).

Give us your code, or a sample, we will surelly help.

--
david

On 2 fév, 19:00, Squared jpr...@hancousa.com wrote:
 The abbreviated question:
 How do I pass the value of a list item on page 1 AND page 2 to a third
 page so I can use the values in php and mySQL?

 The extended version:
 I have three form lists with select values taken from a mySQL
 database. The second list is generated based on the selection from the
 first, and the third is generated based on the selection from the
 first and second. Finally, a table is generated based on all values
 selected in all three. I have this working with php, but the page
 reloads after every list item is selected. I have done a lot of
 research and have almost gotten this to work without a reload using
 AJAX from Prototype, but I am running into a problem. The second list
 generates correctly, but the third does not. This is because my mySQL
 statement pulls the values from the first two lists. Since the page is
 not reloaded it only sees the value of the second list and not the
 first. How can I pass the value from the first list and the second
 list (which are on two separate pages) to the third list?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: grabbing form values from multiple pages.

2009-02-04 Thread Richard Quadling

2009/2/4 david david.brill...@gmail.com:

 Hi sqaured,

 It seems, that you only transmit the value of the previous form to the
 DB, and for the third form to be generated, you need to pass first AND
 second one !
 So this could be done in a couple of lines (I think).

 Give us your code, or a sample, we will surelly help.

 --
 david

 On 2 fév, 19:00, Squared jpr...@hancousa.com wrote:
 The abbreviated question:
 How do I pass the value of a list item on page 1 AND page 2 to a third
 page so I can use the values in php and mySQL?

 The extended version:
 I have three form lists with select values taken from a mySQL
 database. The second list is generated based on the selection from the
 first, and the third is generated based on the selection from the
 first and second. Finally, a table is generated based on all values
 selected in all three. I have this working with php, but the page
 reloads after every list item is selected. I have done a lot of
 research and have almost gotten this to work without a reload using
 AJAX from Prototype, but I am running into a problem. The second list
 generates correctly, but the third does not. This is because my mySQL
 statement pulls the values from the first two lists. Since the page is
 not reloaded it only sees the value of the second list and not the
 first. How can I pass the value from the first list and the second
 list (which are on two separate pages) to the third list?
 


What is probably going to be of most use is to understand sessions.

Essentially a session (accessed in PHP using the super global
$_SESSION) allows you to remember data between requests.

A session is unique to a connection (a user normally). If they haven't
got a session ID, they they will be given a new one.

Read about sessions at http://docs.php.net/sessions and
http://docs.php.net/manual/en/book.session.php

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: grabbing form values from multiple pages.

2009-02-04 Thread Richard Quadling

2009/2/4 Richard Quadling rquadl...@googlemail.com:
 2009/2/4 david david.brill...@gmail.com:

 Hi sqaured,

 It seems, that you only transmit the value of the previous form to the
 DB, and for the third form to be generated, you need to pass first AND
 second one !
 So this could be done in a couple of lines (I think).

 Give us your code, or a sample, we will surelly help.

 --
 david

 On 2 fév, 19:00, Squared jpr...@hancousa.com wrote:
 The abbreviated question:
 How do I pass the value of a list item on page 1 AND page 2 to a third
 page so I can use the values in php and mySQL?

 The extended version:
 I have three form lists with select values taken from a mySQL
 database. The second list is generated based on the selection from the
 first, and the third is generated based on the selection from the
 first and second. Finally, a table is generated based on all values
 selected in all three. I have this working with php, but the page
 reloads after every list item is selected. I have done a lot of
 research and have almost gotten this to work without a reload using
 AJAX from Prototype, but I am running into a problem. The second list
 generates correctly, but the third does not. This is because my mySQL
 statement pulls the values from the first two lists. Since the page is
 not reloaded it only sees the value of the second list and not the
 first. How can I pass the value from the first list and the second
 list (which are on two separate pages) to the third list?
 


 What is probably going to be of most use is to understand sessions.

 Essentially a session (accessed in PHP using the super global
 $_SESSION) allows you to remember data between requests.

 A session is unique to a connection (a user normally). If they haven't
 got a session ID, they they will be given a new one.

 Read about sessions at http://docs.php.net/sessions and
 http://docs.php.net/manual/en/book.session.php

 --
 -
 Richard Quadling
 Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
 Standing on the shoulders of some very clever giants!


By using a session, you don't need to store data in the DB until the
final request. Allowing the user to spend as long as they want
travelling between the different pages until they are ready.

Ok, for me, I log my sessions in a DB, but that's another story.



-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: grabbing form values from multiple pages.

2009-02-04 Thread Kevin Smith
Seeing as your using AJAX, why even bother with more than one page. You 
can do everything on one page.

Richard Quadling wrote:
 2009/2/4 Richard Quadling rquadl...@googlemail.com:
   
 2009/2/4 david david.brill...@gmail.com:
 
 Hi sqaured,

 It seems, that you only transmit the value of the previous form to the
 DB, and for the third form to be generated, you need to pass first AND
 second one !
 So this could be done in a couple of lines (I think).

 Give us your code, or a sample, we will surelly help.

 --
 david

 On 2 fév, 19:00, Squared jpr...@hancousa.com wrote:
   
 The abbreviated question:
 How do I pass the value of a list item on page 1 AND page 2 to a third
 page so I can use the values in php and mySQL?

 The extended version:
 I have three form lists with select values taken from a mySQL
 database. The second list is generated based on the selection from the
 first, and the third is generated based on the selection from the
 first and second. Finally, a table is generated based on all values
 selected in all three. I have this working with php, but the page
 reloads after every list item is selected. I have done a lot of
 research and have almost gotten this to work without a reload using
 AJAX from Prototype, but I am running into a problem. The second list
 generates correctly, but the third does not. This is because my mySQL
 statement pulls the values from the first two lists. Since the page is
 not reloaded it only sees the value of the second list and not the
 first. How can I pass the value from the first list and the second
 list (which are on two separate pages) to the third list?
 
 What is probably going to be of most use is to understand sessions.

 Essentially a session (accessed in PHP using the super global
 $_SESSION) allows you to remember data between requests.

 A session is unique to a connection (a user normally). If they haven't
 got a session ID, they they will be given a new one.

 Read about sessions at http://docs.php.net/sessions and
 http://docs.php.net/manual/en/book.session.php

 --
 -
 Richard Quadling
 Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
 Standing on the shoulders of some very clever giants!

 

 By using a session, you don't need to store data in the DB until the
 final request. Allowing the user to spend as long as they want
 travelling between the different pages until they are ready.

 Ok, for me, I log my sessions in a DB, but that's another story.



   

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: grabbing form values from multiple pages.

2009-02-04 Thread Walter Lee Davis

Sorry, just tried this and realized that it won't work as written  
(getInputs only finds input tags, as you'd expect, not selects). Try  
this:

var element=$$('#your_form select').find(function(elm){

Walter

On Feb 4, 2009, at 9:23 AM, Walter Lee Davis wrote:

   var element = $('your_form).getInputs('select').find(function(elm){


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: grabbing form values from multiple pages.

2009-02-04 Thread Squared

Walter,
I could not get this to work, but, to be honest; I could have
something else wrong, because I am not certain how this new approach
is working exactly. (I am new to prototype  AJAX). I don’t quite
understand, or I am not following the logic.. Are we still using
multiple pages?  Is there even a way to dumb this down a bit for me or
should I just concede that this is over my head??? I would really like
to figure this out if possible, but I don’t want someone to write
everything for me either.


On Feb 4, 10:20 am, Walter Lee Davis wa...@wdstudio.com wrote:
 Sorry, just tried this and realized that it won't work as written  
 (getInputs only finds input tags, as you'd expect, not selects). Try  
 this:

 var element=$$('#your_form select').find(function(elm){

 Walter

 On Feb 4, 2009, at 9:23 AM, Walter Lee Davis wrote:

     var element = $('your_form).getInputs('select').find(function(elm){
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: grabbing form values from multiple pages.

2009-02-04 Thread Walter Lee Davis

Here's a local example that works in Firefox.

http://pastie.org/379612

Save those three files somewhere and try it out.

Here's an example that works with a server call (not tested):

http://pastie.org/379637

I don't believe this will work in IE, you can't update the inner bits  
of a select and have it work like a form element afterward. For that,  
you will need to use the

new Option(text,value)

syntax inside a loop.

Walter


On Feb 4, 2009, at 12:05 PM, Squared wrote:

 Walter,
 I could not get this to work, but, to be honest; I could have
 something else wrong, because I am not certain how this new approach
 is working exactly. (I am new to prototype  AJAX). I don’t quite
 understand, or I am not following the logic.. Are we still using
 multiple pages?  Is there even a way to dumb this down a bit for me or
 should I just concede that this is over my head??? I would really like
 to figure this out if possible, but I don’t want someone to write
 everything for me either.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: grabbing form values from multiple pages.

2009-02-04 Thread Walter Lee Davis

I deliberately made the server side a sketch. I use a framework here  
that lets me write something that terse and get a result. If you would  
let me know what server environment you are working in, I can  
recommend some additional information.

Walter

On Feb 4, 2009, at 5:06 PM, Squared wrote:

 If you or anyone else
 can give me any more info on the server side it would be greatly
 appreciated.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---