Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Accessing HTML Input Field via Code?

$
0
0
Re: Accessing HTML Input Field via Code?
HTML, CSS, JavaScript, Flash
Re: Accessing HTML Input Field via Code?
06/01/2012
12:13:37 PM
3IL0Q7HXG Show this entire thread in new window
Gratar Image based on email address
From:
Rick Strahl
To:
Attachments:
None
Use jQuery for this:

var el = $("#id input[type=text]");

Newer versions of browsers also allow for selection of

var el = document.getElementsBySelector('div input[type=text]');

should also work as long if you're using a recent browser.

+++ Rick ---



Hi All,
I am trying to figure out how to gain access to several input fields located on a vendor's website. The intent is to plug in values for submitting an order. I've done this with success before, but this webpage is more complex than anything I've worked with previously. There is no ID Tag for the input fields. However, the input fields are within DIV tags, and the DIV has an ID Tag. Can I use, or must I use this approach for accessing input fields within a DIV section?

oInputFieldName = o.Document.getElementByID("divisiontagid").inputfieldname

I found the above approach somewhere on the net, but it does not work. Not sure where I'm going wrong.
Also, is any of the above statement case sensative?

TIA,
Steve



Rick Strahl
West Wind Technologies

Making waves on the Web

from Hood River, Oregon
HTML Help Builder

Viewing all articles
Browse latest Browse all 10393

Trending Articles