I got some help a while ago to make something that searches for images on google with a preset size. Now I want to know if it would be possible to change this HTML5 so that you can type in your own size to use instead of a preset one. So if I type 54 in a text box labeled width and 10 in one labeled height, I would only get results with images that have a width of 54 and a height of 10.
<form action="https://www.google.com/search" method="get">
<input name="tbm" value="isch" type="hidden">
<input name="tbs" value="isz:ex,iszw:10328,iszh:7760" type="hidden">
<input name="q" size="35" type="text" placeholder="zelda">
<input type="submit" value="Find 10K images">
</form>
<script>
function addSpecs() {
document.getElementsByName("tbs")[0].value =
"isz:ex,iszw:"
+ document.getElementById("w").value
+ ",iszh:"
+ document.getElementById("h").value;
}
</script>
<form action="//www.google.com/search" method="get">
<input type="hidden" name="tbm" value="isch" />
<input type="hidden" name="tbs" value="" />
w: <input type="text" id="w" /><br />
h: <input type="text" id="h" /><br />
<input type="text" name="q" size="35" /><br />
<input type="submit" value="Find images" onclick="addSpecs();" />
</form>
Related
Create a DIV with an attribute of data-cc-digits. It should contain four INPUT text fields, each with a size of 4 and a placeholder of ---- (4 dashes).
Code checker says: "You need to create the specified INPUT elements within the data-cc-digits DIV"
It does not specify if I should use maxlength or minlength to clamp the input.
<div data-cc-digits="">
<input type="text" size="4" placeholder="----">
<input type="text" size="4" placeholder="----">
<input type="text" size="4" placeholder="----">
<input type="text" size="4" placeholder="----">
</div>
You should show more codes. But, it appears you will get the same error if your data-cc-digits inputs are wrong and if your data-cc-info inputs are wrong.
Try this:
<div data-cc-digits>
<input type="text" size="4" placeholder="----" />
<input type="text" size="4" placeholder="----" />
<input type="text" size="4" placeholder="----" />
<input type="text" size="4" placeholder="----" />
</div>
<div data-cc-info>
<input type="text" size="20" placeholder="Name Surname" />
<input type="text" size="6" placeholder="MM/YY" />
</div>
I have a form. Right now it has one action and simply just submits the inputs to URL. I would like it to be modified where when the form is completed the inputs are saved to a file and then submitted to the URL.
<form class="snp-subscribeform snp_subscribeform" action="join.cgi" method="post">
<input name="page" type="hidden" value="1" />
<div>
<input id="snp-firstname" class="snp-field snp-field-firstname " name="firstname" required="" type="text" value="" placeholder="Enter Your First Name" />
<input id="snp-lastname" class="snp-field snp-field-lastname " name="lastname" required="" type="text" value="" placeholder="Enter Your Last Name" />
<input id="snp_email" class="snp-field snp-field-email" name="email" type="text" placeholder="Enter Your Email " />
<input id="snp-password" class="snp-field snp-field-password " name="password" required="" type="text" value="" placeholder="Select A Password" />
</div>
<div>
<input class="snp-subscribe-button snp-submit" type="submit" value="CONTINUE" data-loading="Creating Account!" data-success="Account Created!" />
</div>
</form>
</div>
You would need to use javascript and the onclick event for the submit button to retrieve the values from the DOM elements you are interested in and save them to the file.
Here is a sample of how to get started:
<input type="submit" name="submit" value="Save" onclick="writedata()" />
<script>
function writeData() {
}
</script>
Hi I have problem with open thankyoupage in new tab. How I can fix it please ? Because When I use iframe plugin that I must use it only open in iframe window. THANKS
I have this HTML code :
<div id="sideOpt">
<form method="post" name="email" action="http://www.gogvo.com/subscribe.php">
<div>
<input id="sideInput" type="email" name="Email" onblur="javascript: if(this.value==''){this.value='Vložte Vaši Emailovou Adresu';}" onfocus="javascript:this.value=''" value="Vložte Vaši Emailovou Adresu" title="Vložte Vaši Emailovou Adresu">
<input id="sideSend" type="submit" value="">
</div>
<div>
<input type="hidden" name="Campaign" value="8e89d34ffa27" />
<input type="hidden" name="AffiliateName" value="ErikPiovarci" />
<input type="hidden" name="ThankyouPage" value="http://www.simplemoneysystem.cz/rs/APkKib" />
<input type="hidden" name="OptIn" value="" />
<input type="hidden" name="FirstName" value="Odběratel">
<input type="hidden" name="AL" value="1">
<input type="hidden" name="LS" value="10">
</div>
</form>
Add target="_blank" to your form tag.
<form method="post" name="email" target="_blank" action="http://www.gogvo.com/subscribe.php">
I have a superfish menu containing two forms, a search box in superfish tab 1 and a newsletter signup in tab 3. The search form works fine, and the newsletter signup works fine so long as the search form isn't present on the page. But when both are present, the submit button on the newsletter signup form appears to try and submit a search instead, which not only doesn't sign the user up for the newsletter, but it doesn't search for anything either.
My code goes like this:
<form class="search-form" action="/search/node" method="post" id="search-form" accept-charset="UTF-8"><div><div class="container-inline form-wrapper" id="edit-basic"><div class="form-item form-type-textfield form-item-keys">
<input type="text" id="edit-keys" name="keys" value="" size="20" placeholder=" Search this site" maxlength="255" class="form-text" />
</div>
<input type="submit" id="edit-submit" name="op" value="Go" class="form-submit" /></div><input type="hidden" name="form_build_id" value="form--JTbYKjZwG8SjIstLVU7J0HOiZZiSoB88bE4VoRYTG4" />
<input type="hidden" name="form_token" value="HoVlLGidOtcgITb3XmNhvH7mKKzW8ldmnahr3t0HGAU" />
<input type="hidden" name="form_id" value="search_form" />
<many other divs>
<form class="webform-client-form" enctype="multipart/form-data" action="/content/newsletter-signup" method="post" id="webform-client-form-22" accept-charset="UTF-8"><div>
<div class="form-item webform-component webform-component-email webform-container-inline" id="webform-component-email">
<input class="email form-text form-email required" type="email" id="edit-submitted-email" placeholder="Email address" name="submitted[email]" size="24" />
</div>
<div class="form-item webform-component webform-component-textfield webform-container-inline" id="webform-component-name">
<input type="text" id="edit-submitted-name" name="submitted[name]" value="" placeholder="Name" size="14" maxlength="128" class="form-text required" /> <input type="submit" id="edit-submit" name="op" value="Submit" class="form-submit" />
</div>
<input type="hidden" name="details[sid]" value="" />
<input type="hidden" name="details[page_num]" value="1" />
<input type="hidden" name="details[page_count]" value="1" />
<input type="hidden" name="details[finished]" value="0" />
<input type="hidden" name="form_build_id" value="form-I8MgMoURjB6BhqJATKhhNZ5nAUwk855bGWgxH75Gs5Q" />
<input type="hidden" name="form_token" value="IKALClB6fmkRPFA6Ko8VIbBN2uDEwpVBxFM6w2_2JAo" />
<input type="hidden" name="form_id" value="webform_client_form_22" />
</div></form>
How can I get the submit button on the second (newsletter signup) form to submit that form and not the search?
I need to have two step submission form which accepts multiple images to be uploaded to server. The problem here is I need to have some temporary hidden inputs for storing values from the first step to acquire more info in the second step before the actual submission.
Take a look the following codes.
This is for example, the first step:
<form action="" enctype="multipart/form-data" method="post">
<input type="hidden" name="step" value="1" />
Name: <input name="name" value="" type="text" />
Email: <input name="email" value="" type="text" />
Image 1: <input type="file" name="images[]" />
Image 2: <input type="file" name="images[]" />
<input type="submit" value="Submit" />
</form>
The following will be the second step:
<form action="" enctype="multipart/form-data" method="post">
<input type="hidden" name="step" value="2" />
<input name="name" value="<?=$_POST['name'];?>" type="hidden" />
<input name="email" value="<?=$_POST['email'];?>" type="hidden" />
<!-- Here is the problem, how should I store the submitted images for the time being? -->
<input type="file" name="images[]" />
<input type="file" name="images[]" />
<!-- ... -->
Please select a type:
<select name="type">
<option>Type 1</option>
<option>Type 2</option>
</select>
<input type="submit" value="Submit" />
</form>
Please note that this code is just for the sake of clarification and is by no means the actual code.
They should be stored in $_FILES I think. You can also use move_uploaded_file() for storing the files temporarly. See: php-manual