Results 1 to 7 of 7

Thread: <html><input>HELP ME PLEASE</input></html>

  1. #1

    <html><input>HELP ME PLEASE</input></html>

    Hi

    Ok so I'm struggling with <FORMS>-well not the form self, rather the <type="SUBMIT">.

    What happens when you click it(the process)
    My books doesnt say much except that when you click it it submits,what then ->WHERE IS THE FORM SEND FROM THERE, 'casue i have checked out the SOURCE of a few forms(incl. YAHOO and all of them are the same(by that i mean the "submit" and "reset" button), they all are:


    <input type="checkbox" name="survey" value=1 checked> Yahoo!, and survey partners working on behalf of Yahoo!, may contact me to participate in customer satisfaction surveys.</td></tr><tr align=middle><td colspan=2 valign=top>
    <input type=hidden name=from_url value="">
    <input type=submit name=send value="Send">
    <input type=submit name=reset value="Reset">
    </td></tr>
    </table>
    </form>

    -*How do i direct it to a E-MAIL address????
    -*How can i set it to when submit is clicked it foes to another page(should i use <a href> before<input>->but wont that f..ck the form up????

    so how does it work?????

    @ the moment my FORM is all done and finished, but when i click the submit it seems to just load the same form again, and that kinda sucks.

    Thank you for viewing this post.
    Damn where would i be without you

    Cheers
    *****

  2. #2
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    Where is your form declaration? That is the most important part...

    The answer to your question of what happens when you hit submit is, it depends.

    if the METHOD is POST/GET and it directs to a CGI, then it calls the CGI passing the arguments of your form as Environmental variables that can be queried by your script.

    One of the permissible actions is a mailto...what are you trying to do?

    You can also have any button 'act' like a submit button by defining the onClick event and putting the proper javascript as the action to load another page...

    If you can be a little more specific about what you want to do, I can provide some more specific information...


    /nebulus

    <EDIT> I probably should have been a little more careful and not necessarily called the variables environmental ones. Depending on what method you chose, they will be passed in different fashions (GET puts the call to the URL all on one line, for example: if you have :

    <form METHOD=GET ACTION=script.cgi>
    <input type=text name=test1>
    <input type=text name=test2>
    <input type=submit name=submit>
    </form>

    If you hit submit, it calls the script.cgi, but you will see it in your webbrowser as:
    sitename/script.cgi?test1=<value>&test2=<value>, where value is whatever you placed in as values in the two text fields. Your CGI script will then have to parse the arguments, of which there are pretty standard libraries to use.

    However, if you use the POST method, the variables will be passed to your script in format of variable = value, each on its own seperate line.

    /nebulus
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  3. #3
    Ok what i want to do is if they clcik submit then FORM is posted to me and they are sent to
    the next page,my book said not much about the GET and POST.

    Ok here is the 1st few lines where my FORM starts.and under the HR is the last few line of my HTML.





    <tr><td colspan="300" align="center"><u>INFORMATION REQUIRED IN RESPECT OF CLOSE CORPORATION</td></tr>
    <tr><td colspan="250">

    <tr><td colspan="75" align="right"><form>1)[b]Name of corporation: <td>A)<input NAME="corperationNAME1" type="text" size="60"></tr></td>

    --------------------------------------

    <tr><td colspan="75" align="right"><input TYPE=submit NAME="Submit" value="Submit"></td><td colspan="150"><input type="reset" value="Reset form"></td></tr>

    </form>

    </table>
    </body>
    </html>

    So how to i use theMAILTO and the HREF in there,with pure HTML-no java

    Thank you for helping me,nebules.

  4. #4
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    You never told it what to do with the FORM...you only have <form>

    You have to tell it what to do when you submit the form and you have to tell it how to do it...

    <FORM METHOD=[POST | GET] ACTION=URL>

    I have found from experience that GET is, at least for me, easier to work with; however, the POST is just as a valid of an option (I prefer when working with things to be able to manipulate input to the CGI buy just modifying the URL versus filling out the form all over again).

    The most important part that you are missing is the ACTION..you are not telling it what to do...since you want it to mail you, you should probably do something along the lines of:

    <FORM ACTION=mailto:username@domain METHOD=POST>

    The thing is, mail is not going to do you much good if you need to access the information entered from the prior form...especially if you aren't doing any checking on the next page to make sure that the form was filled out...

    Hope that at least starts to get you in the right direction...

    /nebulus
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  5. #5
    Yeah, i know that using it for e-mai is not a good idea->but i have not done java scripting,
    so to check it and "munipilate" is kinda out

    Ok let me recap if i want
    my form to email me
    its like this

    <form METHOD="POST" ACTION="mailto:me@domain.co.za">

    but what about "getting" to the next page would it look like this:

    <form METHOD="POST" ACTION="mailto:me@domain.co.za">
    ....
    ....
    .....
    <input TYPE="submit" value"send">


    would that send the FORm to "me@domain.co.za" and then take the user to "nextpage.html"??????...

    CHEERS
    ******

  6. #6
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    Heh, seems things have changed a little bit (or there was a trick) since last I tried to do that...which was like 5 years ago...I think you are pretty much going to have to use javascript or some other scripting language since you are wanting to do more than one thing when you submit the form...

    Either way, it seems that nowadays, this is a very clunky way to do it, and will apparently cause problems:

    I did the following:

    <FORM METHOD=POST ACTION='mailto:youremailaddress' enctype=text/plain onSubmit=javascript:self.open('nextpage.html');>
    <INPUT TYPE=TEXT name=test1>
    <INPUT TYPE=TEXT name=test2>
    <INPUT TYPE=SUBMIT name=submit><INPUT type=reset name=reset>
    </FORM>

    There were two problems though...one, in both IE and Netscape, they open new pages rather than open in existing page...I could have sworn there was functionality to open into the current window...don't remember it off the top of my head though...

    In IE, it kinda sorta warns you that email is being sent on behalf of another program (was kinda creepy of a message), but then will send if there is no interaction...

    In Netscape, it just pops open a blank email page and doesn't have any of the values there...(didn't work)...

    Weird..I know it used to work in both browsers around the 3.0 / 4.0 versions

    Regardless, in either IE or netscape, email is probably not the best way to be processing the information...I seem to remember there was a way to rig the mailto URI to where it didn't pop open a message, but would submit itself immediatley without user input, but it has been so long since I messed with it I really don't remember how I did it...

    /nebulus
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  7. #7

    Lightbulb Suggestion

    From what it sounds like you want the form to be filled out, after being filled out the user gets taken to a confirmation page, then the contents of form gets emailed to someone. I highly recommend using ASP for this sort of thing. It's actually quite easy and powerful to use. Some places I goto for this are http://www.asp101.com or for real basics http://www.w3schools.com . W3 Schools is a great place to learn basics, they have tutorials on quite a few things that I think you'll find quite handy. Hope this helps and good luck!

    PS) If you need any help, PM or email me(jdsegarr@earthlink.net) and I will gladly help you out. I do pages at work that do this exact function all the time.
    And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror. -from The Book of Mozilla, 7:15

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •