SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Nov 2001
    Location
    RI, USA
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question js works on one server, not another

    I have a basic js that is used to change some images when the user clicks on a link. it worked fine on my server (IIS 4), but when I upload it and the images to another IIS server the images don't display most of the time. I know this is client side -- so why is the server making a difference??

    <script language="javascript" type="text/javascript">

    var p = new Array(2);
    var t = new Array(2);

    p[1] = new Image();
    p[1].src = "images/8x8_grid.gif";
    t[1] = new Image();
    t[1].src = "images/grid.gif";

    p[2] = new Image();
    p[2].src = "images/3x3_hori.gif";
    t[2] = new Image();
    t[2].src = "images/hori.gif";

    function change_image(whichone) {
    thumb.src = t[whichone].src;
    pattern.src = p[whichone].src;
    maintable.background = pattern.src
    }


    </script>

    Here is how I call change_image...

    <A href='javascript:void(0);' onmousedown="change_image('1');return false"><img src="images/btn_13x13.gif" width=13 height=13 border=0></A>

  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    are - and this is a really obvious question - all the images definately in the right relative directory on both servers?

    It might be something to do with loading time otherwise.
    I must say it's most likely to be the relative location and
    files not, maybe, being there.

    It could, but not very likely, be that a server side parser
    or dhandler is causing a request exception for some reason...
    but i VERY much doubt that.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  3. #3
    SitePoint Zealot
    Join Date
    Nov 2001
    Location
    RI, USA
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeha.. the images are all there and appear sometimes -- but rarely.. it's really weird.
    in1.com | Bootply - Bootstrap playground

  4. #4
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is it the mouseover part that doesn't work -
    or the static images that should be there straight away?

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  5. #5
    SitePoint Zealot
    Join Date
    Nov 2001
    Location
    RI, USA
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually it's some of the static images.. one is a background from example.. but sometimes when I refresh it will appear.
    in1.com | Bootply - Bootstrap playground

  6. #6
    SitePoint Zealot
    Join Date
    Nov 2001
    Location
    RI, USA
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    url's

    these might be helpful

    works at..
    http://68.14.142.51/patternstudy/index.asp

    doesn't works at..
    http://iatek.com/iatek/patternstudy/index.asp

    3 images (one is the background of a table) are supposed to change when you click the buttons on the upper left... but only the 'pattern' image in the green bar at the bottom is getting changed.
    in1.com | Bootply - Bootstrap playground

  7. #7
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HOW confuzzlin'

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


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
  •