Closed Thread Icon

Preserved Topic: Submission form (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18141" title="Pages that link to Preserved Topic: Submission form (Page 1 of 1)" rel="nofollow" >Preserved Topic: Submission form <span class="small">(Page 1 of 1)</span>\

 
Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 06-14-2001 05:26

I need to do a form for my website (that I'm still working on). I need to to be able to take a list of one line form fields, number them in order (one through ten), add other details lie name, and email address, wrap the whole thing up and send it to me as an email. Any ideas?

I also want to be able to customise the colours of my form fields, like the Doc has done here on the asylum, through the use of CSS, or what ever it is.

Cheers




In the beginning, there was the word...and the word was 'God', although by the time it reached the other end of the phone line... the word was 'Gznd'

3rdperson
Paranoid (IV) Inmate

From: your subconscious. (scared yet?)
Insane since: May 2001

posted posted 06-14-2001 06:47

threep jumps up and down, crying "ooh! ooh! i can do this! back in a tick!"
and runs away, trying to find the webpage he did this for....

...and returns shortly after:
"ok, now, sending the email is up to your cgi setup etc...
so i'm not going to go there.
ok, wandering over to http://www.royalsunlife.com.au ....
oh, secure area. bugger. never mind.

ok, this is the important bit i have:

quote:
for(i=10;i<(itemNo+10);i++) {

if(thisForm.elements[i].value!="")

{

mail += thisForm.elements[i].name + ": "

mail += thisForm.elements[i].value

mail += "\n"

}

}


ok, now... for a bit of background, i had earlier: "thisForm = document.myForm" ; to save some time in writing, and i=10 because i wanted to start doing this exercise from the 10th element in the form.
itemNo is the number of items that i had to look at here, but this could normally be found dynamically with a varible like:
"(thisForm.elements.length - 1)" or maybe 2, if we realise that the submit button is a form element.
"mail" is that variable that i send to my cgi friend, what i have to do is write a new form with values like recient, mail and subject, and it does all that jazz for me.
for the form element:
<input type=text name="TPDEssProtec-YRT302" value="" size="3" maxlength="3" >
thisForm.elements[i].name is "TPDEssProtec-YRT302";
and thisForm.elements[i].value is whatever they have in the box.
naturally, this is when i equals whatever element this element is.

my only last bit of advice is that "\n" is new line, and "\t" is tab.

i'm not sure how much you already know, so i don't know what else i should've explained.
feel free to ask away.

if you want the form to look pretty, go investigate stylesheets: http://www.westciv.com/style_master/academy/hands_on_tutorial/index.html

hope this helps."



[This message has been edited by 3rdperson (edited 06-14-2001).]

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 06-14-2001 14:30

Hands On Tutorial? Should that be copyrighted?




In the beginning, there was the word...and the word was 'God', although by the time it reached the other end of the phone line... the word was 'Gznd'

arlechinu
Bipolar (III) Inmate

From: dunno, really dunno anymore...
Insane since: May 2001

posted posted 06-14-2001 15:19

listen, here's the code I used 4 the form on my page,
but it doesn't work
could it be something wrong with the CGI stuff?
I really have no clue about CGI...
Help me out if you can, please.

__________________________
<div id="sendform" style="position:absolute; left:555px; top:77px; width:288px; height:269px; z-index:4; visibility: hidden">
<form name="essai" method="post" action="http://www.chez.libertysurf.fr/bin/sendform">
<p><font face="Arial, Helvetica, sans-serif" color="#FFFFFF"><b><font size="3">Send
me your opinions:</font></b></font><br>
<font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><b><font size="2">Your
name</font></b></font>
<input type="text" name="name">
<br>
<b><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="2">Your
e-mail </font></b>
<input type="text" name="email">
<br>
<textarea name="comments" rows="6" ></textarea>
<font color="#FFFFFF"><b> <font face="Arial, Helvetica, sans-serif" size="2">Your
comments </font></b></font><br>
<input type=submit value="Send">
<input type=reset value="Reset">
<input type=hidden name=TO value= "arlechinu@hotmail.com">
<input type=hidden name=SUBJECT value="Sent form from www.chez.com/arlechinu">
<input type=hidden name=SUCCESS value="http://www.chez.com/arlechinu/index.htm">
<font size="3"><b><font color="#FFFFFF"><a href="#" onClick="MM_showHideLayers('sendform','','hide')">Cancel
</a></font></b></font>
</form>
</div>
__________________________
this thing here seems to be the problem: action="http://www.chez.libertysurf.fr/bin/sendform
when I click the send button, the URL above seems to lock up
and the " action="http://www.chez.libertysurf.fr/bin/sendform " was the one the ISP told me to use
maybe it's the CGI setup that I missed somewhere...
I dunno...
Help!

Arlechinu's...

« BackwardsOnwards »

Show Forum Drop Down Menu