[Solved] Hyperlink not working on


Why you are keeping 4 submit button inside a form.
Search is the only submit button. Change rest of the button type to button only.

I) And, add onlick="location.href="https://stackoverflow.com/questions/33014996/Your URL"". Like this,

<input type="button" style="background-color: red" value="Login" onclick="location.href="http://localhost/login/";">

II) Add , onclick="javascript:window.open('http://www.facebook.com/', '_blank');"> for opening in new tab.

<input type="button" style="background-color: red" value="Facebook" onclick="javascript:window.open('http://www.facebook.com/', '_blank');">

1) target="_blank" is possible in anchor tag.

2) formtarget="_blank" is possible with submit button.

But, here no need of 4 submit button. For more info, check this Submit Button Form Attribute – W3 Schools

<div class="widget search_key" id="directory_search_location-5">
        <div class="widget-wrap widget-inside">
            <div class="search_nearby_widget what_fld_search">            
                <form style="position:relative;" action="http://localhost/wordpress/" id="searchform" class="searchform_5509 allinone" method="get" name="searchform_5509">
                    <input type="hidden" value="listing" name="post_type">
                    <input type="hidden" value="all" name="mkey[]">
                    <input type="text" size="100" placeholder="Looking For ..." class="searchpost placeholder" id="search_near-15100" name="s" value="" onkeypress="tmpl_insta_search_widget('searchform_5509')" onclick="tmpl_insta_search_widget('searchform_5509')">

                    <input type="hidden" value="a18247a9c8" name="t">
                    <input type="hidden" value="OR" class="sgo" name="relation">
                    <input type="submit" style="background-color: red" value="Search" onclick="tmpl_find_click(15100);" class="sgo">
                    <input type="button" style="background-color: red" value="Register" onclick="javascript:window.open('http://localhost/register/', '_blank');">
                    <input type="button" style="background-color: red" value="Login" onclick="javascript:window.open('http://localhost/login/', '_blank');">
                    <input type="button" style="background-color: red" value="Facebook" onclick="javascript:window.open('http://www.facebook.com/', '_blank');">
                </form>
            </div>
        </div>
</div>

If you really want to go to login,register, facebook page..
Give like this.

<a href="https://stackoverflow.com/questions/33014996/Your URL Here">
    <input type="button" value="Login">
</a>

8

solved Hyperlink not working on