RE: [PHP] Passing HTML array index to JS?

2009-12-08 Thread Ford, Mike
-Original Message- From: Skip Evans [mailto:s...@bigskypenguin.com] Sent: 07 December 2009 23:03 To: php-general@lists.php.net Subject: [PHP] Passing HTML array index to JS? Hey all, I have an HTML field like this input type=text name=qty[] value=!!quantity!! size=4 style

RE: [PHP] Passing HTML array index to JS?

2009-12-08 Thread Ashley Sheridan
On Tue, 2009-12-08 at 12:34 +, Ford, Mike wrote: -Original Message- From: Skip Evans [mailto:s...@bigskypenguin.com] Sent: 07 December 2009 23:03 To: php-general@lists.php.net Subject: [PHP] Passing HTML array index to JS? Hey all, I have an HTML field like

Re: [PHP] Passing HTML array index to JS?

2009-12-08 Thread tedd
At 9:07 PM -0600 12/7/09, Philip Thompson wrote: -snip- Good stuff. Thanks, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Passing HTML array index to JS?

2009-12-08 Thread Philip Thompson
On Dec 8, 2009, at 11:10 AM, tedd wrote: At 9:07 PM -0600 12/7/09, Philip Thompson wrote: -snip- Good stuff. Thanks, tedd You say so much with so little... ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Passing HTML array index to JS?

2009-12-07 Thread Skip Evans
Hey all, I have an HTML field like this input type=text name=qty[] value=!!quantity!! size=4 style=text-align: right; onblur=calculateBidUnit(); ... and what I need to do is pass to the calculateBidUnit function the value of quantity, do a calculation on it and plug into this field.

Re: [PHP] Passing HTML array index to JS?

2009-12-07 Thread Philip Thompson
On Dec 7, 2009, at 5:02 PM, Skip Evans wrote: Hey all, I have an HTML field like this input type=text name=qty[] value=!!quantity!! size=4 style=text-align: right; onblur=calculateBidUnit(); ... and what I need to do is pass to the calculateBidUnit function the value of quantity, do

Re: [PHP] Passing HTML array index to JS?

2009-12-07 Thread Skip Evans
Hey Philip, But will that ID value identify the right member of each array? I thought about that but just assumed that it would not. Skip Philip Thompson wrote: On Dec 7, 2009, at 5:02 PM, Skip Evans wrote: Hey all, I have an HTML field like this input type=text name=qty[]

Re: [PHP] Passing HTML array index to JS?

2009-12-07 Thread Philip Thompson
On Dec 7, 2009, at 6:32 PM, Skip Evans wrote: Hey Philip, But will that ID value identify the right member of each array? I thought about that but just assumed that it would not. Skip Philip Thompson wrote: On Dec 7, 2009, at 5:02 PM, Skip Evans wrote: Hey all, I have an HTML

[PHP] Passing an array from PHP to Javascript

2008-09-16 Thread dele454
, iterating over the array variable etc. Pls help!! - dee -- View this message in context: http://www.nabble.com/Passing-an-array-from-PHP-to-Javascript-tp19513035p19513035.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net

Re: [PHP] Passing an array from PHP to Javascript

2008-09-16 Thread Yeti
I would use an unserializer. http://code.activestate.com/recipes/414334/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Passing an array from PHP to Javascript

2008-09-16 Thread Carlos Medina
Yeti schrieb: I would use an unserializer. http://code.activestate.com/recipes/414334/ Hi, why not JSON? Regards Carlos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Passing an array as a hidden variable

2007-05-13 Thread WeberSites LTD
] Passing an array as a hidden variable On Fri, May 11, 2007 11:53 pm, Todd Cary wrote: When I use the following syntax, the 2 dimensional array loses it's contents. Can an array be passed this way? ? echo 'input type=hidden name=attend_ary_save value=' . $attend_ary_save .''; ? No. You'll

Re: [PHP] Passing an array as a hidden variable

