User Profile

Collapse

Profile Sidebar

Collapse
vigneshm0601
vigneshm0601
Last Activity: Jan 13 '15, 08:46 AM
Joined: Jan 6 '15
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • how to keep the selected values in the drop down list using javascript

    Hi, Here in the below code i need to keep the selected value to be shown. But if i select and update the page the list box always shows the index value "select".I want it to show the selected value. what changes i have to make in the below code



    Code:
    <select name="year" id="year<%=gfimCount%>"  class="textbox" style="width:60px;" >
      <option value="select">Select</option>
    ...
    See more | Go to post
    Last edited by Dormilich; Jan 13 '15, 11:03 AM. Reason: please use code tags when posting code

  • how to keep the selected value in the dropdownlist

    Code:
    <option value="-select">Select</option> <script type="text/javascript">
    var YearList = 5; // Specify number of "year" selections.
    var year = new Date().getFullYear();
    var pryr1 = year-2;
    var pryr = year-1;
    document.write('<option value="' + pryr1 + '">' + pryr1 + '</option>'); 
    document.write('<option value="' + pryr + '">' +
    ...
    See more | Go to post
    Last edited by Rabbit; Jan 6 '15, 03:54 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
No activity results to display
Show More
Working...