motormichael12
10-14-2006, 10:20 PM
Can anyone give me a script that makes it so when using a form, if a textbox is emtpy, it uses the data from another hidden textbox?
I am not very good at scripting things for vars and ifs... so please help
something like this, even though it is wrong it is for example... pretend it is all in a form tag
<textarea name="text1"></textarea>
<div id="text1data">text1's data</div>
<script>
if "text1" value=empty
insert image into "text1data" div
</script>
then the box would use the value specified for text2 if the box "text1" is emtpy.
*CODE IN THIS POST EDITED AFTER POST NUMBER 6*
I am not very good at scripting things for vars and ifs... so please help
something like this, even though it is wrong it is for example... pretend it is all in a form tag
<textarea name="text1"></textarea>
<div id="text1data">text1's data</div>
<script>
if "text1" value=empty
insert image into "text1data" div
</script>
then the box would use the value specified for text2 if the box "text1" is emtpy.
*CODE IN THIS POST EDITED AFTER POST NUMBER 6*