index

You want to copy HTML dropdownlist(combobox) options from a web-page. You do right click on dropdown list. Oh my God !!! There is no option to do it. This article explains how to extract dropdownlist options using Notepad++.

Steps:

1. Open site.
2. Now you need to get HTML source of dropdown list:

For Firefox with Firebug:
Right Click on HTML Dropdownlist, Select Inspect Element and In firebug, Right click and click copy InnerHTML option.

For IE8+:
Press F12, click arrow sign in developer tools and Select Dropdownlist. Now you will see html source is selected in developer tools, right click and click copy InnerHTML option.

For Chrome:
Right Click on HTML Dropdownlist, Select Inspect Element and In Developer Tools, you will see html source is selected. Right click and click Copy as HTML option.

3. Paste HTML source in Notepad++
4. Remove Select tag from top and bottom if exists
5. Put cursor at top of code and Press Ctrl + F
6. Go to Replace Tab and enter following info:
Find What:
<option[^>]*>([^<]*)</option>
Replace With:
\1\n
Select Regular Expression as Search Mode and click on Replace All. If options are already in new line then no need to use \n in Replace With option.

 Copy/Extract HTML Dropdownlist Options in Plain Text

You will get all options in plain text. If there are a lot of options, It will save bunch of time. Share your opinion or alternate way to do this in below comment box.

Comments:  6

  • Manoharkadali

    awesome…..thank you

  • Anonymous

    So useful! Thanks for sharing!

  • Samir_belmahi

    thank you so much

  • Chris

    This just saved me about 12 hours of work..a drop down with 10,000 items.

  • http://jamiegoodwin.net/ Jamie Goodwin

    GENIUS!

  • Alastair Donnelly

    Great tip. Just saved me hours and hours of work. Thank you very very much.