is it possible to hide a textarea in html/asp?

Discussion in 'OT Technology' started by driftwell, Sep 22, 2004.

  1. driftwell

    driftwell New Member

    Joined:
    Oct 7, 2003
    Messages:
    220
    Likes Received:
    0
    i need to hide this:

    <textarea name="supraforums">Someone please help me</textarea>

    i need it to pass a variable in ASP but i don't want it to be displayed on the page

    any suggestions? I'm open to anything
     
  2. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    <input type="hidden" value="<textarea name='supraforums'>Someone please help me</textarea>" name="hiddenvar">
     
  3. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    that or couldn't you hide it behind a div also
     
  4. driftwell

    driftwell New Member

    Joined:
    Oct 7, 2003
    Messages:
    220
    Likes Received:
    0
    dang... i'm getting close... but i can't quite get it to work...


    here's the actual code i'm using and the results... remember... i'm using the page as a "view" page before i send the actual data to SQL server...

    <input type="hidden" value="<textarea name='newsBlurb'><%=newsBlurb%></textarea>" name="newsBlurb">

    what ends up happening is that it sends the entire textarea into the database from the variable 'newsBlurb'. So the end result is a textarea and not just the string.

    The problem i'm facing is that with a normal
    <input type=hidden name="newsblurb" value="newsBlurb">

    is that i can't use " in the textarea because anything past the " gets cutoff before it goes to the database.

    any suggestions?
     
  5. driftwell

    driftwell New Member

    Joined:
    Oct 7, 2003
    Messages:
    220
    Likes Received:
    0
    I found this... but i don't know what language it is or how to make it work in my situation.... this uses a checkbox to make it disappear.

    <HTML>
    <HEAD>
    <STYLE>
    .hideable { position: relative; visibility: visible; }
    </STYLE>
    <SCRIPT>
    function hideShowGods(hide) {
    //if (document.layers)
    document.godContainer.visibility = hide ? 'hide' : 'show';
    //else {
    var g = document.all ? document.all.godContainer :
    document.getElementById('godContainer');
    g.style.visibility = hide ? 'hidden' : 'visible';
    }
    }
    </SCRIPT>
    </HEAD>
    <BODY>
    <TABLE>
    <TR>
    <TD VALIGN="top">
    <FORM NAME="form0">
    Atheist?
    <INPUT TYPE="checkbox" NAME="atheist"
    ONCLICK="hideShowGods(this.checked);"
    >
    </FORM>
    </TD>
    <TD>
    <SPAN ID="godContainer" CLASS="hideable">
    <FORM NAME="form1">
    <textarea name="test">Testing 123</textarea>
    </FORM>
    </SPAN>
    </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
     
  6. driftwell

    driftwell New Member

    Joined:
    Oct 7, 2003
    Messages:
    220
    Likes Received:
    0
    hell yea hsmitch.... you DA MAN!

    that works... thanks!
     

Share This Page