thumbnail open new window

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

    #1

    thumbnail open new window

    Hi

    I have some thumbnails on that page with some JavaScript to open a new
    windows in the different size if visitors click on the thumbnails.
    But the problem is if you click the thumbnail before the page to
    completely load up the page just stop loading and begin to load the
    new window only.
    Why is that and how can I fix it?

    Thanks


  • Jim Dabell

    #2
    Re: thumbnail open new window

    steve wrote:
    [color=blue]
    > I have some thumbnails on that page with some JavaScript to open a new
    > windows in the different size if visitors click on the thumbnails.
    > But the problem is if you click the thumbnail before the page to
    > completely load up the page just stop loading and begin to load the
    > new window only.[/color]

    Without a URL, people can only guess. My guess is that you haven't read the
    FAQ, and so haven't seen this:

    <URL:http://jibbering.com/faq/#FAQ4_24>

    One side-effect of <a href="javascrip t:... is that can stop the current page
    loading. When you think about it, it's perfectly natural - you are
    following a link, so obviously the browser shouldn't have to bother loading
    the current page. Follow the FAQ's advice, and it should resolve this
    problem.


    --
    Jim Dabell

    Comment

    • Grant Wagner

      #3
      Re: thumbnail open new window

      steve wrote:
      [color=blue]
      > Hi
      >
      > I have some thumbnails on that page with some JavaScript to open a new
      > windows in the different size if visitors click on the thumbnails.
      > But the problem is if you click the thumbnail before the page to
      > completely load up the page just stop loading and begin to load the
      > new window only.
      > Why is that and how can I fix it?
      >
      > Thanks[/color]

      Stop using:

      <a href="javascrip t:...">

      and start using:

      <a href="#" onclick="...;re turn false;">

      <url: http://jibbering.com/faq/#FAQ4_24 />

      --
      | Grant Wagner <gwagner@agrico reunited.com>

      * Client-side Javascript and Netscape 4 DOM Reference available at:
      *


      * Internet Explorer DOM Reference available at:
      *
      http://msdn.microsoft.com/workshop/a...ence_entry.asp

      * Netscape 6/7 DOM Reference available at:
      * http://www.mozilla.org/docs/dom/domref/
      * Tips for upgrading JavaScript for Netscape 7 / Mozilla
      * http://www.mozilla.org/docs/web-deve...upgrade_2.html


      Comment

      • steve

        #4
        Re: thumbnail open new window

        > > Hi[color=blue][color=green]
        > >
        > > I have some thumbnails on that page with some JavaScript to open a[/color][/color]
        new[color=blue][color=green]
        > > windows in the different size if visitors click on the thumbnails.
        > > But the problem is if you click the thumbnail before the page to
        > > completely load up the page just stop loading and begin to load[/color][/color]
        the[color=blue][color=green]
        > > new window only.
        > > Why is that and how can I fix it?
        > >
        > > Thanks[/color]
        >
        > Stop using:
        >
        > <a href="javascrip t:...">
        >
        > and start using:
        >
        > <a href="#" onclick="...;re turn false;">[/color]

        Thanks it work perfectly

        Did I make it the right way

        <a href="#" onClick="openPo pImg('pic1.jpg' , 'title, '245',
        '450');return false;" onMouseOver=".. ..............


        Comment

        • Jim Dabell

          #5
          Re: thumbnail open new window

          steve wrote:

          [snip][color=blue]
          > Did I make it the right way
          >
          > <a href="#" onClick="openPo pImg('pic1.jpg' , 'title, '245',
          > '450');return false;" onMouseOver=".. ..............[/color]

          No. It breaks when Javascript is not available. Try:

          <a href="pic1.jpg" ...

          Also, you are missing the closing quote after title, but before the comma.
          I'm assuming that there's an openPopImg() function available, of course.

          --
          Jim Dabell

          Comment

          • steve

            #6
            Re: thumbnail open new window

            > > Did I make it the right way[color=blue][color=green]
            > >
            > > <a href="#" onClick="openPo pImg('pic1.jpg' , 'title, '245',
            > > '450');return false;" onMouseOver=".. ..............[/color]
            >
            > No. It breaks when Javascript is not available. Try:
            >
            > <a href="pic1.jpg" ...[/color]

            you have got a good point there, thanks
            [color=blue]
            > Also, you are missing the closing quote after title, but before the[/color]
            comma.

            yes thanks
            [color=blue]
            > I'm assuming that there's an openPopImg() function available, of[/color]
            course.

            yes there is


            Comment

            Working...