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 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript Include Only Works on 3 out of 5 Computers

    I have recently launched a new web site that uses javascript to include pages and inventory from another server. The site seems to work 100% for me and most other viewers. However, some viewers are unable to view some of my inventory that is pulled in and I can't seem to figure out why. It has to be something with my structuring. If anyone can help me with this issue I would greatly appreciate it.

    The Following Code Seems to Work With All Viewers

    Code:
    <script language = "javascript" src ="http://sitename.com/?bid=1234&sitenumber=0&tid=general_results&stype=0&kwds=test%20me%20here"></script>
    However This Code Only Seems To Work On About 3 Out of 5 Viewers

    Code:
    <script language="javascript">
    var bid= 1234;
    var site =0;
    document.write('<script language="javascript" src="http://sitename.com/?bid='+bid+'&sitenumber='+site+'&tid=inventory_results&'+ window.location.search.substring(1)+'" />');
    </script>
    </script>
    This doesn't seem to be a browser issue because the viewers who can't see the inventory results are a mix....If anyone can help me with how I might need to structure my code to work for everyone I would greatly appreciate it.

    Thanks

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    There are a few things wrong with the code. Try this:

    Code:
    <script type="text/javascript">
    var bid= 1234;
    var site =0;
    document.write('<script language="javascript" src="http://sitename.com/?bid='+bid+'&sitenumber='+site+'&tid=inventory_results&'+ window.location.search.substring(1)+'"><\/script>');
    </script>
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Nov 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank You For All Your Help

    I have implemented your code and it works well...However the problem still exist on certain computers.

    I have however narrowed the problem down to what seems to be Norton Internet Security systems blocking the content...So Stupid.

    Is it even possible to write a javascript include from another server so that Norton will not block it...What a pain. This isn't even an add displaying page...simply pulls in inventory from an external server.

    I also see that there are several lawsuits against Norton pending for this same stupid stuff. They are class action suits filed for breaking copyright laws with the sites they are blocking quality content from....maybe some more of us should jump on board.


  •  

    Posting Permissions

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