Results 1 to 2 of 2

Thread: Need script for seperating my form in stages

  1. #1
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Need script for seperating my form in stages

    Hi guys,

    First Question
    I'm new here. I'm searching for a script that seperates my form in steps like (step1, step 2 etc) but step one needs to be fully validated before the user is able to continue.

    Second Question
    I found this script online. It shows my div by default but when the checkbox is clicked it hides the content. I'm trying to get it to do the opposite. You need to check it to show the div

    <script type="text/javascript">

    if( document.getElementById ) {
    getElemById = function( id ) {
    return document.getElementById( id );
    }
    } else if( document.all ) {
    getElemById = function( id ) {
    return document.all[ id ];
    }
    } else if( document.layers ) {
    getElemById = function( id ) {
    return document.layers[ id ];
    }
    }

    function showhide( el, id) {
    if ( el && el.style ) {
    getElemById( id ).style.display = (el.checked)? 'none' : '';
    }
    }

    </script>


    <input
    name="yesno" type="checkbox"
    onclick="showhide(this, 'dn');" />
    Small Room


    <div id="dn" class="noshow">
    <input name="textfield32" type="text" value="0" size="3" maxlength="2" />
    Rooms that need furniture moved?<br />
    <input name="textfield32" type="text" value="0" size="3" maxlength="2" />
    Rooms that need an open area cleaned?<br />
    <input name="textfield32" type="text" value="0" size="3" maxlength="2" />
    Rooms that need heavy duty cleaning? <br />
    </div>

    Thx in advance

  2. #2
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Don't bother, I already fixed it :P

Bookmarks

Posting Permissions

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