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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help with autosubmitting to a javascriptted page

    Hi,
    I am trying to write a cgi-bin
    script to submit a keyword
    to a page(written in javascript)
    I thought that the http field at
    the top of the browser would show
    the entire string that is POSTed.
    But, since this page is written in
    javascript, nothing appears in
    the "http" field after I "submit"
    the keyword (except the original link)
    Then after a while, the results appear.
    I want my script to automatically
    download this page and save the result
    locally.
    How do I "submit" a "keyword" field to a javascript, from a cgi-bin perl script?

    thanks for any help!

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm, I'm not totally sure if I know what you are asking....but if you want to access from data from javascript, you need to use the GET method for your forms...not POST

  • #3
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    okay,
    sorry to confuse you.
    Here's what I am doing

    in my cgi-bin dir. I am writing
    a script "geturl.pl".
    This script is automatically
    trying to get a webpage,
    say "www.something.com", that
    has a form which requires you to
    enter a keyword.
    I want to provide the keyword thru
    my script, by doing a
    open_http("blah.com/something?=keyword")
    or something similar.
    however, when I manually enter a
    keyword at the page (www.something.com) I am trying to access,
    in the browser in the Location field, the
    text doesn't reflect the keyword, when I hit
    the submit button.
    So, for instance, this current page:
    http://www.codingforums.com/newreply...&threadid=4498

    has a whole bunch of "?","&","=" characters
    but my target page simply shows the result of
    the keyword search.The Location field :"http"
    doesn't change.
    It's as though you entered:

    www.codingforums.com

    Search: mysearchword.

    the results are returned, but
    the "Location" field still would show
    www.codingforums.com

    So, I am at a loss as to how to construct a
    appropriate string to supply to the "open_http"
    to provide the keyword automatically.

    maybe this is too confusing.
    well, thanks anyways.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what beetle said ... change the method from "POST" to "GET" and then it will show in the url


  •  

    Posting Permissions

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