2008年11月17日星期一

[fw-mvc] View Helpers problem

Hello everyone,

I'm dying with a view helper problem, I can't get javascript to show on the client and I don't know why.

Here's my code :

<?php

class Zend_View_Helper_Loginbox extends Zend_View_Helper_Partial
{
    public function loginbox()
    {
        $this->view->headScript()->appendFile('/scripts/js/myfile.js');        // this doesn't work, the file never gets included !!!
        $this->view->dojo()->javascriptCaptureStart();                         // neigher the content of my javascript function after this !!!
?>
       
dojo.addOnLoad(function(){
    alert("it s not working");
});

<? $this->view->dojo()->javascriptCaptureEnd(); ?>
       
<div id="box" class="box">test</div>
<div id="blockme" class="blockme">
<form method="post" action="/user/login" id="loginform">
    <label for="email">Email:</label>
    <input type="text" name="email" />
    <label for="password"></label>
    <input type="password" name="password"/>
    <input type="submit" id="loginButton" value="login" >
    <div id="loginerrors"></div>
</form>
</div>

       
<?php        
       
    }

}
?>

Any help really appreciated !

--
http://myzendframeworkexperience.blogspot.com/





Téléchargez le nouveau Windows Live Messenger ! Téléchargez Messenger, c'est gratuit !

没有评论: