Reputation: 335
how to reload same page after change the select box option.
I have to used some shopping cart framework.In this i need to update cart price when i changed product attributes ,
so i need to reload the same page when the select box is onchanged.
<tr><td>
<select name="color" onchange="">
<option value="red"> Red </option>
<option value="red"> Blue</option>
<option value="red"> Green</option>
<option value="red"> Pink</option>
</select>
</td></tr>
Upvotes: 5
Views: 47345
Reputation: 701
You can try this:
<tr>
<td>
<select name="color" onchange="location.reload()">
<option value="red">Red </option>
<option value="blue">Blue</option>
<option value="green">Green</option>
<option value="pink">Pink</option>
</select>
</td>
</tr>
Upvotes: 13
Reputation: 898
(function($) {
$(document).ready( function() {
$('#name').change(function() {
location.reload();
});
});
})(jQuery);
Upvotes: 3
Reputation: 6000
$('#something').change(function() {
location.reload();
});
Upvotes: 1