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

java script on MAC

Status
Not open for further replies.

arravalli12

Programmer
May 3, 2005
62
US
I have a java script which works good on IE in windows but does not work in MAC.
I checked the preference on IE in Mac and scripts are enabled but does not give any error messages when appication is run.
Any idea what could be the problem?
 
I had that problem in the past, IE will take and use sloppy code, where on the Mac it won't. Post your code.
 
I had a javascript function that I used on change in text box.
<input name="txtNum<%= intRecID %>" type="text" onChange="if (parseInt(this.value) != tempHolder) RecUpdate('<%=intRecID %>');" value=<%=FAMILY_CDE%> size="3" maxlength="3" onfocus="tempHolder = parseInt(this.value);">

Now what I noticed is if you make some change in the text box and hit enter key - It will not show any error messages on Mac but shows on windows.
If you make changes in text box and click update button instead of enter key - it shows error messages.
That means in Mac - onChange is recognised only when it loses the focus.
I may have to add code on click event in update button to change the focus either to hidden field?
Any idea let me know.
thanks
 
Surely if error messages are being given, that points to an error in your code, not a compatibility problem with event handlers?

How about you post your JS code as well as your client-side HTML source?

Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Get your code working in Fireforx for Windows. Then it will work in Firefox for the Mac. Once it works with Firefox for the Mac, you can remind your users that Microsoft stopped developing IE for the Mac over 12 months ago... there will never ever be any more IE for the Mac... and so it's probably time they found a (more supported) browser into the future.

I'd be m ore worried about Firefox and even Safari (MacOSX) that I ever would about IE for the Mac (nowadays at least).

Cheers,
Jeff

PS: The onchange fires when the contents of an element change. This distinction is left up to the browser -- and as such it will variy from browser to browser. I suggest using onkeyup instead... and it will work for all browsers the same way.


[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top