0
私はdropwizard-javaプロジェクトに取り組んでいます。ユーザーが購読ボタンをクリックすると、購読していただきありがとうございます。既に登録されているユーザーのポップアップウィンドウを表示するajax関数の書き方は?
私は表示する必要があります。一度クリックすると、すぐに表示されます。登録されたかどうかはポップアップウィンドウで表示されます。私は非常に新しいajaxで作業します。あなたは、次の操作を行うことができ
<form action="/subscribe" method="post" id="forms" >
<p>
<span>
<input name="sent_email" id="mailid" type="text" required pattern="[a-z0-9._-][email protected][a-z0-9.-]+\.[a-z]{2,3}$" placeholder="Enter Your Email ID">
<input type="submit" value="Subscribe">
</span>
</p>
</form>
@SuppressWarnings("resource")
@POST
@Path("subscribe")
public boolean sentEmail(@FormParam("sent_email") String input) throws FileNotFoundException, IOException,
ParseException, java.text.ParseException, ScriptException, NoSuchMethodException {
//Reading json file and checking whether it contains input
if(condition)
{
//Code
return "Already registered";
} else {
//write into file
}
return null;
}