how to pass the javascript array value to for the php variable.
how to pass the javascript array value to for the php variable.
am 11.09.2007 07:30:46 von irc
hey, i am pretty new on javascript as well as PHP,
Hey, anyone can you help me, how to pass the javascript array value to
php page.........
i want to retrieve the values which are arrayed on "selectedValues"
from next page for php variable
this is my javascript code saved on "sendValue.js" file,
i need to retrieve the array "selectedValues" values from next php
pages. so, how i can do this..........
i am previously doing through url to pass single javascript value and
do $_REQUEST from next php page. But here i need to send/retrieve the
array not the single value.
so which is the better way for this.............
Thank You
Re: how to pass the javascript array value to for the php variable.
am 11.09.2007 10:31:57 von Cliff Smith
"IRC" wrote in message
news:1189488646.751184.158810@19g2000hsx.googlegroups.com...
> hey, i am pretty new on javascript as well as PHP,
>
> Hey, anyone can you help me, how to pass the javascript array value to
> php page.........
> i want to retrieve the values which are arrayed on "selectedValues"
> from next page for php variable
>
> this is my javascript code saved on "sendValue.js" file,
>
>
> i need to retrieve the array "selectedValues" values from next php
> pages. so, how i can do this..........
> i am previously doing through url to pass single javascript value and
> do $_REQUEST from next php page. But here i need to send/retrieve the
> array not the single value.
> so which is the better way for this.............
>
> Thank You
you can assign the array to a hidden input variable in an html form and
either use a submit button or JavaScript to fire the submit event and pass
it using a post rather than a get.
Collect the array from $_REQUEST .
Cheers
Ron
Re: how to pass the javascript array value to for the php variable.
am 11.09.2007 12:36:49 von irc
On Sep 11, 1:31 pm, "Ron Barnett" wrote:
> "IRC" wrote in message
>
> news:1189488646.751184.158810@19g2000hsx.googlegroups.com...
>
>
>
> > hey, i am pretty new on javascript as well as PHP,
>
> > Hey, anyone can you help me, how to pass the javascript array value to
> > php page.........
> > i want to retrieve the values which are arrayed on "selectedValues"
> > from next page for php variable
>
> > this is my javascript code saved on "sendValue.js" file,
> >
>
> > i need to retrieve the array "selectedValues" values from next php
> > pages. so, how i can do this..........
> > i am previously doing through url to pass single javascript value and
> > do $_REQUEST from next php page. But here i need to send/retrieve the
> > array not the single value.
> > so which is the better way for this.............
>
> > Thank You
>
> you can assign the array to a hidden input variable in an html form and
> either use a submit button or JavaScript to fire the submit event and pass
> it using a post rather than a get.
> Collect the array from $_REQUEST .
>
> Cheers
>
> Ron
Actually its now working on that.............coz, the problem is that,
i have two selection boxes, S1, S2, at S1 the options are initially
available, i used javascript and and select the option from S1 to S2
using selection boxes "name" value. if insert the hidden tag inside
the S2-selection box, it will append in selection tag also, so i can't
do that., and i need to retrieve that value from S2-selection
boxs......but i m not getting a way out. if i make S1 name as array
"name[]" the javascript code will not work for exchanging options
between S1 and S2. i tried but i am not getting
Re: how to pass the javascript array value to for the php variable.
am 11.09.2007 13:12:58 von Jerry Stuckle
Ron Barnett wrote:
> "IRC" wrote in message
> news:1189488646.751184.158810@19g2000hsx.googlegroups.com...
>> hey, i am pretty new on javascript as well as PHP,
>>
>> Hey, anyone can you help me, how to pass the javascript array value to
>> php page.........
>> i want to retrieve the values which are arrayed on "selectedValues"
>> from next page for php variable
>>
>> this is my javascript code saved on "sendValue.js" file,
>>
>>
>> i need to retrieve the array "selectedValues" values from next php
>> pages. so, how i can do this..........
>> i am previously doing through url to pass single javascript value and
>> do $_REQUEST from next php page. But here i need to send/retrieve the
>> array not the single value.
>> so which is the better way for this.............
>>
>> Thank You
>
> you can assign the array to a hidden input variable in an html form and
> either use a submit button or JavaScript to fire the submit event and pass
> it using a post rather than a get.
> Collect the array from $_REQUEST .
>
> Cheers
>
> Ron
>
>
Yes, except you don't want to use $_REQUEST. Use $_POST or $_GET, as
applicable, instead.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: how to pass the javascript array value to for the php variable.
am 11.09.2007 13:17:08 von Jerry Stuckle
IRC wrote:
> On Sep 11, 1:31 pm, "Ron Barnett" wrote:
>> "IRC" wrote in message
>>
>> news:1189488646.751184.158810@19g2000hsx.googlegroups.com...
>>
>>
>>
>>> hey, i am pretty new on javascript as well as PHP,
>>> Hey, anyone can you help me, how to pass the javascript array value to
>>> php page.........
>>> i want to retrieve the values which are arrayed on "selectedValues"
>>> from next page for php variable
>>> this is my javascript code saved on "sendValue.js" file,
>>>
>>> i need to retrieve the array "selectedValues" values from next php
>>> pages. so, how i can do this..........
>>> i am previously doing through url to pass single javascript value and
>>> do $_REQUEST from next php page. But here i need to send/retrieve the
>>> array not the single value.
>>> so which is the better way for this.............
>>> Thank You
>> you can assign the array to a hidden input variable in an html form and
>> either use a submit button or JavaScript to fire the submit event and pass
>> it using a post rather than a get.
>> Collect the array from $_REQUEST .
>>
>> Cheers
>>
>> Ron
>
> Actually its now working on that.............coz, the problem is that,
> i have two selection boxes, S1, S2, at S1 the options are initially
> available, i used javascript and and select the option from S1 to S2
> using selection boxes "name" value. if insert the hidden tag inside
> the S2-selection box, it will append in selection tag also, so i can't
> do that., and i need to retrieve that value from S2-selection
> boxs......but i m not getting a way out. if i make S1 name as array
> "name[]" the javascript code will not work for exchanging options
> between S1 and S2. i tried but i am not getting
>
The hidden value doesn't go inside the s2 selection box, it's an extra
value, i.e.
Then use your js to set the value in it. Or, if you need an unknown
number of values, you can use js to create these on the fly, with the
name "myvalue[]".
If you're still having problems, can you post more of what you're trying
to do?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================