Skip to content
Advertisement

How to make search button redirect to search results page?

I am a beginner and new to this stuff I have a search form with button type submit I want when I click on that button to open a new window displaying the search results with a url. Please can someone help me with this query ??

php code :

JavaScript

}

jquery code :

JavaScript

Advertisement

Answer

Remove the event.preventDefault(); from your handler, it stops the form submission which is the default behavior for forms.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement