How to close modal window after submit button? - html

I have modal window with pure css. When I click submit button, my modal window does not disappear. How can I hide my modal window? Here is my code. Here is CSS and HTML code. Do you have any ideas?
<div class="banner-content text-center" >
<br/><br/>
ORDER
<div id="open-modal" class="modal-window" id="modal-window">
<div>
Close
<h1>Contact Form</h1>
<div>
<div class="container">
<form name="contactform" method="post">
<input type="text" id="fname" name="first_name" >
<input type="text" id="lname" name="email">
<input type="text" id="phone" name="phone" >
<textarea id="subject" name="subject" style="height:150px"></textarea>
<input type="submit" name="submit" id="submit" value="Send">
</form>
</div>
</div>
</div>
</div>
</div>

Using Bootstrap - try this:
$('#submit').submit(function(e) {
e.preventDefault();
$('#IDModal').modal('hide');
return false;
});
Also - I don't see a button type. I would recommend switching <input type="submit" name="submit" id="submit" value="Send"> to < <button type="submit" name="submit" id="submit" value="Send">.
Let me know your results!

Related

HTML/CSS How do i remove the button icon

How do I remove the bottom left icon from the button to search.
<form action="search.php" method="POST">
<input type="text" id="search" name="search" placeholder="Search something..." required>
<div id="close-icon"></div>
<button type="submit" name="submit-search"></button>
</form>
here is the html
Are you just trying to hide the tiny button on the bottom left? If so, this should sort you out!
<form action="search.php" method="POST">
<input type="text" id="search" name="search" placeholder="Search something..." required>
<div id="close-icon"></div>
<button type="submit" name="submit-search" style="display:none"></button>
</form>
You can also do this in css using the following:
<style>
.display-none { display:none; }
</style>
<form action="search.php" method="POST">
<input type="text" id="search" name="search" placeholder="Search something..." required>
<div id="close-icon"></div>
<button type="submit" name="submit-search" class="display-none"></button>
</form>

In HTML, why cant i move to new_url after clicking the login button. For the code given below

<div class="login">
<form action="/new_url" method="POST">
<input type="text" placeholder="username" name="user"><br>
<input type="password" placeholder="password" name="password"><br>
<input type="button" value="Login">
input class is declared.
the problem is the even though the button is clickable,i cant get it to open new_url.
You forgot to mention input type submit.
try below code
<div class="login">
<form action="/new_url" method="POST">
<input type="text" placeholder="username" name="user"><br>
<input type="password" placeholder="password" name="password"><br>
<input type="submit" value="Login">
</form>
</div>
Use <input type="submit" value="Login">
instead of
<input type="button" value="Login">
You just need to add one more input value
<input type="Submit" value="login">

Contact.php issue. The button submit doesn't do anything

When I enter the email and click on Submit. Nothing happens.
Thanks for your help.
Please find the html code.
<form method="post" action="contact.php" name="contactform" id="contactform">
<fieldset>
<label for="email" accesskey="E"></label>
<input name="email" type="text" id="email" size="30" value="" placeholder="Please enter your email address" />
<button type="submit" class="submit btn btn-custom" id="submit" value="Submit">
<i class="fa fa-envelope"></i>
Subscribe
</button>
</fieldset>
</form>
<div class="tex-center">
<div id="message"></div>
</div>
Try using <input type="submit" class="submit btn btn-custom" id="submit" value="Submit"> instead.

Click on the form button doesnt work with an open keyboard

The form button "comment" isn't working. Clicks are useless with an open keyboard.
Does anyone know why is this happening? The form is inside a modal bootstrap3.
HTML:
<form onsubmit="_gaq.push(['_trackEvent', 'Message', 'send']);return Message.send(this);" id="messageForm">
<input type="hidden" value="25" id="conversation_id" name="conversation_id">
<input type="hidden" value="2014-04-08 08:04:50" id="last_message_date" name="last_message_date">
<div id="messages_feedback_Div"></div><!-- id="messages_feedback_Div" -->
<fieldset>
<div class="control-group">
<label for="message_body" class="control-label">Nuevo mensaje</label>
<div class="controls">
<textarea placeholder="Introduce aquĆ­ tu comentario" class="form-control" rows="2" id="message_body" name="message_body" autofocus="autofocus"></textarea>
</div>
</div>
<div class="controls">
<button value="Send" name="_message_send" class="btn" type="submit">Comentar</button>
</div>
</fieldset>
</form>

Submit Button not functioning

I was provided a template which I have changed the text. The site displays fine but the only way to submit an email address is if I press Enter on my keyboard.
Clicking the submit button does nothing.
Can someone help?
Below is the html let me know if it is the required part that has the problem.
Thanks!
<label class="hide">Email Address:</label> <input
name="email" value="" class="txt-field"
type="text" /> </form>
</div>
<div class="button-wrap"> <button type="submit"
value="Submit" id="submit" name="cmdSubmit"
class="link button"><span>Get Instant Access</span></button>
</div>
If you are using form then code like this
<label class="hide">Email Address:</label> <input
name="email" value="" class="txt-field"
type="text" /> </form>
</div>
<div class="button-wrap"> <input type="submit"
value="Submit" id="submit" name="cmdSubmit"
class="link button">
<span>Get Instant Access</span></button>
</div>
UPDATE(Sorry for my foolishness and now you can try this one)
<form><label class="hide">Email Address:</label> <input
name="email" value="" class="txt-field"
type="text" /><div class="button-wrap"> <button type="submit"
value="Submit" id="submit" name="cmdSubmit"
class="link button"><span>Get Instant Access</span></button>
</div> </form>