Results 1 to 6 of 6

Thread: [Javascript] Auto Submit Form

  1. #1
    Join Date
    Feb 2009
    Posts
    73
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default [Javascript] Auto Submit Form

    emm..how to submit forms like :
    Code:
    <form method="POST" action="http://www.iklanads.com/ads/proses.php" enctype="multipart/form-data">
    <input type="hidden" name="judul" value="<?= $title ?>" />
    <input type="hidden" name="category" value="<?= $category ?>" />
    <input type="hidden" name="urlweb" value="<?= $website ?>" />
    <input type="hidden" name="pemasang" value="<?= $name ?>" />
    <input type="hidden" name="deskripsi" value="<?= $description?>" />
    <input type="hidden" name="e_mail" value="<?= $email ?>" />
    <input type="hidden" name="alamat" value="<?= $address ?>" />
    <input type="hidden" name="telpon" value="<?= $phone ?>" />
    <input type="hidden" name="tag" value="<?= $tag ?>" />
    <img width="120" height="30" src="http://www.iklanads.com/button.php" border="1" align="absmiddle" /> <input name="userdigit" type="text" class="isian" size="5" maxlength="5" />
    <input type="submit" name="Submit" value="Submit Ads" />
    </form>
    without clicking the submit button?

    Is it possible to send all the input type to : http://www.iklanads.com/ads/proses.php without forms ?

  2. #2
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    validate the form without click the submit button is possible but i never heard something like this..?

  3. #3
    Join Date
    Nov 2008
    Posts
    58
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Default

    Yes; that is possible. If you want to use JavaScript, create a form with hidden input elements and call form.submit() function.
    An example where php is used to submit a form is explained here:
    submit a form using PHP

  4. #4
    Join Date
    Feb 2009
    Posts
    73
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    if the submit button has a validation function? how about that? is this works?

  5. #5
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    Well what the heck do you mean by 'automatically'? The user, no matter what, MUST trigger some sort of event to submit the form. Also, I dislike this idea. (I say use forms(forms are NEEDED unless you wanna use AJAX or something, also a disliked idea) and a submit button) If you say automatically, first thing that comes to mind which fits your vague description is "Submit the form whenever they finish filling it out." Sadly, I would say that this is quite inefficient. If you could please be more detailed in your description, I'd be glad to help you out! Good luck!

  6. #6
    Join Date
    Feb 2009
    Posts
    73
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by magicyte View Post
    Well what the heck do you mean by 'automatically'? The user, no matter what, MUST trigger some sort of event to submit the form. Also, I dislike this idea. (I say use forms(forms are NEEDED unless you wanna use AJAX or something, also a disliked idea) and a submit button) If you say automatically, first thing that comes to mind which fits your vague description is "Submit the form whenever they finish filling it out." Sadly, I would say that this is quite inefficient. If you could please be more detailed in your description, I'd be glad to help you out! Good luck!
    This idea I used for my project to get my current money on e-banking. So I must input username and password (mine of course, just my secret password on my PC), but there's a trigger on the submit button, if I do click that button, it works

    thanks palz ^^

Bookmarks

Posting Permissions

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