Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple problem 1

Status
Not open for further replies.

TheConeHead

Programmer
Joined
Aug 14, 2002
Messages
2,106
Location
US
what wring with:

<script>
function acodeCheck(field) {
alert(document.getElementByID[field].value);
}
</script>

I get document.getElementByID is null or not an object...

[conehead]
 
the field looks like

<input type="text" id="awphone" name="awphone" value="" size="3" onkeypress="acodeCheck('awphone')">

[conehead]
 
whuh??

try this...

Code:
<input type="text" id="awphone" name="awphone" value="" size="3" onkeypress="acodeCheck(this)">

Code:
<script>
function acodeCheck(field) {
    alert(field.value);
}
</script>



*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
headbang.gif




*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top