Hi,

I'm not familiar with the AJAX way of doing this, hence why I'm posting this.

I've got this form that needs to check if the user input is already in the database, if this isn't the case it should disable the submit button and display an error depending on which input isn't found.

eg. client name isn't found...

This is the form:

<form autocomplete="off" action="formaction.php" method="post">
<fieldset>
<legend>Vul Zending</legend>
<p><label for="zending">Zending: </label> <select id="Zending" name="zendingID"><?php echo $zending_block; ?></select></p>
<p><div><label for="klant">Klant: </label> <input name="klant" type="text" size="30" value="" id="inputString" onkeyup="lookup(this.value);" onblur="fill();" /> <input type="button" value="..."></div><div class="suggestionsBox" id="suggestions" style="display: none;"><img src="image/upArrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" /><div class="suggestionList" id="autoSuggestionsList">&nbsp;</div></div></p>
<p><label for="number">Aantal: </label> <input type="number" name="aantal" size="2" /></p>
<p><label for="manden">Manden: </label> <select name="mandenID"><?php echo $manden_block; ?></select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" value="Add" name"checkbox" checked="checked">    <b>Compleet?</b></p>
<p><label for"bestemmeling">Bestemmeling: </label> <div><input name="Best" type="text" size="30" value="" id="inputString2" onkeyup="lookup2(this.value);" onblur="fill2();" />&nbsp;&nbsp;<input type="button" value="..."></div><div class="suggestionsBox2" id="suggestions2" style="display: none;"><img src="image/upArrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" /><div class="suggestionList2" id="autoSuggestionsList2">&nbsp;</div></div></p>
<p class="submit"><input type="submit" value="Voeg Toe"></p>
</fieldset>
</form>

How do I get this to work?

Kind Regards,

Stefan

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.