[TYPO3-project-formidable] extension using formidable

Jerome Schneider typo3dev at ameos.com
Tue Aug 1 14:01:57 CEST 2006


Humm that's interesting. So Firefox on Debian seems to *not* throw any 
exception although the try block doesn't work properly.

I'll try to implement some better objectfactory then.

Does anybody here knows a good cross-browser javascript DOM API ?


Jerome Schneider

"Fernando Romay" <fromay at igalia.com> a écrit dans le message de news: 
mailman.11378.1153929597.4326.typo3-project-formidable at lists.netfielders.de...
Finally i found what was causing the problem and it was the javascript
function ameosFormidableSubmitForm_..... and the thing is that this code
on the main renderer class:


function ameosFormidableSubmitForm_....(sSubmitFormId){

oObjectFactory = new Object();
oObjectFactory.createElement = function(sTag, aProps) {

var element;
try {
var sPattern = "";
for(iIndex in aProps) {
sPattern += " " + iIndex + "=\"" + aProps[iIndex] + "\"";
}

sPattern = "<" + sTag + sPattern + ">";

element = document.createElement(sPattern);
} catch(e) {

// not IE
try {
element = document.createElement(sTag)

for(iIndex in aProps) {
element.setAttribute(iIndex, aProps[iIndex]);
}

} catch(ex) {
// silent exception
}
}

return element;
}

wasn't working (never threw exception but didn't worked), so i
uncommented the first try/catch block and now it works.

the code i'm using is this:

function ameosFormidableSubmitForm_....(sSubmitFormId){

oObjectFactory = new Object();
oObjectFactory.createElement = function(sTag, aProps) {

var element;
/*try {
var sPattern = "";
for(iIndex in aProps) {
sPattern += " " + iIndex + "=\"" + aProps[iIndex] + "\"";
}

sPattern = "<" + sTag + sPattern + ">";

element = document.createElement(sPattern);
} catch(e) {
    */
// not IE
try {
element = document.createElement(sTag)

for(iIndex in aProps) {
element.setAttribute(iIndex, aProps[iIndex]);
}

} catch(ex) {
// silent exception
}
//}

return element;
}


By the way, i'm using Firefox on Debian



El mié, 26-07-2006 a las 13:10 +0200, Fernando Romay escribió:
> Looking at the debug output i'm always getting a partial submit and
> empty form data
>
> what could be causing this ?
>
> debug call stack:
>
> ------------------------ begin of call stack --------------------------
> #1 - INITIALIZATION OF FORMIDABLE
> Location : 
> /typo3conf/ext/ameos_formidable/api/class.tx_ameosformidable.php:132
> Total exec. time : 0.009 sec
> User called FORMidable
>
> . In :
> 
> /var/www/fromay/hurs_web/typo3conf/ext/fr_formplugin/pi1/class.tx_frformplugin_pi1.php:88
> . At :
>      tx_ameosformidable->init
> . With args:
>
> 0
> Object id #14
>
> 1
> /var/www/fromay/hurs_web/typo3conf/ext/fr_formplugin/pi1/forms//form050.xml
>
> 2
>
>
>
>
>
>
> #2 - RAW POST RETURN
> Location : 
> /typo3conf/ext/ameos_formidable/api/class.tx_ameosformidable.php:642
> Total exec. time : 0.02 sec
> EMPTY!
>
> ________________________________________________________________________
>
>
> #3 - _getFormData
> Location : 
> /typo3conf/ext/ameos_formidable/api/class.tx_ameosformidable.php:643
> Total exec. time : 0.021 sec
> name
>
>
> surname
>
>
> add_street
>
>
> add_city
>
>
> add_pc
>
>
> btnsubmit
>
>
>
> ________________________________________________________________________
>
>
> #4 - _getFormDataManaged
> Location : 
> /typo3conf/ext/ameos_formidable/api/class.tx_ameosformidable.php:644
> Total exec. time : 0.021 sec
> name
>
>
> surname
>
>
> add_street
>
>
> add_city
>
>
> add_pc
>
>
>
>
>
> #5 - PARTIAL SUBMIT
> Location : 
> /typo3conf/ext/ameos_formidable/api/class.tx_ameosformidable.php:657
> Total exec. time : 0.022 sec
> No validation required
>
> ----------------------- End of call stack -------------------
>
> and the form is sending the data:
>
>
> FORMidable t3lib_div::_POST()
>
> tx_frformplugin_pi1_file
> name
> asd
>
> surname
> fd
>
> add_street
> asfd
>
> add_city
> fdg
>
> add_pc
> 4
>
> btnsubmit
> Submit
>
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable 





More information about the TYPO3-project-formidable mailing list