Javascript & local web pages

Discussion in 'Web Design and Development' started by ahixon2112, Feb 21, 2007.

  1. ahixon2112 macrumors newbie

    Joined:
    Feb 21, 2007
    #1
    I'm a ColdFusion developer new to the Mac and I' writing a new application and testing it on the local Apache server on my MacBook Pro, but none of the javascript works on any of the pages served up locally. If I move those same pages to a Windows IIS server everything works perfectly.

    I'm trying from both the Safari browser and Firefox 2 browser and there's not much info on the net that I can find.

    Any ideas?
     
  2. mnkeybsness macrumors 68030

    mnkeybsness

    Joined:
    Jun 25, 2001
    Location:
    Moneyapolis, Minnesota
    #2
    uhhh... there's absolutely no reason why javascript wouldn't work correctly unless the path to the files isn't correct. in safari, check Window > Activity and see if your javascript files are Not Found
     
  3. Muskie macrumors 6502

    Muskie

    Joined:
    Dec 1, 2003
    Location:
    Minneapolis
    #3
    I've just today had some problems with javascript. I've been calling html pages to load into a div tag using javascript, and if I try to test it out locally it doesnt work. However if I put the files up on our serverspace it works just fine. I have no idea what that means or if there is a way around it.
     
  4. JackAxe macrumors 68000

    JackAxe

    Joined:
    Jul 6, 2004
    Location:
    In a cup of orange juice.
    #4
    Iv'e noticed this also, but thought this was normal, mainly because I don't test on my PCs until after I've made sure everything is working on my Macs. :eek:

    It would be nice to test locally.

    <]=)
     
  5. angelneo macrumors 68000

    Joined:
    Jun 13, 2004
    Location:
    afk
    #5
    People, if you want us to troubleshoot javascript problems please post some code sample or post a link to your page containing the code with error. Off the top of my head, I can only think of javascript security errors (crossing domain) but this is a blind guess.
     
  6. ahixon2112 thread starter macrumors newbie

    Joined:
    Feb 21, 2007
    #6
    It's not that the javascript itself doesn't work, it just will not execute if served up locally from OS X Apache web server through one of my locally installed browsers.
     
  7. angelneo macrumors 68000

    Joined:
    Jun 13, 2004
    Location:
    afk
    #7
    Err... we all know that javascript is not dependent on the type of servers used. It's a client-side script. You can even put javascript code as a .html file, double clicking it and it will run (provided the syntax is correct). Your comments doesn't make sense if you say it won't run from an OSX apache server. I am assuming that all your path and syntax are correct.

    If you are saying it won't run on Safari or Firefox, there may be reasons to think about. For example, if you are using one of MS activex components only (such as doing XML request).
     

Share This Page