SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Hybrid View

  1. #1
    SitePoint Enthusiast appy's Avatar
    Join Date
    Feb 2002
    Location
    UK
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JavaScript popups not working in NN 4.7?

    Hope you can help! I'm OK with the Flash & the PHP but JavaScript is something I have had to muddle my way through. Any suggestions would be appreciated

    I am just finishing a site for a photographer which uses Flash for the interface, PHP to display a number of image thumbnails (4 scripts, depending on the route the visitor has chosen) and then 1 PHP page with lots of JavaScript to open the correct image in a new popup window.

    It all works in the latest versions of NN & IE but the problem is that some of the site owners' clients use older browsers and the JavaScript popups are not working in NN 4.7.

    The address of the developing site is here.

    The JavaScript that I am using is an adaptation of Anarchos' great script.

    Are there fundamental things I am missing regarding NN 4.7 and JavaScript or would my scripting in JavaScript be wrong?

    Thanks in advance

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is the JAVA forum...not the JAVASCRIPT forum. There's a seperate forum for each. Please use that forum in the future as your questions will be answered more quickly.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Enthusiast appy's Avatar
    Join Date
    Feb 2002
    Location
    UK
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apologies, getting my Java and JavaScript mixed up. Now you know I need help!

    Thanks Creole.

  4. #4
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I noticed that you are using this:
    <script src="popup.php" type="text/javascript"></script>

    To reference an external JavaScript. For external javascripts the file names must have an extension of ".js" for them to work correctly. Try changing your file to "popup.js" and see if that corrects the problem. Sometimes IE is more forgiving than NS is so that may be why it is working in IE.

  5. #5
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by requestcode
    I noticed that you are using this:
    <script src="popup.php" type="text/javascript"></script>

    To reference an external JavaScript. For external javascripts the file names must have an extension of ".js" for them to work correctly.
    Actually that's not strictly true - browsers are not meant to care what the extension of an external javascript file is (or a css file for that matter). Some browsers get fussy about the MIME type used for CSS files when they are operating in strict mode (Mozilla does this) but this is unlikely to be an issue unless you are using a doctype to force strict mode, and even then you can specifically send the correct mime type using a PHP header() call.

  6. #6
    SitePoint Enthusiast appy's Avatar
    Join Date
    Feb 2002
    Location
    UK
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the suggestions requestcode and skunk.

    I've tried changing the file extension (and its link) to *.js but I'm afraid it hasn't worked. (I've now replaced it with the original scripts when I first posted.). Any other ideas?

  7. #7
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anarchos's script looks fine. He isnt doing anything that all browsers wouldn't like. I didn't want to search your site for the offending page because I really don't like navigating flash but if you can tell us what you adapted into his script.

    Usually nn4.7 has some serious problems with the navigation of the DOM. If you added any code like document.all or document.getElementById or document.getElementByTagNames then the code will break when you view it using nn4.7

    Just tried to load the site in nn4.7 and it broke before I could even look at it. Stalled on the loading bar. Sorry.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  8. #8
    SitePoint Zealot
    Join Date
    Feb 2002
    Location
    UK
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i had the problem of the page stalling on 'loading' in NN4 as well.
    Installing the latest flash 6 plug-in should 'fix' it.

  9. #9
    SitePoint Enthusiast appy's Avatar
    Join Date
    Feb 2002
    Location
    UK
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all the advice but I'm still scratching my head with this one. I made a temporary test with anarchos' original scripts/files and although it works with NN 6 it doesn't with NN 4.7 and my client is really eager that it is 4.7 compatible. Here's the link to the demo. And for the PHP file with the JavaScript is copied and pasted from here.

    I havent't changed it at all but it still won't work with NN 4.7

    Thanks martm & maelstrom - yeah at the moment it is Flash Player 6 but I have designed it so that at the last minute I can export it all as verion 5 - I didn't want everyone moaning!


Bookmarks

Posting Permissions

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