Passing arrays to a javascrpt

Javascript coding ..

Moderators: macek, egami, gesf

User avatar
New php-forum User
New php-forum User
Posts: 121
Joined: Sat Jan 03, 2004 7:06 pm
Location: New York, NY

Passing arrays to a javascrpt

Postby popeye » Fri Apr 15, 2005 8:51 pm

Based on which option selected in the first dropdown <select> menu, I need to change the option list of the second <select> dropdown menu.
I need this to be able to collect and/or change State and County information using <select> and dropdown menus.
Is it possible to pass back and forth a php created array to a javascript function used with onchange property of <select>?


User avatar
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Postby ruturajv » Sun Apr 17, 2005 7:42 pm

yes that is possible,
only thing is u need to populate javascript arrays for all the options.
then using javascript populate the select list based on the array[javascript] and your condition.

Return to “JavaScript”

Who is online

Users browsing this forum: No registered users and 1 guest