Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: textbox

  1. #1
    Regular Coder
    Join Date
    Nov 2006
    Posts
    601
    Thanks
    1
    Thanked 2 Times in 2 Posts

    textbox

    something is wrong with my textbox as it grabs all the data below it :S

    Code:
        <td><div align="center">
          <textarea class="inputshout"  id="message" name="message" rows="7" type="text" cols="100" value="Enter message here ..." maxlength="<?php $messagelength;?>" onfocus="this.value = ( this.value == this.defaultValue ) ? '' : this.value;return true;" />
        </div></td>

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    It's because you closed your textarea in a wrong way
    Code:
    <textarea></textarea>
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • #3
    Regular Coder
    Join Date
    Nov 2006
    Posts
    601
    Thanks
    1
    Thanked 2 Times in 2 Posts
    i did it like this
    Code:
     <textarea class="inputshout"  id="message" name="message" rows="7" type="text" cols="100" value="Enter message here ..." maxlength="<?php $messagelength;?>" onfocus="this.value = ( this.value == this.defaultValue ) ? '' : this.value;return true;" </textarea>
    but i does ot display my vaule message :S
    Last edited by runnerjp; 05-17-2008 at 11:17 AM.

  • #4
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    Erroneous!.

    Should be like this:
    Code:
    <textarea class="inputshout"  id="message" name="message" rows="7" type="text" cols="100" 
    value="Enter message here ..." maxlength="<?php $messagelength;?>" 
    onfocus="this.value = ( this.value == this.defaultValue ) ? '' : this.value;return true;"> 
    </textarea>
    Edit:
    If you want to see your message inside the textarea, do it as highlighted:
    Code:
    <textarea class="inputshout"  id="message" name="message" rows="7" type="text" cols="100"
     maxlength="<?php $messagelength;?>"
    onfocus="this.value = ( this.value == this.defaultValue ) ? '' : this.value;return true;">
    Enter message here ... </textarea>
    P.S. You should'nt be editing your POST...as it does'nt send me any update
    Last edited by rangana; 05-17-2008 at 11:23 AM. Reason: Answer his edited post!
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • #5
    Regular Coder
    Join Date
    Nov 2006
    Posts
    601
    Thanks
    1
    Thanked 2 Times in 2 Posts
    currently in my css i have this

    Code:
    .inputshout				{border: 1px solid #99b3b4;width: 500px;background: #e4ebeb url(../images/input_stripe.gif);font: 11px verdana, sans-serif;color:#99b3b4;padding:3px;outline:none;}
    .inputshout:focus			{border:1px solid #567475;background: #e4ebeb;}

    any way to chnage it so the onclick.. it chnages the text colour to black.. i dunno if this is html or css lol

  • #6
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    First of all, you should say if the suggestion given has aide or not

    ...Anyway, this could be done in JS:
    Code:
    <textarea class="inputshout"  id="message" name="message" rows="7" type="text" cols="100"
     maxlength="<?php $messagelength;?>"
    onfocus="this.value = ( this.value == this.defaultValue ) ? '' : this.value;this.style.color='#000';return true;">
    Enter message here ... </textarea>
    Hope that helps
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph


  •  

    Posting Permissions

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