Thumbnail popup no longer works

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stevie D

    Thumbnail popup no longer works

    Hi I'm a Javascript newbie

    I'm doing a 'simple' (basically adding pages and changing text in frontpage
    2000) update of a web site for a friend - what I have done 'should not' have
    done anything to the Java script that this site contains and the bits I've
    added work fine. However, having uploaded the changes, and looking at the
    site in I.E. the thumbnail images that already existed in the site don't
    load into a popup window that was designed in JavaScript, but I'm fairly
    sure that they used to. The popup window opens but the image doesn't.

    The thumbnails are arranged in a table.

    I think the following is a sample of the relevant JavaScript.

    **************
    HTML
    **************

    <script language="JavaS cript">
    <!--
    function openWindow(url, name,scroll,wid th,height,top,l eft) {
    popupWin = window.open(url ,name,
    'scrollbars='+s croll+',width=' +width+',height ='+height+',top ='+top+',left=' +
    left)
    }
    file://-->
    </script>

    *************** *
    HTML

    ***************

    <td rowspan="3"><im g name="gallery/doors/doors_r2_c01"
    src="gallery/doors/doors_r2_c01.gi f" width="40" height="250"
    border="0"></td>
    <td colspan="2"><a
    href="javascrip t:openWindow('g allery/doors/1.jpg','1',0,25 0,375,40,320);" ><i
    mg name="gallery/doors/doors_r2_c02" src="gallery/doors/doors_r2_c02.gi f"

    ***************

    The site is http://www.decorativeresins.com/ and the relevant page can be
    found buy clicking on the doors item under the gallery button.

    The thumbnail in the example is the one in the top left hand corner of the
    table.

    Any suggestions on how I can fix this.

    Thanks in advance.


  • Lee

    #2
    Re: Thumbnail popup no longer works

    Stevie D said:[color=blue]
    >
    >Hi I'm a Javascript newbie
    >
    >I'm doing a 'simple' (basically adding pages and changing text in frontpage
    >2000) update of a web site for a friend - what I have done 'should not' have
    >done anything to the Java script that this site contains and the bits I've
    >added work fine. However, having uploaded the changes, and looking at the
    >site in I.E. the thumbnail images that already existed in the site don't
    >load into a popup window that was designed in JavaScript, but I'm fairly
    >sure that they used to. The popup window opens but the image doesn't.[/color]
    [color=blue]
    >The site is http://www.decorativeresins.com/ and the relevant page can be
    >found buy clicking on the doors item under the gallery button.[/color]

    It looks to me like you must have mangled the directory structure.
    The select menu to the left side of the home page can't find the
    "Picture Gallery" page at all.
    It tries to load "http://www.decorativer esins.com/picture.html",
    which doesn't exist.

    That's a real problem because there is no "Gallery" button if you
    visit with a browser other than Internet Explorer.

    Clicking the thumbnail attempts to open "gallery/doors/1.jpg".
    There's no image at that location, or at "/gallery/doors/1.jpg".

    Also note that there's no link to the home page from the "doors"
    page, although there is a button labeled "Home". That button is
    just a pulldown menu with links to "site map" and "contact us".
    That pulldown menu also happens to pull down under the "QUICK FIND"
    selection box, so you can't read the labels.

    Comment

    • Richard Cornford

      #3
      Re: Thumbnail popup no longer works

      Stevie D wrote:
      <snip>[color=blue]
      > ... changing text in frontpage 2000)[/color]

      Ouch!

      <snip>[color=blue]
      > <script language="JavaS cript">
      > <!--
      > function openWindow(url, name,scroll,wid th,height,top,l eft) {
      > popupWin = window.open(url ,name,
      > 'scrollbars='+s croll+',width=' +width+',height ='+height+',
      > top='+top+',lef t='+ left)
      > }
      > file://-->[/color]
      ^^^^^
      In addition to what Lee said, you might ask yourself what that syntax
      error is doing there.

      <snip>

      Richard.


      Comment

      • Stevie D

        #4
        Re: Thumbnail popup no longer works

        Thanks Lee.

        "Lee" <REM0VElbspamtr ap@cox.net> wrote in message
        news:d844i8020k u@drn.newsguy.c om...[color=blue]
        > Stevie D said:[color=green]
        > >
        > >Hi I'm a Javascript newbie
        > >
        > >I'm doing a 'simple' (basically adding pages and changing text in[/color][/color]
        frontpage[color=blue][color=green]
        > >2000) update of a web site for a friend - what I have done 'should not'[/color][/color]
        have[color=blue][color=green]
        > >done anything to the Java script that this site contains and the bits[/color][/color]
        I've[color=blue][color=green]
        > >added work fine. However, having uploaded the changes, and looking at the
        > >site in I.E. the thumbnail images that already existed in the site don't
        > >load into a popup window that was designed in JavaScript, but I'm fairly
        > >sure that they used to. The popup window opens but the image doesn't.[/color]
        >[color=green]
        > >The site is http://www.decorativeresins.com/ and the relevant page can be
        > >found buy clicking on the doors item under the gallery button.[/color]
        >
        > It looks to me like you must have mangled the directory structure.
        > The select menu to the left side of the home page can't find the
        > "Picture Gallery" page at all.
        > It tries to load "http://www.decorativer esins.com/picture.html",
        > which doesn't exist.
        >
        > That's a real problem because there is no "Gallery" button if you
        > visit with a browser other than Internet Explorer.
        >
        > Clicking the thumbnail attempts to open "gallery/doors/1.jpg".
        > There's no image at that location, or at "/gallery/doors/1.jpg".
        >
        > Also note that there's no link to the home page from the "doors"
        > page, although there is a button labeled "Home". That button is
        > just a pulldown menu with links to "site map" and "contact us".
        > That pulldown menu also happens to pull down under the "QUICK FIND"
        > selection box, so you can't read the labels.
        >[/color]


        Comment

        • RobG

          #5
          Re: Thumbnail popup no longer works

          Stevie D wrote:[color=blue]
          > Hi I'm a Javascript newbie
          >
          > I'm doing a 'simple' (basically adding pages and changing text in frontpage
          > 2000) update of a web site for a friend - what I have done 'should not' have
          > done anything to the Java script that this site contains and the bits I've
          > added work fine. However, having uploaded the changes, and looking at the
          > site in I.E. the thumbnail images that already existed in the site don't
          > load into a popup window that was designed in JavaScript, but I'm fairly
          > sure that they used to. The popup window opens but the image doesn't.
          >[/color]
          [...]

          Can I also suggest that you get someone who knows what they are doing
          to rewrite your DHTML menus? They are pretty awful in IE 6 and don't
          even appear in Firefox or Netscape 7, making navigation to many pages
          impossible.

          Investigate pure CSS menus, they are much leaner and have a greater
          chance of working on a wider variety of browsers.

          In the HTML you have image elements like:

          <IMG alt="Decorative Resins International" border=0 height=1
          src="images/blank.gif" width=1>

          While the alt attribute is required, you are not required to put text
          in it. Visitors with a text-to-speech browser will hear the words
          "Decorative Resins International" ad nausium before they get anywhere
          near the actual content (it appears 33 times in the page).

          For spacer gifs, bullet images and other purely presentational images,
          leave the alt text empty.

          The navcond.js script needs to be junked completely, it does not work
          for any browser other than Netscape Navigator 4 and IE (and maybe some
          that mimic IE's proprietary features like adjacentHTML). There are
          vastly simpler ways of creating cross-browser dynamic content that work
          in a much greater range of browsers.


          --
          Rob

          Comment

          • Lee

            #6
            Re: Thumbnail popup no longer works

            Richard Cornford said:[color=blue]
            >
            >Stevie D wrote:
            ><snip>[color=green]
            >> ... changing text in frontpage 2000)[/color]
            >
            >Ouch!
            >
            ><snip>[color=green]
            >> <script language="JavaS cript">
            >> <!--
            >> function openWindow(url, name,scroll,wid th,height,top,l eft) {
            >> popupWin = window.open(url ,name,
            >> 'scrollbars='+s croll+',width=' +width+',height ='+height+',
            >> top='+top+',lef t='+ left)
            >> }
            >> file://-->[/color]
            > ^^^^^
            >In addition to what Lee said, you might ask yourself what that syntax
            >error is doing there.[/color]

            Is it a syntax error? I took it to be a label on an otherwise blank
            line. It's still worth asking what it's doing there.

            Comment

            • Richard Cornford

              #7
              Re: Thumbnail popup no longer works

              Lee wrote:[color=blue]
              > Richard Cornford said:[/color]
              <snip>[color=blue][color=green][color=darkred]
              >>> file://-->[/color]
              >> ^^^^^
              >>In addition to what Lee said, you might ask yourself
              >> what that syntax error is doing there.[/color]
              >
              > Is it a syntax error? I took it to be a label on an
              > otherwise blank line. It's still worth asking what
              > it's doing there.[/color]

              Yes it is a syntax error. The production for LabelledStateme nt is:-

              LabelledStateme nt :
              Identifier : Statement

              And this 'label' is not followed by a statement. The line terminator at
              the end of the comment allows automatic semicolon insertion to act but a
              semicolon inserted would be an EmptyStatement, and:-

              <quote cite="ECMA 262 3rd edition: section 7.9.1">
              ....
              However, there is an additional overriding condition on the preceding
              rules: a semicolon is never inserted automatically if the semicolon
              would then be parsed as an empty statement or if that semicolon would
              become one of the two semicolons in the header of a for statement
              (section 12.6.3).
              ....
              </quote>

              So no semicolon can be inserted, and so no statement follows the 'label'
              and so it cannot form a LabelledStateme nt. It must be a syntax error.

              Richard.


              Comment

              Working...