Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Popup windows not working
Old 11-05-2007, 05:57 PM Popup windows not working
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Please have a look at http://www.rhinoracks.co.uk/berlingo.php

I have 3 sets of pop ups on a results page but Only the middle set works (racks section)

All the sections work on their own but not when placing together on the page...
I saw the yellow exclamation mark earlier at the bottom and it said something about a "constant"?? cant get it to appear now!

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Rhino Roof Racks For Citroen Berlingo Vans</title>

<link href="style.css" rel="stylesheet" type="text/css" /><style type="text/css">

<!--

.style11 {font-size: 12px; color: #FFFFFF;}

.style12 {color: #FFFFFF}
.style17 {color: #FFFFFF; font-size: 10px; }
.style21 {font-size: 11px; color: #FFFFFF; }

-->

</style>

<br />

<meta name="description" content="Rhino Roof Racks - Specialists In Heavy Duty Van Roof Bars & Accessories.">

<meta name="keywords" content="Roof, Rack, Rhino, Rhino Racks, Racks, Bars, Roof Bars,">

<meta name="robots" content="all">

<meta name="revisit-after" content="6 days">

<meta name="reply-to" content="info@rhinoracks.co.uk">

<meta name="distribution" content="Global">

<meta name="rating" content="General">

<meta name="copyright" content="Kamperis-Autorack">

<meta name="language" content="English">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<meta http-equiv="Content-Language" content="en-gb">

</head>



<body>

<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>

    <td valign="top"><img src="http://www.webmaster-talk.com/images/header.jpg" width="918" height="177" border="0" usemap="#Map" /></td>

  </tr>

</table>

<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>

    <td width="165" valign="top" bgcolor="#132028">

      <div align="left">

        <table width="100%" border="0" cellspacing="0" cellpadding="0">

          <tr>

            <td><div align="center"><a 

        href=index.htm><br />

              HOME PAGE</a></div></td>

          </tr>

        </table>

        <span class="style12"></span>

        <ul class="ul2"><li><a 

        href="citroen.htm">Citroen</a> <img src="http://www.webmaster-talk.com/images/where.gif" width="14" height="12" align="absbottom" /> <a href="berlingo.htm">Berlingo</a> <img src="http://www.webmaster-talk.com/images/where.gif" width="14" height="12" align="absbottom" /></li>

          <li><a 

        href="fiat.htm">Fiat</a> </li>

          <li><a 

        href="ford.htm">Ford</a> </li>

          <li><a 

        href="iveco.htm">Iveco</a> </li>

          <li><a 

        href="landrover.htm">Landrover</a> </li>

          <li><a 

        href="ldv.htm">LDV</a> </li>

          <li><a 

        href="mazda.htm">Mazda</a> </li>

          <li><a 

        href="mercedes.htm">Mercedes</a> </li>

          <li><a 

        href="mitsubishi.htm">Mitsubishi</a> </li>

          <li><a 

        href="nissan.htm">Nissan</a> </li>

          <li><a 

        href="peugeot.htm">Peugeot</a> </li>

          <li><a 

        href="renault.htm">Renault</a> </li>

          <li><a 

        href="toyota.htm">Toyota</a></li>

          <li><a 

        href="vauxhall.htm"> Vauxhall</a></li>

          <li><a 

        href="volkswagon.htm"> Volkswagon <br />

          </a></li>

        </ul>

      </div>

      <ul class="ul2">

      </ul>

    </div></td>

    <td width="735" valign="top" bgcolor="#282B2D"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">

      <tr>

        <td bgcolor="#282B2D"><h1 align="center" class="main_cont_h_text">Citroen Berlingo Vans </h1></td>

      </tr>

    </table>

      <table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0">

        <tr>

          <td><table width="616" border="0" align="center" cellpadding="2" cellspacing="2">
            <tr>
              <td width="233" rowspan="2" valign="top" class="yellow"><table width="188" height="19" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="middle"><p align="left" class="white">The Citroen Berlingo has 6 spot welded fixpopints on the roof of the van. The unique Rhino &quot;Dove Tail&quot; clamp kit holds the roof bars securley on the roof with no drilling required. </p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p></td>
                </tr>
              </table></td>
              <td width="200" class="yellow"><div align="center"><img src="vans/G-OCE.jpg" width="200" height="77" /><br />
                Rhino OCE Roof Rack System </div></td>
              <td width="253" class="yellow"><div align="center"><img src="vans/mod_r1_c1.jpg" width="200" height="77" /><br />
                Rhino Modular Roof Rack </div></td>
            </tr>
            <tr>
              <td class="yellow"><div align="center"><img src="vans/pipe.jpg" width="200" height="105" /><br />
                Rhino Universal Fitting Pipe Tube </div></td>
              <td class="yellow"><div align="center"><img src="vans/accessories.jpg" width="200" height="105" /></div>
                <div align="center">Selection Of Rhino Rack Accessories </div></td>
            </tr>
          </table>
          <br /></td>
        </tr>

      </table>      

      <table width="98%" border="0" align="center" cellpadding="3" cellspacing="3" style="border-collapse:collapse; font-family:arial; font-size:11px; color:#000000;">
        <tr bgcolor="#282B2D" style="background-color:#282B2D">
          <th colspan="5"><div align="left"><img src="http://www.webmaster-talk.com/images/roofbars.jpg" width="394" height="35" /></div></th>
        </tr>
        <tr bgcolor="#132028" style="background-color:#132028">
          <th width="14%" bgcolor="#006699" class="style17">image</th>
          <th width="12%" bgcolor="#006699" class="style17">Order Code</th>
          <th width="58%" bgcolor="#006699" class="style17">Description</th>
          <th width="8%" bgcolor="#006699" class="style17">Price<br />
            (exc VAT)</th>
          <th width="8%" bgcolor="#006699" class="style17">Price<br />
            (Inc. VAT)</th>
        </tr>
        <?php



$odd  = '#cccccc';

$even = '#999999';



$products = file('./csv/berlingo.csv');



foreach($products as $i => $product_info)
{
    list($product_code, $description, $price, $priceVAT, $thumb, $image) = explode(',', $product_info);
        list($w, $h) = getimagesize($thumb);
        $url= "window.open('$image','image',
'left=20,top=20,width=592,height=505,toolbar=0,resizable=0');";
        $image = "<a href=\"javascript:void(0);\" onclick=\"$url\"><img src=\"$thumb\" border=\"0\" alt=\"Click For More Info\" width=\"$w\" height=\"$h\" /></a>";

    $bg = ($i%2) ? $odd : $even;

    

    echo "  <tr style=\"background-color:$bg\">

    <td>$image</td>

    <td>$product_code</td>

    <td align=\"left\">$description</td>

    <td>&pound$price</td>

    <td>&pound$priceVAT</td>

  </tr>\n";



}



?>
      </table>
      <div align="center"><br />

      <img src="http://www.webmaster-talk.com/images/line.gif" width="600" height="11" /><br />

      </div>

      <table width="98%" border="0" align="center" cellpadding="3" cellspacing="3" style="border-collapse:collapse; font-family:arial; font-size:11px; color:#000000;">
        <tr bgcolor="#282B2D" style="background-color:#282B2D">
          <th colspan="5"><div align="left"><img src="http://www.webmaster-talk.com/images/modre.jpg" width="405" height="35" /></div></th>
        </tr>
        <tr bgcolor="#132028" style="background-color:#132028">
          <th width="14%" bgcolor="#006699" class="style17">image</th>
          <th width="12%" bgcolor="#006699" class="style17">Order Code</th>
          <th width="58%" bgcolor="#006699" class="style17">Description</th>
          <th width="8%" bgcolor="#006699" class="style17">Price<br />
            (exc VAT)</th>
          <th width="8%" bgcolor="#006699" class="style17">Price<br />
            (Inc. VAT)</th>
        </tr>
        <?php



$odd  = '#cccccc';

$even = '#999999';



$products = file('./csv/berlingo_mod.csv');



foreach($products as $i => $product_info)
{
    list($product_code, $description, $price, $priceVAT, $thumb, $image) = explode(',', $product_info);
        list($w, $h) = getimagesize($thumb);
        $url= "window.open('$image','image',
'left=20,top=20,width=592,height=505,toolbar=0,resizable=0');";
        $image = "<a href=\"javascript:void(0);\" onclick=\"$url\"><img src=\"$thumb\" border=\"0\" alt=\"Click For More Info\" width=\"$w\" height=\"$h\" /></a>";

    $bg = ($i%2) ? $odd : $even;

    

    echo "  <tr style=\"background-color:$bg\">

    <td>$image</td>

    <td>$product_code</td>

    <td align=\"left\">$description</td>

    <td>&pound$price</td>

    <td>&pound$priceVAT</td>

  </tr>\n";



}



?>
      </table>
      <div align="center"><br />

        <img src="http://www.webmaster-talk.com/images/line.gif" width="600" height="11" /><br />      

      </div>

      <table width="98%" border="0" align="center" cellpadding="3" cellspacing="3" style="border-collapse:collapse; font-family:arial; font-size:11px; color:#000000;">
        <tr bgcolor="#282B2D" style="background-color:#282B2D">
          <th colspan="5"><div align="left"><img src="http://www.webmaster-talk.com/images/access.jpg" width="427" height="35" /></div></th>
        </tr>
        <tr bgcolor="#132028" style="background-color:#132028">
          <th width="14%" bgcolor="#006699" class="style17">image </th>
          <th width="12%" bgcolor="#006699" class="style17">Order Code</th>
          <th width="58%" bgcolor="#006699" class="style17">Description</th>
          <th width="8%" bgcolor="#006699" class="style17">Price<br />
            (exc VAT)</th>
          <th width="8%" bgcolor="#006699" class="style17">Price<br />
            (Inc. VAT)</th>
        </tr>
        <?php



$odd  = '#cccccc';

$even = '#999999';



$products = file('./csv/accessories.csv');



foreach($products as $i => $product_info)
{
    list($product_code, $description, $price, $priceVAT, $thumb, $image) = explode(',', $product_info);
        list($w, $h) = getimagesize($thumb);
        $url= "window.open('$image','image',
'left=20,top=20,width=592,height=505,toolbar=0,resizable=0');";
        $image = "<a href=\"javascript:void(0);\" onclick=\"$url\"><img src=\"$thumb\" border=\"0\" alt=\"Click For More Info\" width=\"$w\" height=\"$h\" /></a>";

    $bg = ($i%2) ? $odd : $even;

    

    echo "  <tr style=\"background-color:$bg\">

    <td>$image</td>

    <td>$product_code</td>

    <td align=\"left\">$description</td>

    <td>&pound$price</td>

    <td>&pound$priceVAT</td>

  </tr>\n";



}



?>
      </table></td>
  </tr>

</table>

<table width="945" height="133" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>

    <td width="945" background="http://www.webmaster-talk.com/images/box.jpg" bgcolor="#282B2D"><div class="dc footer_c1"></div>

      <div class="footer">

        <div align="right"><br style="LINE-HEIGHT: 20px" />

          <span 

class="footer_text2"><a 

href="index.htm">Home</a>&nbsp; 

          &nbsp;|&nbsp; &nbsp; <a 

href="about.htm">About Us </a>&nbsp; 

          &nbsp;|&nbsp; &nbsp; <a 

href="products.htm">New 

              products</a>&nbsp; &nbsp;|&nbsp; &nbsp; <a 

href="contact.htm">Contact 

                us</a>&nbsp; &nbsp;|&nbsp; &nbsp; <a 

href="resources.htm">Resources</a></span><br />

          <br 

style="LINE-HEIGHT: 3px" />

              <span class="footer_text2">Copyright &copy; 2007 Rhinoracks.co.uk - Part of the Kamperis -Autorack Group </span></div>

    </div></td>

  </tr>

</table>



<map name="Map" id="Map"><area shape="rect" coords="188,149,237,170" href="index.htm" />

<area shape="rect" coords="281,150,352,170" href="about.htm" />

<area shape="rect" coords="396,151,460,167" href="contact.htm" />

</map></body>

</html>
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."

Last edited by rolda hayes; 11-05-2007 at 05:59 PM..
rolda hayes is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-05-2007, 07:51 PM Re: Popup windows not working
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
The first give me this error:
Code:
unterminated string literal
http://www.rhinoracks.co.uk/berlingo.php
Line 1
When I'm clicking on it.

Your problem is the line breaks into the onclick code...
Javascript don't handle at all physicals line break in the source, and this causes the "unfinished string" error.
Either remove this word wrap thing (could never stand it... I have a wide screen, I don't want to wrap on 80 cols) or rewrite that part to not be broke upon several lines.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 11-06-2007, 08:05 AM Re: Popup windows not working
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
still cant get it to work... the error is "unterminated string constant"

I place the code on one line and that hasn't helped
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 11-06-2007, 08:10 AM Re: Popup windows not working
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
I still have them on several lines

From the sources:
Code:
     <tr style="background-color:#999999">

    <td><a href="javascript:void(0);" onclick="window.open('vans/n.htm
','image',
'left=20,top=20,width=592,height=505,toolbar=0,resizable=0');"><img src="csvimages/ni.jpg" border="0" alt="Click For More Info" width="95" height="50" /></a></td>
<td>G2126-2</td>
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 11-06-2007, 08:16 AM Re: Popup windows not working
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
sorry, try http://www.rhinoracks.co.uk/berlingo2.php

edited that one
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 11-06-2007, 10:51 AM Re: Popup windows not working
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
You still have a wrapped js call...
I don't wrap lines in my source, and I clearly see
Code:
 <td><a href="javascript:void(0);" onclick="window.open('vans/n.htm
','image','left=20,top=20,width=592,height=505,toolbar=0,resizable=0');"><img src="csvimages/ni.jpg" border="0" alt="Click For More Info" width="95" height="50" /></a></td>
You have a line break just after "vans/n.htm".
Whatever editor you use, ditch it and try to edit this file withe notepad++ or scite, or even windows notepad.
They let you do what you want to, not just what they think you would.
scite: http://amip.tools-for.net/SciTE-CVS.exe
notepad++: http://notepad-plus.sourceforge.net/uk/site.htm
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 11-06-2007, 01:13 PM Re: Popup windows not working
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
This is really strange, I'm using notepad and there is no line break but when i FTP back up, it puts it in the sorce code???

I'll try editing straight of the ftp window.

If this is what is causing it not to open the windows, how come the middle section "racks" is working ok??

Cheers
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 11-06-2007, 01:16 PM Re: Popup windows not working
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
No, even when I view straight from the ftp window (FILE ZILLA) there are no line breaks...

As soon as i send it back I have...
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 11-07-2007, 06:25 AM Re: Popup windows not working
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
I used notepad++ (Great by the way) and there are no breaks in my code but as soon as it goes live... there they are!

Could it be anything else causing the error as the middle set of pops work fine and they are using the exact same code?
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 11-07-2007, 09:26 AM Re: Popup windows not working
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
solved it! added the following.
Thanks for all your help Tripy (especially for notepad ++)

list($product_code, $description, $price, $priceVAT, $thumb, $image) = explode(',', $product_info);
list($w, $h) = getimagesize($thumb);
$image = rtrim($image);
$url= "window.open('$image','image',
'left=20,top=20,width=404,height=440,toolbar=0,res izable=0');";
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Popup windows not working
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.31728 seconds with 12 queries