-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
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
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
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
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.
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
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[]
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
, 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
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
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
] 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
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
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:
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!
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
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
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
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
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
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,
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
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
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
--- 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
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'];
--- 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
--- 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,
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
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
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
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
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
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
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
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
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:
---
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:
---
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
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
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.
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,
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.
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
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.
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
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";
}
}
-
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
...
}
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
49 matches
Mail list logo