SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I have a question about Javascript.

    Hello.
    I need help with JavaScript enabled.
    My job so that I can automatically send button to be pushed faster.
    I use google chrome.

    For example;
    Automatically have form filling add-ons. (Autofill), but only to fill the send button will not print.
    How can I do this automatically?

    Button codes;
    <input type='submit' name='post_shout' value='Shout' class='button' />

    Google Chrome address bar: javascript: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx what I need to write here?

    Can I do it after 1-2 seconds and fill out?

    Many thanks in advance.
    (My English is poor)

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,702
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    If you know of a certain form field that starts off empty but then becomes autofilled, you can check against that every 200 milliseconds.

    For example with this sample form:

    HTML Code:
    <form id="identifierOfForm">
        <input type="text" name="nameOfField">
        <input type="submit" value="Do something">
    </form>
    Code javascript:
    setInterval(function () {
        var form = document.getElementById('identifierOfForm');
        if (form.elements.nameOfField.value > '') {
            form.submit;
        }
    }, 200);

    You need to consider though that you might get in trouble for this type of automated behaviour.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •