Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

javascript on older version of pocketpc

Avatar of mmichrin
mmichrin asked on
JavaScriptSmartphone Programming
5 Comments1 Solution400 ViewsLast Modified:
I am trying to write a javascript that zeros out input fields when a button is pressed.  This code works fine in my development system, but when I try to hit the site from pocket PC (Version 4.20.0), I get an error indicating:
Microsoft JScript runtime error
Line 3: Character: 0
Error: Object doesn't support this property or method
Source: (null)

I have tried many variations, but I believe I may be having problems because the level of DOM supported is 3.02.  Can anyone give me pointers on how to make this script work on this version of DOM?

Sorry, updating the pocket PC version is not an option... :(
<script type="text/javascript">
function zeroit(doc){
    doc.all['form1:tableEx2:0:text5'].value="0";
    doc.all['form1:tableEx2:1:text5'].value="0";
    doc.all['form1:tableEx2:2:text5'].value="0";
    doc.all['form1:tableEx2:3:text5'].value="0";
    doc.all['form1:tableEx2:4:text5'].value="0";
    doc.all['form1:tableEx2:5:text5'].value="0";
    doc.all['form1:tableEx2:6:text5'].value="0";
    doc.all['form1:tableEx2:7:text5'].value="0";
    doc.all['form1:tableEx2:8:text5'].value="0";
    doc.all['form1:tableEx2:9:text5'].value="0";
    doc.all['form1:tableEx2:10:text5'].value="0";
    doc.all['form1:tableEx2:11:text5'].value="0";
    doc.all['form1:tableEx2:12:text5'].value="0";
    doc.all['form1:tableEx2:13:text5'].value="0";
    doc.all['form1:tableEx2:14:text5'].value="0";
}
</script>
 
<hx:commandExButton type="submit" value="Fill with zeros" styleClass="largeCommandExButton" id="button1" onclick="zeroit(this.document)" ></hx:commandExButton>
ASKER CERTIFIED SOLUTION
Avatar of mmichrin
mmichrin

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answers