Invalid argument only with IE and only in a particular situation.
Hello, I'm new here and a beginner with jquery, so if this is the
wrong place, please address me to the right one.
The situation: I wrote a bit of js over jquery to update a div (cart
content of an e-commerce site) with both a post call and a get call.
Here it is:
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery("form[name='form_name_1'],
form[name='form_name_2']").submit(function() {
var inputs = [];
var q_added = '';
jQuery(':input', this).each(function() {
if(this.name != '') inputs.push(this.name + '=' +
escape(this.value));
if(this.name == 'cart_quantity') q_added = this.value;
})
jQuery("input", this).fadeTo("fast", 0).fadeTo("fast", 1)
jQuery("#my_div_cart_content").replaceWith("<div
id='my_div_cart_content' style='text-align: center; padding:
10px;'><img src='ajax-loader.gif' alt='Loading' /></div>");
jQuery.post(this.action, inputs.join('&'), function() {
jQuery.get("cart_content.php", function(data)
{ jQuery("#my_div_outer_cart_content").replaceWith(data); });
<?php if(not_important_here, some conditons) {
?>
var new_amount = parseInt(<?php echo other stuff here; ?