rofans91
rofans91

Reputation: 3010

HTML Page Keeps Repeating After Form Submission

I have a PHP page that contained the following HTML elements.

<div id="templatemo_banner" onClick="parent.location='../index.php'">
    <div id="logo"></div>
</div>

<div id="templatemo_menu_search">
    <div id="templatemo_menu">
      <?php include("../template/menu.php"); ?>     
    </div> <!-- end of menu -->

    <div id="search_section">
        <form action="#" method="get">
            <input type="text" value="Enter keyword here..." name="q" size="10" id="searchfield" title="searchfield" onfocus="clearText(this)" onblur="clearText(this)" />
          <input type="submit" name="Search" value="Search" alt="Search" id="searchbutton" title="Search" />
        </form>
    </div> 

    <div class="cleaner"></div> 
</div>

In the respective CSS file:

#templatemo_banner {
width: 960px;
height: 288px;
margin: 0 auto;
    background: url(images/templatemo_banner_bg.jpg) no-repeat;
border-bottom: 5px solid #cfd389;
}

#templatemo_banner #logo {
float: left;
margin: 100px 0 0 80px;
width: 673px;
height: 128px;
background: url(images/templatemo_logo.jpg) no-repeat;
}

#templatemo_menu_search {
clear: both;
width: 960px;
height: 50px;
background: url(images/templatemo_menu_bg.jpg) no-repeat;   
}

#templatemo_menu {
float: left;
width: 650px;
height: 50px;
}

#templatemo_menu ul {
margin: 0px;
padding: 0px;
list-style: none;
}

#templatemo_menu ul li {
display: inline;
}

#templatemo_menu ul li a {
float: left;
display: block;
padding: 0 30px;
height: 35px;
padding-top: 18px;
text-align: center;
font-size: 12px;
text-align: center;
text-decoration: none;
color: #333333; 
font-weight: bold;
outline: none;
 }

#templatemo_menu li a:hover, #templatemo_menu li .current {
color: #ffffff;
background: url(images/templatemo_menu_hover.jpg) no-repeat;    
}

I face this problem where the aforementioned html elements repeated itself once after I perform the form submission. You can picture it as if after I have my banner and menu there is an extra banner and menu below the original set. Anyway the extra elements disappear after I refresh the page.

I will appreciate any advise. I run this code in XAMPP 1.7.7 using Google Chrome as my browser.

Upvotes: 0

Views: 890

Answers (1)

Andreas Nilsson
Andreas Nilsson

Reputation: 231

Remove the hash in the action...

<form action="" method="get">

Upvotes: 1

Related Questions