Cleaner way

  • gophw1
  • Newbie
  • Newbie
  • gophw1
  • Posts: 12

Post 3+ Months Ago

Looking to add a drop down box in a form that lists the 50 states, is there a cleaner way to do this other than
<form action="./" method="GET">

<select name="state">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>

etc,etc,etc

I'm sure there is a way to do it to eliminate 50 lines of code.

Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6252
  • Loc: Seattle, WA

Post 3+ Months Ago

Not really. Even if you store the actual state data (names and abbreviations) elsewhere, your final rendered page will still contain what you've described above.

Why do you feel the need to eliminate this code? What do you gain by doing so?
  • gophw1
  • Newbie
  • Newbie
  • gophw1
  • Posts: 12

Post 3+ Months Ago

I don't want to eliminate it per say, I'm learning new languages and thought there might be a new way instead of this.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 130 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.