Hidden Fields

Last Updated: 9/16/2008



Sections above here:
Home  »  Development  »  Javascript

Sections below here:

    Topics in this section:
    Overview
    Areas of Implementation
    Using Script Events
    Writing JavaScript Events
    More Script Events
    Javascript Functions
    Injecting JavaScript
    Hidden Fields
    Down Loading a File
    JavaScript Solutions

    Search Documentation:

    If you need to access some extra data from your JavaScript routines, and if this extra data should not be visible in the web browser, then Hidden Fields may be very useful. Hidden fields are regular input fields of HTML forms, they just have the hidden attribute set, which makes them invisible in the web browser. Their values can be accessed from JavaScript as any other input element. IntraWeb makes it very easy to inject Hidden Fields from the server side. Just fill the HiddenFields property of your IWForm. This property follows the name=value paradigm.

    Example:
    Add this to the HiddenFields property of an IWForm (without quotes):

    "myField=HelloWorld"

    This will be rendered by IntraWeb as follows:

    <input type="HIDDEN" name="myField" id="HIDDEN_myField" size="-1" value="HelloWorld">
    The right side (the value) is always treated as string, IW will render the quotes automatically. You may add as many Hidden Fields as you want.

    To retrieve the value of "myField"  via JavaScript use the following approach:
    var s = document.getElementById('HIDDEN_myField');



    (C) 2002-2009 - Atozed Software Ltd.