Bit of a noob to web development. I'm trying to get to certain websites by entering "their" identifiers into a search box. For some reason a blank page opens along with the website.
I want the website to open in the same, current window.
Any comments/advice related to this type of processes or doing would be more than greatly appreciated!!! HERE IS THE CODE: (problem lies between "search box" comment)
Code:<html> <title>SMK | Welcome</title> <head> <link rel="stylesheet" type="text/css" href="css/content.css"> <link rel="stylesheet" type="text/css" href="css/main.css"> </head> <body> <h1> Shift My Knob | Welcome </h1> <div class="img-searchBox"> <img src="images/searchBox.png"> </div> <div class="img-mainBar"> <img src="images/mainBar.png"> </div> <!--SEARCH BOX_______________________________________________________________________--> <script type="text/javascript"> var carType = ""; if (carType = "ferrari") { carType = "http://ferrari.com"; } else if (carType = "honda") { carType = "http://honda.com"; } function goTo() { search = window.open(carType) window.open() return false; } </script> <form action="" method="get" onsubmit="return goTo()"> <label for="url"> <input id="search" type="text" name="search" value="search" size="30" onFocus="this.value=''"> </label> <!--________________________________________________________________________________--> <ul id="topnav"> <li id="topnav-1"><a href="sport.html" title="Sport">Sport</a></li> <li id="topnav-2"><a href="tuner.html" title="Tuner">Tuner</a></li> <li id="topnav-3"><a href="muscle.html" title="Muscle">Muscle</a></li> <!--<li id="topnav-4"><a href="home.html" title="Home">Home</a></li>--> </ul> </body> </html>


Reply With Quote

Bookmarks