Trying to hide a map until a value is entered into a search text box
I've created a kind of postcode search where the user enters their postcode and the map display any records from my database, and it works well, however, I want to hide the map with a show if until the postcode text box has content in it.
I created the code for the form, the textfield and the submit button, and I asked the map to use the textfield (called postcode) to display the postcode centre when a search is performed. This is what I have.
<form action="distributor-postcode-map.php" method="post" name="postcodeform" id="postcodeform">
<label for="postcode">Text Field:</label>
<input type="text" name="postcode" id="postcode">
<input type="submit" name="postcodesubmit" id="postcodesubmit" value="Submit">
What I am struggling with is what I use to hide the map until a value has been entered as a search. For example, on another search I have used a session created by DataAssist Search to hide areas of a page when no value is present in the search, but in this instance I am having to do this myself and am struggling to get my head around it.
Do I need to create a session?
If so, what do I create a session from?
Any advice on what I can do and how will be greatly appreciated.