2007-05-12 Thread Richard Lynch
On Fri, May 11, 2007 11:53 pm, Todd Cary wrote: When I use the following syntax, the 2 dimensional array loses it's contents. Can an array be passed this way? ? echo 'input type=hidden name=attend_ary_save value=' . $attend_ary_save .''; ? No. You'll just get Array back. You can do a

[PHP] Passing an array as a hidden variable

2007-05-11 Thread Todd Cary
When I use the following syntax, the 2 dimensional array loses it's contents. Can an array be passed this way? ? echo 'input type=hidden name=attend_ary_save value=' . $attend_ary_save .''; ? Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Passing an array as a hidden variable

2007-05-11 Thread Robert Cummings
On Fri, 2007-05-11 at 21:53 -0700, Todd Cary wrote: When I use the following syntax, the 2 dimensional array loses it's contents. Can an array be passed this way? ? echo 'input type=hidden name=attend_ary_save value=' . $attend_ary_save .''; ? No! RTFM!

[PHP] Passing the Array as Parameter to either the function or object/class???

2004-10-21 Thread Scott Fletcher
Hi! I wanted to know is can it be done by passing the array as a parameter to the function? I also wanted to know is is it possible to pass around the array in the object-orientated feature like object/class stuffs? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Passing the Array as Parameter to either the function or object/class???

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 09:57:07 -0400, Scott Fletcher [EMAIL PROTECTED] wrote: I wanted to know is can it be done by passing the array as a parameter to the function? Yes. By reference and by value. I also wanted to know is is it possible to pass around the array in the

Re: [PHP] Passing the Array as Parameter to either the function or object/class???

2004-10-21 Thread Robby Russell
On Thu, 2004-10-21 at 09:57 -0400, Scott Fletcher wrote: Hi! I wanted to know is can it be done by passing the array as a parameter to the function? I also wanted to know is is it possible to pass around the array in the object-orientated feature like object/class stuffs? yes

[PHP] passing an array via GET and a hidden form element

2003-11-02 Thread Robb Kerr
I'm trying to pass a variable from a search page to the results page via GET. The $MANUFACTURERS variable contains an array and is obtained from the URL. I've tried the following to no avail... input name=manufacturer[] type=hidden multiple id=manufacturer[] value=?php $manufacturer ? input

Re: [PHP] passing an array via GET and a hidden form element

2003-11-02 Thread John W. Holmes
Robb Kerr wrote: I'm trying to pass a variable from a search page to the results page via GET. The $MANUFACTURERS variable contains an array and is obtained from the URL. I've tried the following to no avail... input name=manufacturer[] type=hidden multiple id=manufacturer[] value=?php

[PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread aka MacGuru
Hi, I am need to pass serialized assotiative array via form hidden field (not GET or POST). In order to do it, I did the following: urlencode(serialize($my_array)). However, after retrieving data from hidden field and unserialize I've got junk. Someone can explain me what I did wrong? Also,

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread Mirek Novak
Andrei Verovski (aka MacGuru) napsal(a): Hi, I am need to pass serialized assotiative array via form hidden field (not GET or POST). In order to do it, I did the following: urlencode(serialize($my_array)). However, after retrieving data from hidden field and unserialize I've got junk. Someone

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread Jacob Vennervald Madsen
Just tried it out and you should use htmlspecialchars() instead of urlencode(). When you put it in a hidden field the browser is responsable for urlencoding the data. Jacob On Mon, 2003-07-21 at 09:24, Andrei Verovski wrote: Hi, I am need to pass serialized assotiative array via form hidden

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread John Nichel
Andrei Verovski (aka MacGuru) wrote: Hi, I am need to pass serialized assotiative array via form hidden field (not GET or POST). In order to do it, I did the following: Uis there a third form method that I'm not aware of? urlencode(serialize($my_array)). However, after retrieving data

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread Chris Shiflett
--- Andrei Verovski [EMAIL PROTECTED] wrote: I am need to pass serialized assotiative array via form hidden field (not GET or POST). This is impossible. A hidden form field is simply a form field that is not displayed to the user. Form actions must be GET or POST. In order to do it, I did the

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread John Manko
Just a small point, you can have both GET and POST. -- search.html - form method=POST action='page.php?action=searchsid=09h34fnn3f0qn34f8n38fn34htq83th83qh' input name=search type=text input type=submit value='Find It!' /form - page.php $sid = $_GET['sid'];

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread CPT John W. Holmes
--- Andrei Verovski [EMAIL PROTECTED] wrote: I am need to pass serialized assotiative array via form hidden field (not GET or POST). This is impossible. A hidden form field is simply a form field that is not displayed to the user. Form actions must be GET or POST. In order to do it, I

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread Chris Shiflett
--- John Manko [EMAIL PROTECTED] wrote: Just a small point, you can have both GET and POST. -- search.html - form method=POST action='page.php?... Notice your form method is POST, not both GET and POST. The HTTP request sent after a user submits this form will be a POST request,

Re: [PHP] passing an array in a form element

2002-08-12 Thread David T-G
Mark, et al -- ...and then Mark Charette said... % % I use % % $data=base64_encode(serialize($array_name)); % % to send and % % $array_name=unserialize(base64_decode($data)); % % to receive. Aha! Yes, that works nicely; thanks. Now to go and see how they work to see if I need the base64

[PHP] passing an array in a link

2002-08-11 Thread David T-G
Hi, all -- I collect field keys in an array that looks like $keylist = array('comment','job','spaced out key name','foo',...) ; and would like to pass the array to myself in a call like print a href=\/myscript.php?keylist=$keylist\link/a ; but when it's actually run it of course says

Re: [PHP] passing an array in a link

2002-08-11 Thread Bas Jobsen
print a href=\/myscript.php?keylist=.str_replace( ,+,implode(+,$keylist)).\link/a ; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] passing an array in a link

2002-08-11 Thread David T-G
Bas, et al -- ...and then Bas Jobsen said... % % print a href=\/myscript.php?keylist=.str_replace( % ,+,implode(+,$keylist)).\link/a ; I tried this and my link the looks like Click a href=testme.php?a+b b b+chere/a to go round againbr (that is, not only have I not taken care of the

Re: [PHP] passing an array in a form element

2002-08-11 Thread David T-G
Hi again -- ...and then David T-G said... % ... % How can I pass myself an array -- and recognize it on the receiving end? I had been spending all of my time digging into htmlentities() and the like when, in fact, all I had to do was a simple preg_replace on each component :-) Now how can I

Re: [PHP] passing an array in a link

2002-08-11 Thread B.C. Lance
from my experience, you don't really have to worry much on the space issue. is the delimiter to determine that the string terminates and a new argument begins next. and very often, the browser will do an auto conversion from space to %20 when you click on the link. David T-G wrote: snip

[PHP] Passing an array on

2002-05-22 Thread John Fishworld
Whats the best way to pass on array on in a link ? eg offset is where we are (what page) but state is an array, with a variable size href=joblist.php?offset=$offsetstate=$state thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Passing an array on

2002-05-22 Thread Jim lucas
Fishworld [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 22, 2002 9:05 AM Subject: [PHP] Passing an array on Whats the best way to pass on array on in a link ? eg offset is where we are (what page) but state is an array, with a variable size href=joblist.php?offset=$offsetstate

[PHP] Passing an array as an argument

2002-03-14 Thread Mauricio Cuenca
Hello, I've built a function that receives an array as an argument to create an HTML drop-down list, but when I try to print the list this is all I got: select name=my_list option value=Array[0]Array[1] option value=Array[0]Array[1] /select This is my code: ---

[PHP] Passing an array as an argument

2002-03-14 Thread Mauricio Cuenca
Hello, I've built a function that receives an array as an argument to create an HTML drop-down list, but when I try to print the list this is all I got: select name=my_list option value=Array[0]Array[1] option value=Array[0]Array[1] /select This is my code: ---

Re: [PHP] Passing an array as an argument

2002-03-14 Thread Rasmus Lerdorf
You can't put $a[][] inside a qouted string like that. Either use ${a[][]} or put it outside like this: Print( option value=\.$aOptions[1][0].\.$aOptions[1][1].\n); -Rasmus On Thu, 14 Mar 2002, Mauricio Cuenca wrote: Hello, I've built a function that receives an array as an argument

RE: [PHP] Passing an array to a C program from a php script??

2001-07-02 Thread Nicolas Guilhot
and the result of the program echo Return value : $num_return\n; echo Result :\n; print_r($ary_result); -Message d'origine- De : Nicolas Guilhot [mailto:[EMAIL PROTECTED]] Envoye : lundi 25 juin 2001 12:59 A : [EMAIL PROTECTED] Objet : [PHP] Passing an array to a C program from a php

Re: [PHP] Passing an array to a C program from a php script??

2001-06-28 Thread Richard Lynch
I have a big array (nearly 1000 lines) that I would like to pass to a C program. I don't want to create a temporary file to pass my array (If possible ?!?), and I don't think the command line will fit my needs. Is there a way to execute a program with a php string as the standard input.

RE: [PHP] Passing an array to a C program from a php script??

2001-06-26 Thread Jason Lustig
Why not make a separate .txt file which is read by the PHP script to make its variable with file(), and have the C file read it with ifstream to make up its variable? --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

RE: [PHP] Passing an array to a C program from a php script??

2001-06-26 Thread Jason Murray
I have a big array (nearly 1000 lines) that I would like to pass to a C program. I don't want to create a temporary file to pass my array (If possible ?!?), and I don't think the command line will fit my needs. Is there a way to execute a program with a php string as the standard input.

Re: [PHP] Passing an array to a C program from a php script??

2001-06-26 Thread mailing_list
Hi all, I have a big array (nearly 1000 lines) that I would like to pass to a C program. I don't want to create a temporary file to pass my array (If possible ?!?), and I don't think the command line will fit my needs. Is there a way to execute a program with a php string as the standard

[PHP] Passing an array to a C program from a php script??

2001-06-25 Thread Nicolas Guilhot
Hi all, I have a big array (nearly 1000 lines) that I would like to pass to a C program. I don't want to create a temporary file to pass my array (If possible ?!?), and I don't think the command line will fit my needs. Is there a way to execute a program with a php string as the standard input.

Re: [PHP] Passing an array as an argument.

2001-02-07 Thread Christian Reiniger
On Tuesday 06 February 2001 18:18, April wrote: How do you pass an array as an argument to a function? Just as any other variable. Read on... function process_members($asker_rank, $email) { global $database_mysql; mysql_select_db($database_mysql); while (list ($key, $val) = each

[PHP] Passing an array as an argument.

2001-02-06 Thread April
How do you pass an array as an argument to a function? My code (or at least the important parts): function process_members($asker_rank, $email) { global $database_mysql; mysql_select_db($database_mysql); while (list ($key, $val) = each ($email)) { echo "$key = $valbr"; } }

Re: [PHP] Passing an array as an argument.

2001-02-06 Thread Web Admin
- From: April To: PHP General Sent: Tuesday, February 06, 2001 8:48 PM Subject: [PHP] Passing an array as an argument. How do you pass an array as an argument to a function? My code (or at least the important parts): function process_members($asker_rank, $email) { global

RE: [PHP] Passing an array as an argument.

2001-02-06 Thread Ryan Gaul
... } allows you to have a default value for $email. So you can either pass it or not. -Original Message- From: April [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 06, 2001 12:18 PM To: PHP General Subject: [PHP] Passing an array as an argument. How do you pass an