[php]
class makeJs
{
private $jsStartChar = '
private $jsEndChar = '
public function jsalert($message,$url){
echo $this->jsStartChar;
if($url==''){
echo 'alert' . '("' . $message . '");';
echo $this->jsEndChar;
}
else{
echo 'alert' . '("' . $message . '");';
echo $this->jsEndChar;
echo '';
}
}
public function jsConfirm($message){
echo $this->jsStartChar;
if($url==''){
echo '/confirm/i' . '("' . $message . '");';
echo $this->jsEndChar;
}
}
public function jsOpenWin($url,$name,$height,$width){
echo $this->jsStartChar;
echo 'window.open'.'("'.$url.'","'.$name.'","'.$height.'","'.$width.'");';
echo $this->jsEndChar;
}
public function jsAddscrīpt($scrīpt){
echo $this->jsStartChar;
echo $scrīpt;
echo $this->jsEndChar;
}
}
?>
[/php]



