Setting Textbox Value In Url

Discussion in 'Web Design and Development' started by SChaput, Mar 11, 2010.

  1. SChaput macrumors regular

    Joined:
    Jul 2, 2008
    Location:
    United States
    #1
    I am using a program called AutoIT to manipulate windows to do certain things.

    I have it open a URL that ends with users.jsp. On that page there is a textbox that i want to put some value in, by default. I know that when i am using PHP i can do things like users".jsp?username=XXXXXXX"

    Is there anyway i am able to occupy that textbox with the information i want?
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Why not have the text field set with a default value from the start,
    HTML:
    <input type="text" value="default value" />
     
  3. SChaput thread starter macrumors regular

    Joined:
    Jul 2, 2008
    Location:
    United States
    #3
    Unfortunately, the website i am trying to manipulate is not my own, so i am unable to change the initial value.
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    If it's not in your control, you can't control how it behaves. Just think of all the malicious things hackers could do to you if that were possible.
     
  5. jpyc7 macrumors 6502

    Joined:
    Mar 8, 2009
    Location:
    Denver, CO
    #5
    Just reading the description of the AutoIT software, it sure sounds possible. It says that it can automate key strokes. With many browsers, hitting the "TAB" key will move the focus to a different part of a screen. So if the number of "TAB" presses is constant, then you automate that key stroke to reach the text box and then automate the text you want in that box.

    Their website has a forum, so if you haven't already you should probably ask your question there.
     
  6. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    Based on the last person's post I'm thinking I misunderstood what the OP was after. I was under the impression you wanted a default value placed in the field for visitors to the site. Though, now it sounds like you only want this to happen for you in your browser. Would that be correct? If so, there are some options, such as browsers using autofill. Firefox has an addon, iMacros, that can autofill information as well as the GreaseMonkey addon (Safari has GreaseKit). This is also doable with AppleScript, though is more of a pain, but there are some threads around here that discuss it.

    Sorry if I was being dense before on what you were wanting. I don't know what AutoIT is so that wasn't a clue for me.
     
  7. SChaput thread starter macrumors regular

    Joined:
    Jul 2, 2008
    Location:
    United States
    #7
    No problem at all, I probably should have explained myself in more detail and given a background of the program i was using.

    Yes as someone stated i figured out the command to send multiple Tab keystrokes to the browser and then send value. The only drawback to that is the code only works on a browser set up exactly like mine, same buttons and attachments, if there are more or less then the tab sequence will not work correctly.

    But i guess for now this is a very doable solution.

    Thanks for you help!
     

Share This Page