Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: html code needed

  1. #1
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default html code needed

    Hi i was wondering is there any way that i can have a text field that when some one types in a stock market code for e.g. google = GOOG it goes to that page which is goog.html

    Please Help

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    <form action="" onsubmit="this.action=this.elements[0].value.toLowerCase()+".html";return true;">
      <input type="text">
      <input type="submit" value="Go">
    </form>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi that code is not working i have setted it up to test it at http://www.queerfm.net/stock/test.html and i typed in the following goog i also set up a page in the same file called goog.html however it does not work it only brings up this http://www.queerfm.net/stock/test.html?

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Whoops, sorry, I used double quotes inside double quotes.
    Code:
    onsubmit="this.action=this.elements[0].value.toLowerCase()+'.html';return true;"
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    got one more Question how do i make go to another folder like www.queerfm.net/stockwatch/goog.html

    Ill be setting up hosting for the domainname http://www.queerfmstocks.com

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Are you going to list every stock quote avaliable?

    It would seem to me to be easier (if you are NOT) to use a form with a drop down menu, or check boxes for the stocks you ARE listing, let the visitor choose from your selections, instead of entering their own.

    For many reasons,

    first, you can set each to go to a specific URL
    second, you don't have to use redirect, worry about typos and error pages, etc

    and you make it simple on the user, they can choose from a list instead of looking up the stock name and coming back to your site, etc..
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    onsubmit="this.action='stockwatch/'+this.elements[0].value.toLowerCase()+'.html';return true;"
    BLiZZaRD is correct, though.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    well the way we are doing it is both ways i need this code for people to use our website on there desktop.

    Also the drop down box we are doing the demo site called BETA 0.0.1 will be up and running soon it will only have the home page.

    But you will be able to see what we are doing.

  9. #9
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    oh and that code works great thank i was tring to figgr it out and i could not work it out now i get it

  10. #10
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    one last think is there away i can get it to do this lets say they type in google it takes them to goog.html

    also if they type something like yah and i don't have that code that it takes them to a contact page so they can contact me.?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •