Results 1 to 2 of 2

Thread: Opening links through search box

  1. #1
    Join Date
    Jul 2012

    Opening links through search box

    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)

    	<title>SMK | Welcome</title>
    	<link rel="stylesheet" type="text/css" href="css/content.css">
    	<link rel="stylesheet" type="text/css" href="css/main.css">
    			Shift My Knob | Welcome
    		<div class="img-searchBox">
    			<img src="images/searchBox.png">
    		<div class="img-mainBar">
    			<img src="images/mainBar.png">	
    <!--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)
    	return false;
    <form action="" method="get" onsubmit="return goTo()">
    	<label for="url">		
    	<input id="search" type="text" name="search" value="search" size="30" onFocus="this.value=''">
    		<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>-->
    Last edited by ecarter202; 10-14-2012 at 02:25 AM.

  2. #2
    Join Date
    Oct 2012

    resolved Java script

    Is my java script enabled. Can someone else enable it for me please.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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