PDA

View Full Version : Call to undefined function


steve287725
12-13-2011, 10:23 AM
I have not used Dynamic Dropdowns for a while but have just applied it and I get the following error on the resulting page;

<SCRIPT>
var WAJA = new Array();
WAJA[0] = new Array();
<br />
<b>Fatal error</b>: Call to undefined function WA_DD_Replace() in <b>C:\XAMPP\xampp\htdocs\<domain>\contact-us.php</b> on line <b>60</b><br />

Any ideas anyone please?

Thanks

Steve

Ian S
12-14-2011, 02:07 AM
Hi Steve,

From what I can see the Create Dynamic Array behaviour should create this little function on your page:

function WA_DD_Replace($startStr) {
$startStr = str_replace("'", "|WA|", $startStr);
$startStr = str_replace("\\", "\\\\", $startStr);
$startStr = preg_replace("/[\r\n]{1,}/", " ", $startStr);
return $startStr;
}

Pop that in above your first bit of array code, or check to see if it has been inserted before the array code tries to call the function.

Cheers
Ian