Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question NS/IE Dropdown - Help making it FireFox compatible

    Hi, I have a script programmed by a buddy of mine, and truth be told I dont know a lot about JS, this dropdown menu only works for IE/NS, as it was programmed that way. However, I believe use of the getElementById function(statement?) should allow for compatability between the 3 browsers, however I am not sure how to go about implementing it (My buddy never commented his code) normally, I would just make a new one, but the people using this script just want it edited

    This is the URL to the page containing the script(It is just an html copy of the original ignore the rest other than the menu):

    http://www.chars-web.com/ticketsys/main.html

    Any help would be appreciated,and if anyone needs clarification, feel free to ask

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    It is always much difficult to debug/rebuild someone else's code than to build your own

    Yes a crossbrowser code (for all the modern browsers) uses getElementById('id') instead of document.all[id_or_name] (old IE) and document.layers[id_or_name] (old NS4).

    But you still need to detect Mozilla, as Moz uses NS's methods to capture the events. And all the values regarding the position must have measurement units (px usually).

    My advice is to google for a similar but modern code, as to debug that will take you too much time.0
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, I thank you for your suggestion, however the owner of the game will only accept an edited version of this script =/ and I spent a few hours trying to do it to no avail Perhaps someone else might be able to help me out, but once again, I thank you for your input

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by DespondentSoul View Post
    Yes, I thank you for your suggestion, however the owner of the game will only accept an edited version of this script
    that is weird and silly of than owner... It does not matter which script code is used, as long as the result is the same. javascript is a modular and dynamic language. The same result might be achieved in different ways.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah, i remade it in CSS and he said "Just edit that one with getElementById" Odd person, I know, but alas, there is no changing his mind

  • #6
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I hate to sound like I'm mooching, but I was kinda hoping for a bit more of a response, possibly by other members with tips/suggestions on the code itself.

    Dont get me wrong, I apprecciate whats been suggested already, and I understand your time is valuable, so If no one else has anymore suggestions, I have no complaints, and won't say anything else on this topic. No worries


    Also, on a different note, I love these forums, a lot of interesting stuff to read, Suprised I didnt find it sooner, I'll be around for a while I think.

  • #7
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    You asked for something which does not exists. If we will modify the code to be crossbrowser, that new code will be another code. If it will be another code, the "owner" will not like it. As I said, it is not only a matter to use getElementById(), there are more other things to be changed there. If the owner does not understand that, than it means he does not know javascript. If he does not know javascript, then he should leave people who know javascript to do this job.

    I don't know how other pople here might think, but I can not make this code to be cross-browser unles I would change it almost entirely. In fact I would have build an entirely new code. But your owner does not like that... So, what to do?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #8
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You know what, you are entirely right, My apologies, If someone wanted to redesign that script for me, that would be great. If not i'm sure I could find and edit something for it, and if they have any problems, then they can deal with what they have, I'm sorry If I came across in any way negatively, also, I think I'm going to click that helpful users link in your signature, as you did help me and I appreciate it immensley


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •