PDA

View Full Version : Replace input values on page load



lord22
07-19-2008, 08:15 AM
Hi,

I have a simple button

<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

rangana
07-19-2008, 08:25 AM
See if having this script makes your day:


<script type="text/javascript">
window.onload=function(){document.getElementById('sendbutton2').value='Notice me?';}
</script>

lord22
07-19-2008, 08:34 AM
see If Having This Script Makes Your Day:


<script Type="text/javascript">
Window.onload=function(){document.getelementbyid('sendbutton2').value='notice Me?';}
</script>


It Does Make My Day !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thank You !!