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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape and Firefox(Mozilla) incompatabliity

Status
Not open for further replies.

dermie

Programmer
May 2, 2004
8
IL
The javascript function shown below works fine in Internet Explorer, but not in Netscape or Mozilla (even though I have enabled Java in the browser settings).

Any help??

==========================================
function limitText(limitField, limitCount, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
} else {
limitCount.value = limitNum - limitField.value.length;
}
}
==========================================
 
I suspect it has to do with what you are passing to the function, rather than the function itself. Can you show how you are calling, along with any other relevant information?

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Here is the rest of the relevant code:


<div align="right">Chars left: <input type="text" readonly name="notesCount" size="3" value="<%=(dalService_MaxLen_Notes - Len(serviceAdd_Notes))%>" ID="Text2"/></div>

Do you want the asp code as well? If so here it is:
<%
dalService_MaxLen_Notes = 250
serviceAdd_Notes = ""
%>
 
As I asked before - can you show how you are calling the function. I see no details there where you are calling any function, let alone the one you're after help with.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Sorry, left out some of the code:

<textarea class="form" NAME="textareaNotes" cols="34" rows="5" onKeyDown="limitText(this,this.form.notesCount,<%=dalService_MaxLen_Notes%>);"
onKeyUp="limitText(this,this.form.notesCount,<%=dalService_MaxLen_Notes%>);" ID="Textarea1" &gt;><%=serviceAdd_Notes%></textarea><%If serviceAdd_NotesAlert
Then Response.Write message_strAlertHTML%><br>
<div align="right">Chars left <input type="text" readonly name="notesCount" size="3" value="<%=(dalService_MaxLen_Notes - Len(serviceAdd_Notes))%>" ID="Text2"/></div>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top