Results 1 to 3 of 3

Thread: Replace input values on page load

  1. #1
    Join Date
    Jul 2008
    Posts
    81
    Thanks
    38
    Thanked 2 Times in 2 Posts

    Default Replace input values on page load

    Hi,

    I have a simple button
    PHP Code:
    <input type="submit" name="sendbutton2" id="sendbutton2" class="sendbutton" value="Submit" onclick="return cforms_validate('2', false)"/> 
    what I want to do is to change the value="Submit" to another value on page load (so the visitors won't notice it)


    Thanks

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    See if having this script makes your day:
    Code:
    <script type="text/javascript">
    window.onload=function(){document.getElementById('sendbutton2').value='Notice me?';}
    </script>
    Learn how to code at 02geek

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

  3. The Following User Says Thank You to rangana For This Useful Post:

    lord22 (07-19-2008)

  4. #3
    Join Date
    Jul 2008
    Posts
    81
    Thanks
    38
    Thanked 2 Times in 2 Posts

    Thumbs up

    Quote Originally Posted by rangana View Post
    see If Having This Script Makes Your Day:
    Code:
    <script Type="text/javascript">
    Window.onload=function(){document.getelementbyid('sendbutton2').value='notice Me?';}
    </script>
    It Does Make My Day !!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Thank You !!

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
  •