* Thus wrote Louie Miranda:
> Im having problems. Because my javascript is inside a PHP code.
> Now below are 1 line code of a print function that display this on the
> html header.
> i must put "\n" after the Firstname. But PHP actually reads \n so when
> i view it on a browser the js code moves down. Which is wrong, because
> it wont work anymore.. what i want is js should use the \n instead. is
> there any alternative for \n? so it can display properly on php?
>
>
>
> <?php
> print("
> if (document.rpcjs_louie.ColCustName.value == \"\") { walangfield +=
> \"Missing: Firstname\n\"; }
> ");
> ?>
I'd only print() javascript only if absolutely necessary. otherwise
simply break out of php:
<?php
// php code
?>
if (document.rpcjs_louie.ColCustName.value == "") {
walangfield += "Missing: Firstname\n";
}
<?php
?>
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php