• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

code not working in Mozilla Firefox

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My javascript function is workign in internet explorer but not in firefox.
Can anyone provide solution to it
function changeTertiarySearchOption(){
var tertiary = document.getElementById('tertiaryChoice');
if (document.forms[0].secondaryChoice.value=='Affiliate Id'){
tertiary.remove(2);
}
else{
var optn = new Option("Affiliate Id", "Affiliate Id", false, false);
tertiary.options[2] = optn;
}
}
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your select element have an id on it for just a name?

If you view the JavaScript console it should give you a nice little error message.

Eric
 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just do some changes and tested in both IE and FireFox.. now you can handle it in your own way..



hope this help.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
 
Parul Tripathi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Muhammad Saifuddin, thanks for the code, but its not working. I think mozilla is not supporting options codes
 
Parul Tripathi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the jsp code from where javascript function is called



[Eric- Added code tags like Bear already suggested. Please use them! I also disabled smiles]
[ August 05, 2008: Message edited by: Eric Pascarello ]
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

but its not working.



just saying "not working" is not enough, perhaps come up with the error message would helps other ranchers for suggesting you the right solution..

again: for "error message" please check JavaScript Console inside the Tools Menu.
 
reply
    Bookmark Topic Watch Topic
  • New Topic