ok so im creating a contact form and validation page... i have it so that it can validate using both javascript and php. Now i want to be able to have it still validate even when javascript is disabled. my question is.... is there a way to echo, or print info to a specific div using php.
ECHO to DIV
Started by ductiletoaster, Mar 17 2010 02:00 PM
3 replies to this topic
#1
Posted 17 March 2010 - 02:00 PM
|
|
|
#2
Guest_Jaan_*
Posted 17 March 2010 - 02:10 PM
Guest_Jaan_*
<?php
function validateForm(){
return $something;
}
$str = validateForm();
// find a div where you want to print it
echo "<div id='someDiv'>".$str."</div>";
?>
Something like that ?
#3
Posted 17 March 2010 - 02:12 PM
now that just echo's a div i wanted to know if u can send data to be displayed with in an already existing div
#4
Posted 19 March 2010 - 06:36 AM
you can always change the content of an div with a javascript, and load the new content from the server with ajax calls.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall


Sign In
Create Account


Back to top









