Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 30th, 2004, 11:54 AM   #1
dnathe4th
Programmer
 
Join Date: Oct 2004
Posts: 32
Rep Power: 0 dnathe4th is on a distinguished road
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?
__________________
&lt;CENTER&gt;<span style='font-size:17pt;line-height:100%'>My Homepage</span>&lt;/CENTER&gt;
dnathe4th is offline   Reply With Quote
Old Oct 31st, 2004, 12:02 AM   #2
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
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>
__________________

tempest is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:20 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC