Jump to content

Pass PHP array to javascript and then to window.open?


n3mesis125

Recommended Posts

Hi, is it possible to pass a php array to javascript so that it can then be passed via window.open?

 

IE:

 

$test = array(
    'name' => "cat",
    'day' => "2008-06-01");

 

The above would be the array, how could I some how serialize that and pass it through window.open in javascript or is it even possible?

 

Thanks,

n3m.

 

you could just pass the variables via the GET method and not have to wory about the js.

 

I had a case where I needed to populate data into a popup window.. that i used JS to create.

 

but then passed the variables through the URL and picked them up on the other side. with popup.php

 

use a for loop or like to ease the headache of all the array variables.

 

hope that helps.. :-\

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.