Welcome Guest, Not a member yet? Register   Sign In
Search button
#1

Hi coders,



it is possible to search from db that the button search is out of form? ex. below

Code:
<form action="search_found" id="form" method="post" name="form">

    <img id="close" src="<?php echo base_url();?>img/close.png" onclick ="div_hide()">
    <br/>
    <p>Search Found <span class = "glyphicon glyphicon-share-alt"></span></p>
    <br/>
    <input class="form-control" name="name" placeholder="Barcode" type="text"><br/>
    <input class="form-control" name="email" placeholder="Description" type="text"><br/>
    <p>Old Price</p>
    <input class="form-control" name="email" placeholder="Cost" type="text"><br/>
    <input class="form-control" name="email" placeholder="Cash" type="text"><br/>
    <input class="form-control" name="email" placeholder="Card" type="text"><br/>
    <p>Promo Price</p>
    <input class="form-control" name="email" placeholder="Cost" type="text"><br/>
    <input class="form-control" name="email" placeholder="SRP" type="text"><br/>
    <a href="javascript:%20check_empty()" id="submit">Save</a>
</form>

<input type="text" name = "barcode_found" class="form-control"  placeholder="Barcode" autofocus style = "width:229px;>
<button type="submit" class="btn btn-xlarge btn-primary"  id="popup" onclick="div_show()"> Search </button>
Reply
#2

If I remember correctly, no. When you click the button, nothing will happen because the form won't post. But you can have two or more submit buttons in your form.

Here's a short answer on how. http://stackoverflow.com/questions/18318...ent-action

And here's a longer article on how. http://www.techrepublic.com/article/hand...-with-php/

I hope that helps. Good luck!
Reply
#3

You can submit the form via JavaScript.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB