...

View Full Version : Need help with emailform



giggle8ds
11-14-2008, 03:45 PM
I have my email form all set up on my page with no problems. I am trying to get a text message in the box that they fill in and I would like to have a random text message each time the page loads. I can get one text message if I put value= but can not get any random text to work. I am pretty new at this so all help would be appriciated. thank you

abduraooft
11-14-2008, 03:56 PM
Can we have your code to see what you've done so far?
(Please wrap your codes by
tags while posting here.)

tosbourn
11-14-2008, 04:02 PM
This would need to be done with some Javascript or some server side language.

1. Create array of possible outputs (or grab them from a database)
2. Select on random one (a random number between 0 and arraylength-1 should do it!)
3. Put it in as the value.

giggle8ds
11-14-2008, 04:02 PM
<code>
<html>
<head>
</p>
<p class="storyheadline">Vote for who you think is the best </p>


<p>
<span><form name="Vote" method="post" action="http://community.cnhi.com/formmail2.php" enctype="multipart/form-data">
<input name="redirect" value="http://www.angelfire.com/giggle8dsvote/index.html" type="hidden">
<input name="recipient" value="giggle8ds@hotmail.com" type="hidden">
<input name="subject" value="Vote - Submission" type="hidden">
<input name="require" value="Name, email" type="hidden">

<br><br>
<table align="center" width="400" cellpadding="5" cellspacing="5" border="0">
<tr>
<td valign="middle" align="left">
Singer
</td>
<td valign="middle" align="center">
<input name="Singer"
<SELECT
NAME="size"

<OPTION VALUE=""></SELECT>

</td>
</tr>
<tr>
<td valign="middle" align="left">
TV Star
</td>
<td valign="middle" align="center">
<input name="TV Star" size="35" maxlength="30" type="text">
</td>
</tr>
Other
<br>
<input name="New Group 2" size="35" maxlength="30" type="text">
</td>
<td valign="bottom" align="center">
<br><br>
<br>
<br>
<input name="New Group 2 Submission" size="35" maxlength="30" type="text">
</td>
</tr>
<tr>
<td valign="bottom" align="left">
<br><br>
Other
<br>
<input name="New Group 1" size="35" maxlength="30" type="text">
</td>
<td valign="bottom" align="center">
<br><br>
<br>
<br>
<input name="New Group 1 Submission" size="35" maxlength="30" type="text">
</td>
</tr>
<tr>
<td valign="middle" align="left">
<br><br>
<b>Your Name</b>
</td>
<td valign="middle" align="center">
<br><br>
<input name="Name" size="35" maxlength="30" type="text">
</td>
</tr>
<tr>
<td valign="middle" align="left">
<br><br>
<b>Your Email</b>
</td>
<td valign="middle" align="center">
<br><br>
<input name="email" size="35" maxlength="30" type="text">
</td>
</tr>
</table>
<br><br>
<center>
<input name="Submit" value="Submit" type="submit">
<input name="Reset" value="Reset" type="reset">
</center>
<br><br></span></p>

</body>
</html>
</code>

giggle8ds
11-14-2008, 04:15 PM
the following is a code that I got from the internet to try out but it did not work when I put it in to my code. I have tried the section <OPTION VALUE="the following code"> and in the type="the following code" still dont work and dont know that I am doing wrong

<SCRIPT LANGUAGE="Javascript"><!--


function text() {
};

text = new text();
number = 0;

// textArray
text[number++] = "Random text string 1."
text[number++] = "Random text string 2."
text[number++] = "Random text string 3."
text[number++] = "Random text string 4."
text[number++] = "Random text string 5."
// keep adding items here...

increment = Math.floor(Math.random() * number);

document.write(text[increment]);

//--></SCRIPT>




function getMessage() {
// create array of murphy laws
var ar = new Array(20)
ar[0] = "Nothing is as easy as it looks."
ar[1] = "Everything takes longer than you think."
ar[2] = "Anything that can go wrong will go wrong."
ar[3] = "If there is a possibility of several things going wrong, the one that will cause the most damage will be the one to go wrong."
ar[4] = "If there is a worse time for something to go wrong, it will happen then."

var now = new Date()
var sec = now.getSeconds()
document.random.random.value="Murphy's Law: " + ar[sec % 20]
}
getMessage()



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum