Results 1 to 2 of 2

Thread: passing hidden variables in javascript function to another page

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2001
    Posts
    37

    Question passing hidden variables in javascript function to another page

    Is there a way for me to pass the value of a hidden variable to another page from within a javascipt function? The value of this hidden variable is dependent on the counter inside my javascript function.

    function cntCheck(frmView){
    var num=0;
    for(var i=0; i< document.frmView.length; i++) {
    fldObj = document.frmView.elements[i];
    if(fldObj.checked) {
    num++;
    }
    }
    document.frmView.hiddenvariablename.value = num;
    }

    I tried using the following statement before closing the function above:

    document.frmname.hiddenvariablename.value = something

    However, I can't get it to work.

    Any help will be greatly appreciated! Thanks in advance!

  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    Smile hi

    Code:
    document.frmname.hiddenvariablename.value = something
    This shd assign the hidden variable the value in something(whatever)

    now submit the form to see the value of the hidden field on the next page.

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