+ Reply to Thread
Results 1 to 6 of 6

Thread: HTML <select> FORM ?

  1. #1
    noivel is offline x10Hosting Member noivel is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    28

    Exclamation HTML <select> FORM ?

    Hi dears Im pretty newbi in HTML just started to learn it and I have a question, I guess for most of U it will be easy to answer!
    I have a select form:
    HTML Code:
    <select>
    <option value="">Choose Your Provider</option>
    <option value="http://localhost/pawnagecentral-servers/pcs.html">PawnageCentral Servers</option>
    <option value="http://localhost/planetventrilo/pv.html">PlanetVentrilo</option>
    <option value="http://localhost/power-gsp/pgsp.html">Power GSP</option>
    <option value="http://localhost/psybergaming/pg.html">PsyberGaming</option>
    <option value="http://localhost/redline-gameservers/rlgs.html">RedLine GameServers</option>
    <option value="http://localhost/redphive/rpn.html">RedPhive Networks</option>
    </select>
    What should I do that in select it opens option value PAGE?

  2. #2
    TechAsh's Avatar
    TechAsh is offline Retired TechAsh is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    UK
    Posts
    5,853

    Re: HTML <select> FORM ?

    Hi,

    Depending on whether you want the page to open in a new tab or the same tab one of the following should work.

    For opening in same tab:
    HTML Code:
    <select onChange="location = this.options[this.selectedIndex].value;">
    <option value="">Choose Your Provider</option>
    <option value="http://localhost/pawnagecentral-servers/pcs.html">PawnageCentral Servers</option>
    <option value="http://localhost/planetventrilo/pv.html">PlanetVentrilo</option>
    <option value="http://localhost/power-gsp/pgsp.html">Power GSP</option>
    <option value="http://localhost/psybergaming/pg.html">PsyberGaming</option>
    <option value="http://localhost/redline-gameservers/rlgs.html">RedLine GameServers</option>
    <option value="http://localhost/redphive/rpn.html">RedPhive Networks</option>
    </select>
    Or to open in a new tab:
    HTML Code:
    <select onChange="window.open(this.options[this.selectedIndex].value,'_blank');">
    <option value="">Choose Your Provider</option>
    <option value="http://localhost/pawnagecentral-servers/pcs.html">PawnageCentral Servers</option>
    <option value="http://localhost/planetventrilo/pv.html">PlanetVentrilo</option>
    <option value="http://localhost/power-gsp/pgsp.html">Power GSP</option>
    <option value="http://localhost/psybergaming/pg.html">PsyberGaming</option>
    <option value="http://localhost/redline-gameservers/rlgs.html">RedLine GameServers</option>
    <option value="http://localhost/redphive/rpn.html">RedPhive Networks</option>
    </select>
    Useful Links:
    Terms of Service | Server News | Buy a Domain
    Free Domains: co.cc | Dot.tk -- Free File Storage: Dropbox -- Website Monitoring: Service Uptime


    My Websites:
    Earthtime Games & TechAsh's Blog

  3. #3
    noivel is offline x10Hosting Member noivel is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    28

    Re: HTML <select> FORM ?

    thank U very much !!!

  4. #4
    TechAsh's Avatar
    TechAsh is offline Retired TechAsh is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    UK
    Posts
    5,853

    Re: HTML <select> FORM ?

    No problem. I'm glad I could help :-)
    Useful Links:
    Terms of Service | Server News | Buy a Domain
    Free Domains: co.cc | Dot.tk -- Free File Storage: Dropbox -- Website Monitoring: Service Uptime


    My Websites:
    Earthtime Games & TechAsh's Blog

  5. #5
    noivel is offline x10Hosting Member noivel is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    28

    Re: HTML <select> FORM ?

    Sorry 1 more question. I added this code in my template file and this is how it looks, as U see drop down menu 1 line lower than {author}, {views} and {date}

    here is code of my template file
    HTML Code:
    <div class="podh">[edit]<img src="{THEME}/images/edit.png" title = "Edit" border="0"> [/edit] <span class="slink">author</span>: <strong>{author}</strong>  ({date}) | Views: {views} 
    <form style="padding-left: 400px;">
    <select onChange="location = this.options[this.selectedIndex].value;">
    <option value="/gsp/185-gameserverscom.html">GAMESERVER.COM</option>
    <option value="/gsp/186-lowpingsnet.html">LOWPINGS.NET</option>
    <option value="/gsp/187-counter-strikecom.html">COUNTER-STRIKE.COM</option>
    <option value="/gsp/188-darkstarlcccom.html">DARKSTARLCC.COM</option>
    <option value="/gsp/189-verygamesnet.html">VERYGAMES.NET</option>
    <option value="/gsp/190-velocity-serversnet.html">VELOCITY-SERVERS.NET</option>
    <option value="/gsp/191-xfactorserverscom.html">XFACTORSERVERS.COM</option></select><from>
    </div>
    How to replace it to proper location? Thx for helping and where is THANKS button here I couldn't find!
    Last edited by noivel; 03-20-2010 at 11:48 AM.

  6. #6
    fomalhaut is offline x10Hosting Member fomalhaut is an unknown quantity at this point
    Join Date
    Aug 2009
    Location
    South of France near Arles
    Posts
    91

    Re: HTML <select> FORM ?

    Hello Noivel.

    I don't know if that's the real problem but you have not really close the "form" tag :
    you wrote "<from>" instead of "</form>" after the "</select>" tag:
    HTML Code:
    <option value="/gsp/191-xfactorserverscom.html">XFACTORSERVERS.COM</option></select><from>
    instead of
    HTML Code:
    <option value="/gsp/191-xfactorserverscom.html">XFACTORSERVERS.COM</option></select></form>

+ Reply to Thread

Similar Threads

  1. HTML/Javascript Form Help Please
    By viskonriddle in forum Programming Help
    Replies: 3
    Last Post: 03-19-2010, 08:58 PM
  2. HTML & PHP Form
    By YASANI in forum Programming Help
    Replies: 6
    Last Post: 02-05-2009, 03:52 AM
  3. HTML Form Email
    By bpakidz in forum Programming Help
    Replies: 6
    Last Post: 09-01-2008, 11:55 AM
  4. HTML Form to email?
    By verticalnfinity in forum Programming Help
    Replies: 9
    Last Post: 09-01-2008, 11:36 AM
  5. Problems with Form submitting (HTML/PHP)
    By apulaiset in forum Programming Help
    Replies: 9
    Last Post: 08-27-2008, 07:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers