how insert an array double in hidden field and use in javascript
- From: artev <mailnotspammm@xxxxxxxxxxx>
- Date: Wed, 30 Aug 2006 12:47:54 +0200
this work (I see 10000)
code php
$fruits=10000;
echo <input type="hidden" name="x1[]" id="x1[]" value="$fruits" >;
code javascript
var test3 = document.formID.elements['x1[]'];
alert(test3[0].value);
---------------------------------------------------
now the code bottom, not work; I see in the alert popup the word: array;
I want to use the array of array in the javascript's code
using the hidden's variable
code php
foreach ($arrayquery as $a)
{
$fruits = array($a['type'] => array(1 => 'color', 2 => 'pos'));
echo <input type="hidden" name="x1[]" id="x1[]" value="$fruits" >;
}
code javascript
var test3 = document.formID.elements['x1[]'];
alert(test3[0].value);
any idea?
.
- Follow-Ups:
- Re: how insert an array double in hidden field and use in javascript
- From: Dennis de Wit
- Re: how insert an array double in hidden field and use in javascript
- Prev by Date: Re: why does this not work?
- Next by Date: Re: how insert an array double in hidden field and use in javascript
- Previous by thread: Making thumbnails from images
- Next by thread: Re: how insert an array double in hidden field and use in javascript
- Index(es):
Relevant Pages
|