function validateForm() {
var x = document.forms["myForm"]["fname"].value;
if (x == null || x == "") {
alert("Name must be filled out");
return false;
}
}
And hiding page elements<script type="text/javascript">
function showStuff(id) {
document.getElementById(id).style.display = 'block';
}
</script>
<td class="post">
<a href="#" onclick="showStuff('answer1'); return false;">Edit</a>
<span id="answer1" style="display: none;">
<textarea rows="10" cols="115"></textarea>
</span>
Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum
</td>
The bigger kids in the forum can give you more information as they use javascript for their jobs. I just teach this stuff for web design
What?Here is a question I gave to the students in their final test. It uses an example of Javascript
You want a list of "stuff" you can do with JavaScript?
1) Anything you want.
You can make a snow effect on your website at Christmas timeMost annoying web pages put the snow effect in them during the Christmas holidays so it sets the standard level of annoyance for the season.
and then all your members can complain at you about it
so you can not do it this year
and have people complain at you that you didn't do it and how un-festive you are...
You can make a snow effect on your website at Christmas timeIt's doesn't snow in NZ (at Christmas). Next time make it a sandy beach.
and then all your members can complain at you about it
so you can not do it this year
and have people complain at you that you didn't do it and how un-festive you are...
It's doesn't snow in NZ (at Christmas). Next time make it a sandy beach.
Make UV rays shine from the forums, and give everyone sunburn.