php - Javascript Magento Create Account Preference Error -


i trying create second action on create new user account form on magento 1.9ce. need additional action build http string , send url configured. far have built script pick fields, javascript isn't processing because varienform attached event handler on document load. shed light on code have why not processing?

<script type="text/javascript"> $(document).ready(function() {      window.settimeout(function() {         $('#form-validate').on('submit', function( e )         {             var elements = this.elements;             e.preventdefault();             e.stoppropagation();              var subscribed = elements.is_subscribed.checked ? "y" : '';             var bglink = "http://suite9.emarsys.net/u/register_bg.php?owner_id=428212131&f=1481&key_id=3&optin=" + subscribed + "&inp_1=" + elements.firstname.value + "&inp_2=" + elements.lastname.value + "&inp_3=" + elements.email_address.value + "&inp_4=" + elements.year.value + "-" + elements.month.value + "-" + elements.day.value;              var img = $('<img width="1" height="1" src="'+bglink+'">')                 .on('load error', $.proxy(function()                 {                     htmlformelement.prototype.submit.apply(this);                 }, this))                 .appendto(this);              return false;         });     }, 2000); });  </script> 

if using jquery in website may jquery , prototype conflict, fix it: - first of shoud add jquery.noconflict(); website - second replace $ equal jquery ex:jquery(document).ready(function() { })


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -