Jump to content

Search the Community

Showing results for tags 'validate'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News and Announcements
    • News and Announcements
  • osCommerce Online Merchant v2.x
    • General Support
    • osCommerce Online Merchant Community Bootstrap Edition
    • Add-Ons
  • Development
  • General
    • General Discussions
    • Live Shop Reviews
    • Security
    • Developer Feedback
  • PayPal's Announcements
  • Sage Pay's Announcements
  • Solomono - new level osCommerce templates's Announcements
  • German Community's OSCOM v2.x
  • German Community's Allgemein

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Real Name


Location


Interests


Website

Found 1 result

  1. I'm developing a header tag module in order to include jquery validation plugin. I use Firefox browser. My first attempt works well ... private function _includeValidation() { $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/jquery.validate.min.js" />', $this->group); // $this->group = 'header_tags' } ... but when I try to include another script... private function _includeValidation() { $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/jquery.validate.min.js" />', $this->group); $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/localization/messages_es.min.js" />', $this->group); } ... the browser only load the first one: jquery.validate.min.js ATTEMPTS 1) If I switch the loading order... private function _includeValidation() { $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/localization/messages_es.min.js" />', $this->group); $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/jquery.validate.min.js" />', $this->group); } ... the browser only load the first one: messages_es.min.js 2) I see that core modules sometimes include a breakline separator, then I try applying it... private function _includeValidation() { $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/jquery.validate.min.js" />' . PHP_EOL, $this->group); $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/localization/messages_es.min.js" />' . PHP_EOL, $this->group); } ... the browser only load the first one: jquery.validate.min.js 3) Using "\n" instead of PHP_EOL, as other modules... private function _includeValidation() { $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/jquery.validate.min.js" />' . "\n", $this->group); $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/localization/messages_es.min.js" />' . "\n", $this->group); } ... the browser only load the first one: jquery.validate.min.js 4) Importing another JS file: private function _includeValidation() { $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/jquery.validate.min.js" />', $this->group); $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/jquery.scrollTo.min.js" />', $this->group); } ... the browser only load the first one: jquery.validate.min.js 5) Using the jquery version associated to the query Validation 1.15. I disabled jquery import on template_top and then ... private function _includeValidation() { $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/lib/jquery.js" />', $this->group); $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/jquery.validate.min.js" />', $this->group); } ... the browser only load the first one: jquery.js 6) Import each JS file from distinct modules: 6.A ) Importing jquery.validate.min.js on ht_noscript.php core module... function execute() { global $oscTemplate; $oscTemplate->addBlock('<noscript><div class="no-script"><div class="no-script-inner">' . tep_output_string(MODULE_HEADER_TAGS_NOSCRIPT_TEXT) . '</div></div></noscript>', $this->group); $oscTemplate->addBlock('<style>.no-script { border: 1px solid #ddd; border-width: 0 0 1px; background: #ffff90; font: 14px verdana; line-height: 2; text-align: center; color: #2f2f2f; } .no-script .no-script-inner { margin: 0 auto; padding: 5px; } .no-script p { margin: 0; }</style>', $this->group); // My hack: $oscTemplate->addBlock('<script type="text/javascript" src="amantis/ext/modules/validation/jquery.validate.min.js" />', $this->group); } 6.B ) ... and importing validation language file on my module: private function _includeValidation() { $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/validation/localization/messages_es.min.js" />', $this->group); } ... ¬°and this works! Experiments lead to me to consider that the problem is in my header tag module file, but it's made from another core header tag module, and it's simple... Has anyone encountered anything like this? Any clue, path will be so appreciated: I'm very frustrated, hours debugging :( Thanks! :pray:
×