![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Oct 2004
Posts: 32
Rep Power: 0
![]() |
ok lets see if i can explain this well enough
cur_pil = document.first.person.value; cur_fld = document.first.field.value; hid_name = "$all[" + cur_pil + "][" + cur_fld + "]"; tablevals_answer = 'document.tablevals.' + hid_name + '.value;'; document.first.valuer.value = tablevals_answer; I have a whole bunch of hidden inputs, all named after the array they got their values from. The array is "$all[][]" (becuase they're getting values from a PHP script). I want "document.first.valuer.value" to be the value of one of those hidden inputs. But I don't know how to get it to access teh ".value" attribute of the hidden input i want. I know the piece of script i have there is wrong, but what do I do to fix it?
__________________
<CENTER><span style='font-size:17pt;line-height:100%'>My Homepage</span></CENTER> |
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
I need to see your HTML code to make this work... but you'll need to fill a JS array with the PHP array info..
<script type="text/javascript">
var all = array(
<?php
foreach($all as $col => $val)
echo " \"{$col}\" => \"{$val}\"\n";
?>
);
</script>
__________________
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|