i am designing a contact page for a friend he gave me a templete to use for his site it has a contact page already built in with the following code
<td><form method="post" action="/frms/contactmail.pl">
<input type="hidden" name="SoupermailConf" value="/frms/contact.con">
<table width="100%" border="0" cellpadding="0" align="center" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellpadding="4" cellspacing="1">
<tr>
<td align="Right"><b>Your
Name: <span class="style1">*</span></b></td>
<td width="70%"><input type="TEXT" name="Name" style="width: 90%;">
</td>
</tr>
<tr>
<td align="Right"><b>E-mail
Address: <span class="style1">*</span></b></td>
<td><input type="TEXT" name="Name2" style="width: 90%;"></td>
</tr>
<tr>
<td align="Right"><b>Company:</b></td>
<td><input type="TEXT" name="Name3" style="width: 90%;"></td>
</tr>
<tr>
<td align="Right"><b>How
did you
find us?</b></td>
<td><input type="TEXT" name="Name4" style="width: 90%;"></td>
</tr>
<tr>
<td align="right"><b> Questions: <span class="style1">* </span></b></td>
<td> </td>
</tr>
<tr>
<td colspan="2" align="center"><textarea name="Question" rows="8" style="width: 90%;" wrap="VIRTUAL"></textarea>
</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="Submit" value="Submit Form">
<br>
</td>
</tr>
</table></td>
</tr>
</table>
</form>
I do not see where there is an action or mailto command how do i need to change this to make it email to a specific email address.
Looking at the <form> tag, the specified action is a Perl/CGI script - "/frms/contactmail.pl".
Looking at the hidden field named "SoupermailConf", I'd guess this is using the (VERY old) Perl/CGI script Soupermail.
I would recommend you update to something else (perhaps PHP based) if you (or your friend) can?
But, if you cant then according to the manual a hidden field named Email should do the trick.
<input type="hidden" name="Email" value="someone#your.website" />
After looking at the manul pages for the mailer and some examples for the config.txt file I needed to write to make it work.
Related
Current display
Im working on a asp.net site for work and I need to have inputs both text and checkboxes. My current solution is as follows:
<form method="post" style="width:100%">
<table style="padding:5px; width:100%">
<tr>
<td style="white-space:nowrap; width:1%">Printer name:</td>
<td><input type="text" name="PrinterName" value="#Request["PrinterName"]" style="max-width:100%; width:100%" /></td>
</tr>
<tr>
<td style="white-space:nowrap">Model:</td>
<td><input type="text" name="Model" value="#Request["Model"]" style="max-width:100%; width:100%" /></td>
</tr>
<tr>
<td style="white-space:nowrap">Location:</td>
<td><input type="text" name="Location" value="#Request[" Location"]" style="max-width:100%; width:100%" /></td>
</tr>
<tr>
<td style="white-space:nowrap">IP:</td>
<td>
<table style="margin:0px; padding:0px">
<tr>
<td style="padding:0px"><input type="text" name="IP" value="#Request["IP"]" style="max-width:100%; width:100%" /></td>
<td style="white-space:nowrap;width:1%">
<div><input style="margin:0px; padding:0px" type="checkbox" />QuickIP</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="white-space:nowrap">MAC(XX-XX-XX-XX-XX-XX):</td>
<td><input type="text" name="MAC" value="#Request["MAC"]" style="max-width:100%; width:100%" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Submit" class="Sumbit" style="max-width:100%; width:100%" /></td>
</tr>
</table>
</form>
The checkbox is not reporting the correct size(IE and Chrome) and the text is not being kept inside of the space either.
The aim is to have the text directly beside the checkbox, and both fo those being in line as small as possible to the right of the text input. How would i achieve that without this strange bug ?
Edit: in my testing i had switched the textbox and the button as wel las added a height in the style of the checkbox, those have been corrected now
Edit2: Added in a picture of what shows up right now
It seems you just need to remove height: 1% from
<td style="white-space:nowrap;width:1%">
<!-- remove the height from the style below -->
<div><input style="margin:0px; padding:0px; height:1%" type="checkbox" />QuickIP</div>
</td>
This will render the checkbox next to the "QuickIP" text
Take a look at this codepen.
I have following simple HTML form:
<html>
<head>
</head>
<body>
<table border="0" cellpadding="2" cellspacing="0" width="400">
<form name="logon" method="post" id="logon" action="take.php">
<tr>
<td tabindex="0">User ID </td>
<td>
<input name="login" maxlength="12" size="15" value="" title="User ID">
</td>
<td class="loginlabel"> </td>
</tr>
<tr>
<td tabindex="0">Password </td>
<td>
<input type="password" name="password" maxlength="12" size="15" value="">
</td>
<td class="lable"> </td>
</tr>
<tr>
<td colspan="3">
<p class="pushButton"><button type="submit" form="nameform" value="Submit">Submit</button></p>
</td>
</tr>
</form>
</table>
</body>
</html>
When I open this page in any browser and inspect element, I found weird structure of the HTML form. I found <form> tag immediately closed after start,
please find the screen shot of html form inspection,
What is the reason behind this?
In HTML, when you open a tag within another tag, the tag you open (in your case the <form> tag) gets clsoed when its parent gets closed.
Therefore (for example):
<p><form></p>
<p></form></p>
will result in the following:
<p><form></form></p>
<p></p>
This is because, according to the W3C (which sets international standards on HTML among other things), the only context a form element can be used in is where flow content can be expected. Flow content are most elements that are used in the body of documents and applications, for example:
The solution to this is to place the form tags above that of the table, encasing the table in the form as below:
<form>
<table>
</table>
</form>
To clarify:
You need to be sure that the table is inside the form tags. See a complete example as working below:
<html>
<head>
</head>
<body>
<form name="logon" method="post" id="logon" action="take.php">
<table border="0" cellpadding="2" cellspacing="0" width="400">
<tr>
<td tabindex="0">User ID </td>
<td>
<input name="login" maxlength="12" size="15" value="" title="User ID">
</td>
<td class="loginlabel"> </td>
</tr>
<tr>
<td tabindex="0">Password </td>
<td>
<input type="password" name="password" maxlength="12" size="15" value="">
</td>
<td class="lable"> </td>
</tr>
<tr>
<td colspan="3">
<p class="pushButton">
<button type="submit" form="nameform" value="Submit">Submit</button>
</p>
</td>
</tr>
</table>
</form>
</body>
</html>
Using the inspect function in Chrome proves that the output to the browser shows the table nested inside of the form tags:
Feel free to ask any further questions.
Move the table tags inside of the form also:
<form name="logon" method="post" id="logon" action="take.php">
<table border="0" cellpadding="2" cellspacing="0" width="400">
<tr>
<td tabindex="0">User ID </td>
<td>
<input name="login" maxlength="12" size="15" value="" title="User ID">
</td>
<td class="loginlabel"> </td>
</tr>
<tr>
<td tabindex="0">Password </td>
<td>
<input type="password" name="password" maxlength="12" size="15" value="">
</td>
<td class="lable"> </td>
</tr>
<tr>
<td colspan="3">
<p class="pushButton"><button type="submit" form="nameform" value="Submit">Submit</button></p>
</td>
</tr>
</table>
</form>
The reason for this could just be that the form is unsure why there are tr tags without a table tag within it. It seems a strange limitation however maybe somebody else can clarify further.
you have this:
<table border="0" cellpadding="2" cellspacing="0" width="400">
<form name="logon" method="post" id="logon" action="take.php">
You need to declare first the form and then the table
<form name="logon" method="post" id="logon" action="take.php">
<table border="0" cellpadding="2" cellspacing="0" width="400">
<tr>
<td tabindex="0">User ID </td>
<td>
<input name="login" maxlength="12" size="15" value="" title="User ID">
</td>
<td class="loginlabel"> </td>
</tr>
<tr>
<td tabindex="0">Password </td>
<td>
<input type="password" name="password" maxlength="12" size="15" value="">
</td>
<td class="lable"> </td>
</tr>
<tr>
<td colspan="3">
<p class="pushButton"><button type="submit" form="nameform" value="Submit">Submit</button></p>
</td>
</tr>
On this Mistar website I'm trying to make a request from an iOS app using NSURLSession that loads the website above in the background, passes two strings for username and password into the <input>'s and then lets me access the logged in page.
Here's the relevant HTML, it's a table with two input forms, pin which is a username and then the password:
<div class="widgetbdy" style="border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;">
<table border="0" cellpadding="2" cellspacing="0" class="txtin3" style="width:100%; border-collapse: collapse">
<tbody><tr style="height:10px;">
<td colspan="2" style="height:10px;"></td>
</tr>
<tr style="padding-top:4px;">
<td align="right" style="width:30%;">
<b><label for="ID" id="lblID">ID</label>:</b>
</td>
<td align="left">
<input class="txtin" id="Pin" name="Pin" onfocus="clearmessages()" style="width:175px;" type="text" value="">
</td>
</tr>
<tr>
<td align="right" style="width:30%;">
<b><label for="Password" id="lblPassword">Password</label>:</b>
</td>
<td align="left">
<input class="txtin" id="Password" name="Password" onfocus="clearmessages()" style="width:175px;" type="password" value="">
</td>
</tr>
<tr>
<td id="loginerrormsg" align="center" colspan="2">
<img id="imgwait" src="./Student Portal_files/ajax-loader.gif" width="20" height="20" alt="" style="display:none;">
<div id="msg1" style="display: none;" class="error"><label for="idandpasswordrequired" id="lblidandpasswordrequired">ID and Password Required</label></div>
<div id="msgdisplay" style="display: none;">
<div id="msgmessage" style="text-align:center; padding-bottom:10px;" class="error"></div>
</div>
</td>
</tr>
<tr>
<td align="right" colspan="2">
<input id="LoginButton" style="visibility: visible" type="button" value="Log In">
</td>
</tr>
<tr style="height:10px;">
<td colspan="2" style="height:10px;"></td>
</tr>
</tbody></table>
</div>
You can do this by creating offscreen UIWebView and little javascript that fill required field and execute form submit.
Or another way, if site not so hard implemented you can make POST request to auth URL directly without html form
I want to indent the text "Did you forget your username instead" to the position where the text "username" is.
Screenshot of what it looks like and you'll understand what I mean:
</td>
</tr></tbody></table><table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFBF00">
<tbody><tr>
</tr><tr>
<form id="form1" method="post" action="checklogin.php"></form>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D8D8D8">
<tbody><tr>
<td colspan="3"><strong>
</strong></td>
</tr>
<tr>
<td colspan="3"><strong>Forgot your password? </strong></td>
</tr>
<tr>
<td width="78">Username</td>
<td width="6">:</td>
<td width="294"><input name="myusername" type="text" id="myusername"></td>
</tr>
<tr>
</tr>
<tr>
<td> </td>
<td> </td>
<td>Did you forget <a href=http://www.google.com>your username</a> instead? <br></br>
<input type="submit" name="Submit" value="Submit">
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
</div></body></html>
I believe you are looking for colspan
Remove the two columns before the 'Did you forget...' column like this:
Here is an example: http://jsfiddle.net/nKx3U/
<tr>
<td colspan="3">Did you forget <a href=http://www.google.com>your username</a> instead? <br></br>
<input type="submit" name="Submit" value="Submit">
</tr>
I am also not sure if a table is the best option for this.
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="38%" id="AutoNumber1" background="bg.jpg" height="177">
<tr>
<FORM onkeydown=highlight(event) onkeyup=highlight(event)
onclick=highlight(event) name=f
action=http://www.example.com/products/scripts/tpd.php method=GET> ( How to This Link hide )
<input type="hidden" name="key" value="tpd12"/>
<DIV align=center>
<td width="58%" height="3"> </td>
<td width="42%" height="3"> </td>
</tr>
<tr>
<td width="58%" height="15">
<p align="right"><b><font color="#C0C0C0"><br>
<br>
<br>
</font></b></td>
<td width="42%" height="15"><b><font color="#C0C0C0"><br>
<br>
</font></b></td>
</tr>
<tr>
<td width="58%" height="50">
<p align="right"><font color="#C0C0C0"><b>Phone #</b></font></td>
<td width="42%" height="50"><b><font color="#C0C0C0"> </font></b>
<input type="hidden" name="searchby" value="Phone"/>
<input type="hidden" name="city" value="xyz"/>
<input type="text" name="entry" size="12"></td>
</tr>
<tr>
<td width="58%" height="106"> </td>
<td width="42%" height="106" valign="top">
<input type="submit" value="Search" name="search"></td>
</tr>
</table>
Example Images
image code #1: www.koolfree.com/ImageUpload/uploads/1264733802.jpg
code preview result #2: www.koolfree.com/ImageUpload/uploads/1264722405.jpg
Plz help me how to set this script
thanks in advance
You need to add quotes around the parameter values.
Change
<FORM onkeydown=highlight(event) onkeyup=highlight(event) onclick=highlight(event) name=f action=http://www.example.com/products/scripts/tpd.php method=GET>
To
<FORM onkeydown="highlight(event)" onkeyup="highlight(event)" onclick"highlight(event)" name="f" action="http://www.example.com/products/scripts/tpd.php" method="GET">
It would be simple to use an HTML validator rather asking others for help.
You can use javascript (jquery comes to mind) to bind all kinds of events to almost any DOM element, and in my opinion it'll generate cleaner code to if you don't use the onclick, onkeydown, etc. calls in the HTML, but rather put all of that in a js file and just bind event handlers with functions to the FORM element.
Makes sense?