Trying to implement a possible solution to my previous entry I came across a code that (they say), works for what I want, but I mess with PHP and I do not know how to add another javascript to the php form that I already have (and has a js already stuck).
<?php
echo htmlspecialchars($_SERVER["PHP_SELF"]);
if( $_SERVER['REQUEST_METHOD'] == 'POST'){
echo '<script type="text/javascript">
window.location.assign("pagina.html");
</script>';
// etc
// etc
?>
And I also want to add this one:
<script type= "text/javascript">
function capitAll(e){
e= window.event? event.srcElement: e.target;
var str= e.value.toLowerCase();
var Rx= /\b([a-z]+)\b/ig;
str= str.replace(Rx,function(w){
return w.charAt(0).toUpperCase()+w.substring(1);
});
return str;
}
</script>
But I can not make it work. The form is sent (no errors), but I know something I am doing wrong ...
How is it done to add a new script to the php ...?
Thank you
----------