Jump to content

Search button to display results below


Recommended Posts

I have a search page that has two ways of searching, and  I inserted a search button in the first section so that you don't have to scroll all the way to the bottom.  

With the new feature of showing search results below the search form, the default button (at the very bottom) functions properly, but the search button I put in does not work.  I don't know how to alter the code.  Any suggestions on how to alter this so that my search button will comply with the datapage setting to show results below the search form?  

Here is my javascript:

IN THE HEADER:

<script>
document.getElementById("second-button").addEventListener("click", resubmit);

function resubmit() {
document.getElementById("caspioform").submit();
}
</script>

<h1><span style="color:#008000;"><img alt="" src="[@app:LatitudeLogo/]" style="float: left; width: 100px; height: 41px; margin: 1px;" />SECONDARY DATABASE</span></h1>

<h1 style="text-align: center;"><span style="color:#0000FF;"><span style="font-size:36px;"><strong>ULTRAMARINE UNIT SEARCH PAGE</strong></span></span></h1>
 

IN THE HTML BLOCK that creates/positions the button:

<div class="top-button">
<button type="button" class="cbSubmitButton" id="second-button">SEARCH</button>
</div>

 

IN THE FOOTER:

<script>
document.getElementById("second-button").addEventListener("click", resubmit);

function resubmit() {
document.getElementById("caspioform").submit();
}
</script>

----------------------------------------------------------------------------

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...