Javascript help needed

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

    Javascript help needed

    I've got a page with links to panoramic images and use javascript to
    open a separate window when the link to a specific panoramic image is
    clicked.

    Problem is that it's not working when I visit the site with my PC. But
    it works fine when using my Mac.

    On my PC, I get a browser error that the page is not found.

    Could someone take a look at my source code and tell me what might be
    causing this problem?

    I'm not very fluent with javascript and am having a difficult time
    troubleshooting this.

    the site is http://www.cnyweddings.com/pano/index.php

    One other thing... currently the links are opening another window, but
    it'd probably be really cool to have the link replace the existing image
    on the index page. But I'm not sure how to accomplish that. the code
    fragments I've seen on HotScripts.com and other places don't quite seem
    to fit my needs.

    Here is the code in the Head...

    <script language="JavaS cript">
    <!--
    function winOpen(url){
    width= "500";
    height="600";
    optionString =
    "scrollbars=yes ,status=yes,men ubar=no,resizab le=yes,location =no,toolbar=n
    o,width=" + width + ",height=" + height;
    psWindow = this.window.ope n(url,"",option String );
    }
    //-->
    </script>

    Here is the code in the body...

    <ul>
    <li><a
    href="javascrip t:winOpen('http ://www.cnyweddings .com/pano/statler_terrace
    ..html')">Ithac a - Statler Hotel Terrace Dining Room</a></b></li>
    <li>
    <a href="javascrip t:winOpen('lake watch_inn.php') "">Ithaca - Lakewatch
    Inn</a></b></li>
    <li>
    <a href="javascrip t:winOpen('ginn y_lee.php')">Lo di -Wagner Vineyard
    Ginny Lee Cafe Panorama</a></b></li>
    <li>
    <a href="javascrip t:winOpen('stat ler_terrace.php ')">Ithaca - Statler
    Hotel
    Terrace Dining Room</a></b></li>
    <li>
    <a href="javascrip t:winOpen('loga n_ridge.php')"> Lodi - Logan Ridge
    Winery</a></b></li>
    <li></li>
    </ul>

    --

    --

  • kaeli

    #2
    Re: Javascript help needed

    In article <nospam-9E93CB.11314315 072004@syrcnyrd rs-03-
    ge0.nyroc.rr.co m>, nospam@mail.inv alid enlightened us with...[color=blue]
    > I've got a page with links to panoramic images and use javascript to
    > open a separate window when the link to a specific panoramic image is
    > clicked.
    >
    > Problem is that it's not working when I visit the site with my PC. But
    > it works fine when using my Mac.[/color]

    Works fine with my PC with both Netscape 7 and IE6.

    --
    --
    ~kaeli~
    Why did kamikaze pilots wear helmets?



    Comment

    • Mick White

      #3
      Re: Javascript help needed

      Michael Erb wrote:
      [color=blue]
      > Problem is that it's not working when I visit the site with my PC. But
      > it works fine when using my Mac.
      >
      > On my PC, I get a browser error that the page is not found.[/color]
      <snip>[color=blue]
      >
      > Here is the code in the Head...
      >
      > <script language="JavaS cript">
      > <!--
      > function winOpen(url){
      > width= "500";
      > height="600";
      > optionString =
      > "scrollbars=yes ,status=yes,men ubar=no,resizab le=yes,location =no,toolbar=n
      > o,width=" + width + ",height=" + height;
      > psWindow = this.window.ope n(url,"",option String );
      > }
      > //-->
      > </script>[/color]

      Try:
      <script type="text/javascript">
      function winOpen(url){
      w= 500;
      h=600;
      optionString =
      "scrollbars,sta tus,resizable,w idth=" + w + ",height=" + h;
      psWindow = window.open(url ,"",optionStrin g );
      }
      </script>

      [color=blue]
      >
      > Here is the code in the body...
      >
      > <ul>
      > <li><a
      > href="javascrip t:winOpen('http ://www.cnyweddings .com/pano/statler_terrace
      > .html')">Ithaca - Statler Hotel Terrace Dining Room</a></b></li>
      > <li>[/color]

      Try:
      <a href = "http://www.cnyweddings .com/pano/statler_terrace .html" onclick =
      "winOpen('h ttp://www.cnyweddings .com/pano/statler_terrace .html');
      return false;">Ithaca - Statler Hotel Terrace Dining Room</a>

      Mick

      Comment

      • Michael Erb

        #4
        Re: Javascript help needed

        Thanks to everyone who replied. I actually found some new code which I
        put into the site this afternoon and it seems to have fixed whatever the
        problem was. I'm still not sure what was causing the glitch, but it
        does seem to be working now.

        Michael

        In article <MPG.1b607ef058 afe2b3989f94@nn tp.lucent.com>,
        kaeli <tiny_one@NOSPA M.comcast.net> wrote:
        [color=blue]
        > In article <nospam-9E93CB.11314315 072004@syrcnyrd rs-03-
        > ge0.nyroc.rr.co m>, nospam@mail.inv alid enlightened us with...[color=green]
        > > I've got a page with links to panoramic images and use javascript to
        > > open a separate window when the link to a specific panoramic image is
        > > clicked.
        > >
        > > Problem is that it's not working when I visit the site with my PC. But
        > > it works fine when using my Mac.[/color]
        >
        > Works fine with my PC with both Netscape 7 and IE6.[/color]

        --

        Comment

        Working...