How implement I'm feeling Lucky in html? - html

I have been trying to implement a form that goes to either normal Google search results or it's first search result. This is what I have tried.
<form action="https://google.com/search">
<input type="text" name="q" class="box">
<br>
<div>
<input type="submit" value="Google Search" class="button">
<input type="submit" value="I'm Feeling Lucky" class="button" formaction="https://google.com/search?&btnI=1">
</div>
</form>
I know for a fact that if I search for let's say "AMD" then the I'm feeling lucky URL should be "https://google.com/search?q=AMD&btnI=1"
However, I am not able to add that "&btn1" at the end of the URL.

It will work fine.
<form action="https://google.com/search">
<input type="text" name="q" class="box">
<br>
<div>
<input type="submit" name="btnK" value="Google Search" class="button">
<input type="submit" name="btnI" value="I am Feeling Lucky" class="button">
</div>
</form>

Use <button type="submit"> instead:
<form action="https://google.com/search">
<input type="text" name="q" class="box">
<br />
<div>
<button type="submit" class="button">Google Search</button>
<button type="submit" name="btnl" value="1" class="button">I'm Feeling Lucky</button>
</div>
</form>

The only thing you have to do is to give the name "btnI" to the input.
<input type="submit" value="I'm feeling lucky" name="btnI">

Related

How to close modal window after submit button?

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!

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.

Bootstrap Loginpage issue

hi all i am try to apply bootstrap css in my mvc application
i want reconstruct this example http://getbootstrap.com/examples/signin/ in my application
i code my login page like
<form id="loginform" method="post" class="form-signin" role="form">
<h3 class="form-signin-heading">Login</h3>
<input type="text" name="user_NA" class="form-control" placeholder="User ID" />
<input type="password" name="user_pwd" class="form-control" placeholder="Password" />
<input type="submit" name="Submit" value="Login" class="btn btn-lg btn-primary btn-block" />
</form>
but i got the output like
i am not done any changes in bootstrap.css
i want tha black header(default). but here shows a button. please someon help me
You can try this..
Fiddle here
<div class="container">
<form class="form-signin" role="form">
<h2 class="form-signin-heading">Please sign in</h2>
<input type="email" class="form-control" placeholder="Email address" required="" autofocus="">
<input type="password" class="form-control" placeholder="Password" required="">
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
</form>
</div>
Good Luck..

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>