Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need some help... confusing me.

    I have a slight problem. I put my logo on top of the page and linked it with my url. Below the logo i have a search form. Problem is when you click on the search text field it automatically goes to main page. Somehow the text field is linked with my url.. Please help me out:

    Code:
    <body>
    <div align="center">
    <div class="header">
    <div class="logo">
    <h1><a href="http://mysite.com/"><img src="logo.png" /></h1>
    <div class="searchHolder">
    <div class="left"><form action="search.php" method="get" id="mainform" name="myform">
    <input type="text" name="search" class="searchInput" id="searchtext" value="Search here..." />
    <input type="submit" class="searchButton" value="" />
    So mysite.com shows when i mouse over the search text field and when i press to type in the field it automatically refreshes to mainpage.. How do i do it so that clicking on text field does not refresh page??

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello donkon,
    It appears you do not close your anchor. You should have a </a> before that closing tag for your heading.

    See the links in my signature line about validation. They will help you find little typos like this.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oh wow thank you, this was driving me nuts lol


  •  

    Posting Permissions

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