This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="jotain">enable php on the server to view and post comments</div> | |
<?php | |
echo ' | |
<script type="text/javascript"> | |
document.getElementById('jotain').style.display = 'none'; | |
</script>'; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$filename = 'leikkikentta.csv'; // viestitiedosto | |
if(!file_exists($filename)) { | |
touch($filename); | |
// echo 'no comments'; voi muuttaa, tai jättää pois kokonaan | |
} | |
else { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$filename = 'leikkikentta.csv'; // viestitiedosto | |
if(!file_exists($filename)) { | |
touch($filename); | |
// echo 'no comments'; voi muuttaa, tai jättää pois kokonaan | |
} | |
else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tämä: | |
$('div#inputwarning').hide(); // Piilotetaan virheilmoitus oletuksena | |
tulee | |
$(document).ready(function(){ | |
ja | |
$('.submit').click(function(){ | |
väliin | |
ja tämä: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var empty = 0; // Apumuuttuja | |
$(':input.required').each(function(){ | |
var field = $(this); | |
if($(this).val().length == 0) { // Jos vaadittu kenttä on tyhjä, asetetaan sille lisäluokka ja näytetään virheilmoitus | |
field.addClass('mustfill') | |
$('div#inputwarning').fadeIn(300); | |
empty = 1; | |
} | |
else field.removeClass('mustfill'); // Jos vaadittu kenttä ei ole tyhjä, poistetaan siltä (mahdollinen) lisäluokka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('div#inputwarning').hide(); | |
$('.submit').click(function(){ | |
var empty = 0; | |
$(':input.required').each(function(){ | |
var field = $(this); | |
if($(this).val().length == 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('div#inputwarning').hide(); | |
$('.submit').click(function(){ | |
var empty = 0; | |
$(':input.required').each(function(){ | |
var field = $(this); | |
if($(this).val().length == 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.submit').click(function(){ | |
var empty = 0; | |
$(':input.required').each(function() { | |
if($(this).val().length == 0) { | |
var field = $(this); | |
field.addClass('mustfill'); | |
$('div#inputwarning').fadeIn(300); | |
empty = 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('input[name="name"]').val(''); | |
$('input[name="email"]').val(''); | |
$('input[name="url"]').val(''); | |
$('textarea[name="msg"]').val(''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('.submit').click(function(){ | |
// Haetaan formin inputtien valuet | |
var name = $('input[name="name"]').val(); | |
var email = $('input[name="email"]').val(); | |
var url = $('input[name="url"]').val(); | |
var msg = $('textarea[name="msg"]').val(); |
NewerOlder