Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Greasemonkey and <h3>

    Hello all

    I'm wondering if it is possible for me to read the text in <h3> (there is only 1 <h3>) in the source and input to a text field and submit?

    some tips in were to look would be greatful. I have tried a few things with no luck

    Cheers

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    Code:
    (function() {
      var h3 = document.getElementsByTagName('h3')[0];
      if ( !!h3 ) {
        document.getElementById('some-input').value = h3.innerHTML;
        document.getElementById('form-id').submit();
      }
    })()
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

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