[jawsscripts] Re: DOM assignments in JAWS Scripts

JAWS can assign to object properties, but only one level deep, and not
when you have to index something on the left side of the equal sign.
So for a made-up example, you can not say, let o.prop(3).value = 5.
You can do this though:

let o1 = o.prop(3)
let o1.value = 5

As to your other question, I'm not fully clear on this, but I think
oDoc.id1 is the same as oDoc.getElementByID("id1"), and I think there
are other shortcuts like that.  I may not be fully right about this.

Hth.

On Sat, Jun 20, 2009 at 09:50:51PM -0400, Donald Marang wrote:
Good Evening, 
I have been playing around with manipulating Internet Explorer DOM objects in a 
JAWS script.  I have noticed that JAWS seems to be able to handle only one 
level at a time.  Therefore, I accomplished what I wanted with a series of 
assignments.  I have never programmed DOM objects in an object oriented 
language,  or any other language for that matter.  Is this normal?  Am I doing 
something wrong?  An example is included below of a online DVR Scheduler search 
page.  

; Empty Search page has:  
; testInput search field, "Title & Description" (byTitle) and "Channel"  
(byChannel ) buttons
let oDoc = ieGetCurrentDocument ()
Let sURL = oDoc.url ; Creates the URL of the current page

; JAWS can not seem to assign directly like:
; Let oDoc.forms(0).testInput.value = sProgram

Let oForm = oDoc.forms(0) ; the only form with an edit field and two buttons
Let oButton = oDoc.buttons(0) ; first button, "byTitle"
Let oEditField = oForm.testInput
; Is this the same as:
; Let oEditField = oForm("testInput")
Let oEditField.value = sProgram

Don Marang


__________?
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: