It's not a secret anymore!*
The moose likes HTML, CSS and JavaScript and the fly likes how to use function javascript key word as an attribute in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to use function javascript key word as an attribute in javascript " Watch "how to use function javascript key word as an attribute in javascript " New topic
Author

how to use function javascript key word as an attribute in javascript

Salil Vverma
Ranch Hand

Joined: Sep 06, 2009
Posts: 253


In a form, we have a drop down by the name function. To make it mandatory for users to select it, I used the following line of code. It is working fine in firefox but not in IE. Can any one suggest me how we can tweak this so that it could be accepted in both firefox and IE.




Regards
Salil Verma
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Is IE giving an error message?

Eric
Salil Vverma
Ranch Hand

Joined: Sep 06, 2009
Posts: 253

yup, it is giving the error message "Error: identified expected" at this section.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
well easiest solution, change the form element name

You can also try to do



Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to use function javascript key word as an attribute in javascript
 
Similar Threads
Prototype delay not working in IE 7 on windows XP
How to copy a image to clipboard in FIREFOX browser using javascript?
Equivalent functions for cell() ros() in firefox?
how can i open save file dialog box in firefox?
Setting the style class of an html component with javascript