WEB Quick JS Writeup?

Discussion in 'OT Technology' started by Coaxsist, Oct 23, 2009.

  1. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    I don't know a single command of JS, and if someone who does could write one up when they get a chance that would be sweet.

    After clicking a submit button, wait for 1 to 2 seconds before refreshing the page.

    I thought about putting together code I've already gotten offa teh interwebz, but I really have no idea what I'm doing in JS and it'd be messy...

    Thanks. :wiggle:
     
  2. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,650
    Likes Received:
    15
    Location:
    Atlanta
    You need to add a name to the form.
     
  3. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    Thanks, sorry for late ass reply, I'll implement and come back with results...
     
  4. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    Aight, I'm back.

    I don't have a "weener.php", to process the form. Any site recommendations for a free one? What about php.resourceindex.com? phpform.net? I gotta go to class now... :hsd:

    Right now, my form is generated using JS. Once I get this "weener" script you speak of Josh, I'll download the HTML from Wufoo and plug everything in.

    Lotsa copy pasting... I love web development... :wiggle:
     
  5. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    It's just a simple contact form generated from Wufoo. Name, email, comment. I had it set up using a script from Wufoo so that when it was submitted, the entry would be sent to my e-mail. If I got a free "weener.php" script, I couldn't just specify where to send it by typing in an email address or something?
     
  6. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,848
    Likes Received:
    4
    Location:
    md
    It's really as simple as something like
    Code:
    <?php
    $message = '
    Name: '. $_POST['name'].'
    E-Mail '. $_POST['email'].'
    Comments: '.$_POST['comments'];
    
    mail([email protected]','Your Subject Line',$message);
    
    
    ?>
    
    Where each $_POST['variable_name'] is the varbiable name in the name="" field on your form.

    Granted if you have some radio buttons/checkboxes, that's a little bit more work, but still not much. Then below that PHP, after the ?> add your normal HTML code that thanks them for submitting the form if you want.
     
  7. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    Damn, that is simple. I was reading up on PHP on w3 schools the other night, and this looks like childs work... I've GOT to learn that language... Silly question: The code you gave me wont generate a form on its own right? I assume it wont because it calls from the HTML.
     
  8. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,848
    Likes Received:
    4
    Location:
    md
    Right, that just receives the post values from your pre-existing HTML form
     
  9. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    :rofl::rofl: sorry thats just too funny.
     
  10. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    Nothing goes after $message? And this needs to be in a separate .php file in my root folder on my webspace I think right?
     
  11. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    I noticed this... oh well. :o I'm having a mad hard time getting this.
     

Share This Page