Rikk / recaptcha

Automatically exported from code.google.com/p/recaptcha
0 stars 0 forks source link

Recaptcha with dojo.xhrGet or a similar 'javascript' script #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It,s about this.
If I go straight to http://xxx.local/tab4, the recaptcha is displayed.
If I go there by clicking a link it is not displayed.
It doesn't matter or I do it this;
=========================================================================
//tab4
function tab4(){dojo.xhrGet({url:"tab4/index",handleAs: "text",
        load:function(response, ioArgs){dojo.byId("subtab4").innerHTML =
response; return response;},
        error:function(response, ioArgs){console.error("HTTP status code:",
ioArgs.xhr.status); return response;}
    });
}
-------------------------------------------------------------------------
<div dojoType="dojo.io.script" onclick="tab4Tab">tab4</div><div
id="subtab"></div>
=========================================================================
or this way.
=========================================================================
//tab4
function tab4Tab(letter){SERVER1.GETrequest("/tab4/index",'letter='+
letter, contentTab)}
//displaying
function contentTab(){var data = SERVER1.Ontvangst();
if(data){document.getElementById('subtab').innerHTML = data;}}
-------------------------------------------------------------------------
<div onclick="javascript:tab4Tab('c')">tab4</div><div id="subtab"></div>
=========================================================================
It is just not displaying :(
 I've tried many things out to get it solved.
Basically I tried to use it with 'Zend/Service/Recaptcha.php' embedded in a
'Zend_Form' fashion and to have it displayed within a 'dijit contentpane'
but because didn't get it to work I tried to work it out the way mentioned
above.

Final conclusion:
 - It doesn't work the 'Dojo' way 'where from I thought first that it was
causing the problem. 
 - It doesn't work the pure 'javascript' way either.

Then,
Is there something that I'm doing wrong or is it just not possible this way?

Awaiting,
Aad Pouw

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by Aad.P...@gmail.com on 4 Feb 2009 at 10:36

GoogleCodeExporter commented 9 years ago
I'm experiencing the same problem... using AJAX to populate a div with html 
from the 
server. I'm guessing that the inline javascript isn't being evaluated. For 
instance, 
I tried returning "<script type="text/javascript">alert('foobar');</script>" to 
populate the div with, but that doesn't pop a box.

Original comment by kmac.mcf...@gmail.com on 22 Jul 2009 at 10:29