RonKevinT.Manuela 0 Junior Poster in Training

SO I found a javascript I want to use:

  <script type="text/javascript">
        function FindNext () {
            var str = document.getElementById ("findInput").value;
            if (str == "") {
                alert ("Please enter some text to search!");
                return;
            }

            if (window.find) {        // Firefox, Google Chrome, Safari
                var found = window.find (str);
                if (!found) {
                    alert ("The following text was not found:\n" + str);
                }
            }
            else {
                alert ("Your browser does not support this example!");
            }
        }
    </script>

Everything woks fine when I put it on a certain part of the code:

<body>

    <div id="wrapper">

        <!-- Sidebar -->
        <div id="sidebar-wrapper">
            <ul class="sidebar-nav">
               <?php include("../includes/adminnavbar.php");?>
            </ul>
        </div>

        <!-- Page content -->
        <div id="page-content-wrapper">

            <div class="page-content inset">
                <div id="content" class="container">
                    <div class="row">
                        <div class="col-md-11">


                            <ol class="breadcrumb breadcrumb-arrow">

                                <li><a href="MainPanel.php">Main Panel</a></li>
                                <li class="active"><a href="users.php">Manage Users</a></li>

                            </ol>
                        </div>
                    </div>

                    <div class="row">

                        <div class="col-md-11 area">
                            <div class="col-md-6 content-area">
                                <h4 class="text-center">ID NUMBER</h4>
                            </div>
                            <div class="col-md-2 col-md-offset-1 content-area">
                                <h4 class="text-center">NAME</h4>
                            </div>
                            <div class="col-md-2 col-md-offset-1 content-area">
                                <h4 class="text-center">ACTION</h4>
                            </div>
                        </div>
                    </div>

                 <?php include("../includes/userlist.php");?>
                 <div class="col-md-12 col-md-offset-8 ">



</div>

                    <div class="row">
                        <div class="col-md-2">
                            </br>
                            </br>
                            <a href="add-user.php"><button type="button" class="btn btn-primary btn-lg col-md-offset-1">+ New User</button></a>
                             </br>
                            </br>
                            <a href="MainPanel.php"><button type="button" class="btn btn-primary btn-lg col-md-offset-1">Back</button></a>  
                              <input type="text" id="findInput" placeholder="Enter Name" size="20" /><button class="btn btn-primary btn " onclick="FindNext ();">Find User</button>



                        </div>


                    </div>

                </div>


                </div><!-- content -->

            </div>


        </div><!--page-content-wrapper-->

    </div>

I didnt like the position so I moved it to line 31.and it doesnt work after that

<body>

    <div id="wrapper">

        <!-- Sidebar -->
        <div id="sidebar-wrapper">
            <ul class="sidebar-nav">
               <?php include("../includes/adminnavbar.php");?>
            </ul>
        </div>

        <!-- Page content -->
        <div id="page-content-wrapper">

            <div class="page-content inset">
                <div id="content" class="container">
                    <div class="row">
                        <div class="col-md-11">


                            <ol class="breadcrumb breadcrumb-arrow">

                                <li><a href="MainPanel.php">Main Panel</a></li>
                                <li class="active"><a href="users.php">Manage Users</a></li>

                            </ol>
                        </div>
                    </div>

                    <div class="row">
                     <input type="text" id="findInput" placeholder="Enter Name" size="20" /><button class="btn btn-primary btn " onclick="FindNext ();">Find User</button>
                        <div class="col-md-11 area">
                            <div class="col-md-6 content-area">
                                <h4 class="text-center">ID NUMBER</h4>
                            </div>
                            <div class="col-md-2 col-md-offset-1 content-area">
                                <h4 class="text-center">NAME</h4>
                            </div>
                            <div class="col-md-2 col-md-offset-1 content-area">
                                <h4 class="text-center">ACTION</h4>
                            </div>
                        </div>
                    </div>

                 <?php include("../includes/userlist.php");?>
                 <div class="col-md-12 col-md-offset-8 ">



</div>

                    <div class="row">
                        <div class="col-md-2">
                            </br>
                            </br>
                            <a href="add-user.php"><button type="button" class="btn btn-primary btn-lg col-md-offset-1">+ New User</button></a>
                             </br>
                            </br>
                            <a href="MainPanel.php"><button type="button" class="btn btn-primary btn-lg col-md-offset-1">Back</button></a>  




                        </div>


                    </div>

                </div>


                </div><!-- content -->

            </div>


        </div><!--page-content-wrapper-->

    </div>