Click to See Complete Forum and Search --> : Reference multi hidden fields
whg
August 19th, 2001, 07:09 PM
I'm building a return HTML page, generated from within my Vb app. I want to create say a random number if fields. For reference purpose I have a Form name of 'test'. I am creating some hidden fields called 'rec_#' rec_1,rec_2 and so on. Also on this page I'm generating the JavaScript with the HTML, I want to reference these hidden fields from within the JavaScript section of my code. How do I reference the field names, by using a for statment? I can do it in vb but not in JavaScript.
whg
Tower
August 19th, 2001, 10:33 PM
If you want add field in HTML you can set type this field as "hidden".
Or I don't understand you?
whg
August 20th, 2001, 05:58 PM
Yes thanks, My problem was being confused by the way I reference objects in vb and not understanding the JavaScript method. I was trying to reference hidden fields with names like rec_1, rec_2 and so on, by using the 'document.forms.test.rec_ + I.value' instead of trying the 'document.forms.test["rec_" + I].value' It works now. I just couldnt get the right syntax for use in JavaScript.
Thanks
whg
whg
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.