CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 1999
    Location
    Florida
    Posts
    36

    Reference multi hidden fields

    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

  2. #2
    Join Date
    May 2001
    Location
    Russia
    Posts
    200

    Re: Reference multi hidden fields

    If you want add field in HTML you can set type this field as "hidden".
    Or I don't understand you?

    Andy Tower

  3. #3
    Join Date
    Oct 1999
    Location
    Florida
    Posts
    36

    Re: Reference multi hidden fields

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured