checkout no refresh automatically in google chrome
12 years 5 months ago #152891
by kaya
checkout no refresh automatically in google chrome was created by kaya
Hi dear
i am using this code in my checkout:
when i select a value in firefox my page is refresh automatically and it's work very good. but it's no refresh in google chrome.
what's my problem and it's not refresh automatically in chrome?
thank you
i am using this code in my checkout:
Code:
<select id="hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>" type="text" name="item[<?php echo $row->cart_product_id;?>]" class="hikashop_product_quantity_field" value="<?php echo $row->cart_product_quantity; ?>" onchange="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>').value=qty_field.value;">
<option value="1" <?php if($row->cart_product_quantity == '1') echo 'selected="selected"'; ?> onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field && qty_field.value != '<?php echo $row->cart_product_quantity; ?>'){<?php echo $input; ?> qty_field.form.submit(); } return false;" title="<?php echo JText::_('HIKA_REFRESH'); ?>">1</option>
<option value="2" <?php if($row->cart_product_quantity == '2') echo 'selected="selected"'; ?> onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field && qty_field.value != '<?php echo $row->cart_product_quantity; ?>'){<?php echo $input; ?> qty_field.form.submit(); } return false;" title="<?php echo JText::_('HIKA_REFRESH'); ?>">2</option>
<option value="3" <?php if($row->cart_product_quantity == '3') echo 'selected="selected"'; ?> onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field && qty_field.value != '<?php echo $row->cart_product_quantity; ?>'){<?php echo $input; ?> qty_field.form.submit(); } return false;" title="<?php echo JText::_('HIKA_REFRESH'); ?>">3</option>
</select>
when i select a value in firefox my page is refresh automatically and it's work very good. but it's no refresh in google chrome.
what's my problem and it's not refresh automatically in chrome?
thank you
Please Log in or Create an account to join the conversation.
12 years 5 months ago #152919
by nicolas
Replied by nicolas on topic checkout no refresh automatically in google chrome
Hi,
You should not use a onclick event in your option tags. Instead you should use a onchange event in your select tag (like you actually already have).
It's probably why it doesn't work on Chrome.
You should not use a onclick event in your option tags. Instead you should use a onchange event in your select tag (like you actually already have).
It's probably why it doesn't work on Chrome.
The following user(s) said Thank You: kaya
Please Log in or Create an account to join the conversation.
12 years 5 months ago #152927
by kaya
Replied by kaya on topic checkout no refresh automatically in google chrome
thank you dear Nicolas
my onclick event is:
when i remove it's from my code it's not work any browser. how can do it work in all browser?
thank you
my onclick event is:
Code:
onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field && qty_field.value != '<?php echo $row->cart_product_quantity; ?>'){<?php echo $input; ?> qty_field.form.submit(); } return false;"
thank you
Please Log in or Create an account to join the conversation.
12 years 5 months ago #152936
by nicolas
Replied by nicolas on topic checkout no refresh automatically in google chrome
As I said you should remove the onclick in your option tags and add your auto submit in the onchange attribute of the select tag.
If you just remove the onclick, it won't auto submit anymore.
If you just remove the onclick, it won't auto submit anymore.
Please Log in or Create an account to join the conversation.
Time to create page: 0.180 seconds