Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to reload same page after change the select box option

Tags:

javascript

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>
like image 953
Kennedy Avatar asked Dec 11 '22 13:12

Kennedy


1 Answers

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>
like image 153
n8coder Avatar answered Feb 19 '23 11:02

n8coder