Hello,
I've got a basic inputtable text field on a site that I'm developing. Basically, it's for a domain search, so people enter a domain. I then want (once submitted, pressed go) the person to be redirected to a domain provider, such as 1&1, uk-cheapest, that doesn't really matter at the moment. I could easily make the "Go!" button redirect to a domain provider, but I want the criteria entered to be submitted to the domain provider.
How can this be done?
Thanks.
It really depends on the service you are going to redirect to. Some websites use a query string (in the url: ?domain=domain.com) but most of them use a POST request. Some sites may allow to submit the form remotely although that can also be disabled. You could try this:
<form name="domaincheckform" method="post" action="http://www.uk-cheapest.co.uk/domain-search.php">
<input type="text" name="domain2" size="20" maxlength="45" />
<input type="hidden" name="ref2" size="14" maxlength="45" value="" />
</form>
It's basically a stripped down version of their own form and you can style it yourself.
(2011-06-05, 11:21 AM)Aries-Belgium Wrote: [ -> ]It really depends on the service you are going to redirect to. Some websites use a query string (in the url: ?domain=domain.com) but most of them use a POST request. Some sites may allow to submit the form remotely although that can also be disabled. You could try this:
<form name="domaincheckform" method="post" action="http://www.uk-cheapest.co.uk/domain-search.php">
<input type="text" name="domain2" size="20" maxlength="45" />
<input type="hidden" name="ref2" size="14" maxlength="45" value="" />
</form>
It's basically a stripped down version of their own form and you can style it yourself.
Thanks.
1: What would I need to do to have some default text in the box? For example 'enter domain here'.
2: How could I add a 'Go' button to the right of the text box that, once clicked, does the same as hitting enter?
This is what I had in the screenshot:
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<br>
<tr>
<td width="78%" height="26"><input name="textfield" type="text" class="black10" value="http://typedomainhere.com" size="28"></td>
<td width="22%"><a href="http://test.com"><input name="imageField" type="image" src="images/go.jpg" width="28" height="22" border="0"></a></td>
</tr>
</table></td>
</tr>
<form name="domaincheckform" method="post" action="http://www.uk-cheapest.co.uk/domain-search.php">
<input type="text" name="domain2" size="20" maxlength="45" value="Enter domain here" />
<input type="hidden" name="ref2" size="14" maxlength="45" value="" />
<input name="imageField" type="image" src="images/go.jpg" width="28" height="22" border="0" />
</form>
Try this:
<td><form name="domaincheckform" method="post" action="http://www.uk-cheapest.co.uk/domain-search.php"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<input type="hidden" name="ref2" size="14" maxlength="45" value="" />
<br>
<tr>
<td width="78%" height="26"><input type="text" name="domain2" size="20" maxlength="45" value="Enter a domain here" onfocus="this.value= '';" /></td>
<td width="22%"><a href="http://test.com"><input name="imageField" type="image" src="images/go.jpg" width="28" height="22" border="0" /></a></td>
</tr>
</table></form></td>