(on Sunday, 25 January 2009, 11:14 AM -0800):
> It's a bit crossover and therefore I will post it to some other forums too.
>
> Foreword,
> The contentpane I use for this, is a story on itself.
> It's a Dojox Contentpane that I, renamed to "contentPanePlus", adjusted,
> copied to the "Dijit/Layout" folder and made a helper for.
> It works very well, I've some js running and the 'tooltip' feature in one of
> the panes, I have it wrapped in a tabContainer.
> Like this;
> <?php $this->TabContainer()->captureStart('xxx', array('class' => 'xx'))?>
> <?= $this->contentPanePlus('xxx','', array('title' => 'xxx', 'class' => '',
> 'href' => $this->url(array('controller' => 'xxx', 'action' => 'xxx'),
> 'default', true)))?>
> <?= $this->TabContainer()->captureEnd('xxx')?>
>
> Now about of what it is doing not, and that is displaying my form with the
> recapcha service included.
> Summery:
> -> If I go straight to 'http://xxx.local/tabx' I get my form 'including the
> recaptcha, displayed perfectly.
> -> If I go to 'http://xxx.local' and click on tabx, the whole form won't
> displayed at all but the form itself is rendered. I can see that in firebug.
> -> If I use 'Figlet' or 'Image', the form will display all.
> -> If I comment recaptcha out or set 'executeScripts' => false, the form
> will display but without the recaptcha.
>
> After some digging this sunday, my idea is 'and I'm just a basic free time
> webdesigner, it's like the contentpane is stumbling over the
> Zend/Service/Recaptcha.php.
> Perhaps it are the javascript/html lines within the recaptcha.php, I just
> guess?
That's exactly the issue. XHR is not allowed to directly execute
javascript -- and ContentPane, when you use the href property, is doing
an XHR call to the server to grab the content.
There are ways around this. IIRC, dojox.layout.ContentPane has some
mechanisms for executing JS found within the content. Another way to do
it is to include a dojo/event script in the markup being included in the
content pane:
<script type="dojo/event" event="onload">
// js for initializing the ReCaptcha goes here...
</script>
This will, of course, take some of the ease-of-use of the ReCaptcha
adapter away, but it will make it usable in this fashion.
> Then the question comes, what is coursing the problem? The 'recaptcha.php'
> or the 'contentpane'?
> I don't really know because the form is rendered but just not displayed.
>
> Any suggestions, ideas, solutions?
> Has someone a form with recaptcha running within a contentpane?
--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论