<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>14778</bug_id>
          
          <creation_ts>2007-07-27 03:28:45 -0700</creation_ts>
          <short_desc>Add To Basket button doesn&apos;t work in WebKit</short_desc>
          <delta_ts>2010-01-02 10:02:37 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Evangelism</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>http://www.comet.co.uk/shopcomet/product/443786/TOSHIBA-32AV505D</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alex Stapleton">alex.stapleton</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>vicki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3630</commentid>
    <comment_count>0</comment_count>
    <who name="Alex Stapleton">alex.stapleton</who>
    <bug_when>2007-07-27 03:28:45 -0700</bug_when>
    <thetext>Throws a JS exception. Works in other browsers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3596</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-27 10:12:18 -0700</bug_when>
    <thetext>Confirmed with a local debug build of WebKit r24669 with Safari 3 Public Beta v. 3.0.2 (522.12) on Mac OS X 10.4.10 (8R218).  The JavaScript Console shows:

TypeError: Undefined value
http://www.comet.co.uk/comet/ev2/js/addtobasket.js
Line:  100

Strange console output when the page is loaded as well:

Unsafe JavaScript attempt to access frame with URL http://www.comet.co.uk/cometbrowse/product.do?sku=380083 from frame with URL http://www.comet.co.uk/cometbrowse/product.do?sku=380083. Domains, protocols and ports must match.
[8723] http://ecustomeropinions.com/popup/i.php?sid=964408492&amp;v=500&amp;r=64375&amp;xres=1280&amp;yres=854&amp;url=/cometbrowse/product.do%3Fsku%3D380083&amp;referrer=http%3A//bugs.webkit.org/show_bug.cgi%3Fid%3D14778 line 3: TypeError: Undefined value
(event handler):Can&apos;t find variable: oldonload

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3591</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-27 10:13:19 -0700</bug_when>
    <thetext>Not a regression as similar behavior occurs in Safari 2.0.4 (419.3) with original WebKit on 10.4.10.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64593</commentid>
    <comment_count>3</comment_count>
    <who name="">allan28</who>
    <bug_when>2007-12-17 16:12:06 -0800</bug_when>
    <thetext>Works with Firefox useragent.
Site uses browsersniffing, and mistakenly alters eventhandling for Safari:

---                
                if(event.indexOf(fName)==-1)
		{
			if(cGU&amp;&amp;event.indexOf(&quot;function &quot;+&quot;(&quot;)==0)
			{
				fName=fName+&quot;;&quot;+event.substring(event.indexOf(&quot;{&quot;),event.length);
			}
			var newfunc=new Function(&quot;e&quot;,fName);
			return newfunc;

---
Where cGU is true with Safari.
Possibly tries to fix previous bad behaviour?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64618</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-12-18 05:34:53 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Works with Firefox useragent.
&gt; Site uses browsersniffing, and mistakenly alters eventhandling for Safari:

Is this custom shopping cart code, or are they using a third-party shopping cart for the site?

Confirmed that switching to Firefox 2.0.0.2 user agent fixes the issue.

FWIW, I&apos;m seeing a new message printed to the JavaScript Console (whether using the default user agent or Firefox):

Can&apos;t find variable: oldonload
undefined
Line: 2

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64623</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-12-18 05:56:41 -0800</bug_when>
    <thetext>Filled out a customer request form here regarding this issue:

https://comet.custhelp.com/cgi-bin/comet.cfg/php/enduser/ask.php

---
The shopping basket feature of comet.co.uk does not work with the Safari 3.0.x web browser on Windows XP or Mac OS X.  This issue is being tracked by this bug:

http://bugs.webkit.org/show_bug.cgi?id=14778

Please consider testing and fixing the comet.co.uk web site to work properly with the Safari web browser.  You may download a free beta of Safari 3 for Windows here:

http://www.apple.com/safari/

Thanks!

Dave
---

The reference number for your question is &apos;071218-000176&apos;.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64629</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-12-18 09:03:37 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; Filled out a customer request form here regarding this issue:
&gt; https://comet.custhelp.com/cgi-bin/comet.cfg/php/enduser/ask.php
&gt; [...]
&gt; The reference number for your question is &apos;071218-000176&apos;.

I&apos;ve already gotten a response!

---
Response (Simon Pyper) 18/12/2007

Dear Mr Kilzer. 

Thank you for your recent email regarding web compatbility issues. 

I have passed your comments on to our IT/Web team to look at and I&apos;m sure that they will be able to implement a solution to this problem. 

Regards, 

Simon Pyper 
Comet Customer Services
---

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64662</commentid>
    <comment_count>7</comment_count>
    <who name="">allan28</who>
    <bug_when>2007-12-18 13:09:40 -0800</bug_when>
    <thetext>I&apos;m not seeing this with the latest nightly (with Firefox useragent).

Debugging showed that the &quot;TypeError: Undefined value: oldonload&quot;  was caused by the snippet I included (slightly obfuscated js-file called eluminate.js). This is part of their stat/add-tracking software and is third-party, so you should probably mail Coremetrics (http://www.coremetrics.com/company/contact_us.php) instead, as it is their code that is in error.

The &quot;TypeError: Undefined value&quot; at line 100 is caused by the first error, as a global variable isn&apos;t set since their onload-handler is wrecked by Coremetrics onload-handler and stops after the first error.

If Coremetrics omits their Safari-check in their event-handler, everything should work.

(In reply to comment #4)
&gt; FWIW, I&apos;m seeing a new message printed to the JavaScript Console (whether using
&gt; the default user agent or Firefox):
&gt; 
&gt; Can&apos;t find variable: oldonload
&gt; undefined
&gt; Line: 2

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64698</commentid>
    <comment_count>8</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-12-18 22:32:23 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; If Coremetrics omits their Safari-check in their event-handler, everything
&gt; should work.

Thanks for the analysis!  I&apos;ve sent a note to support at coremetrics dot com about the issue.  Hopefully this is already fixed in a software update and comet.co.uk can just pick up a new version!

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64701</commentid>
    <comment_count>9</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-12-18 22:44:42 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; Thanks for the analysis!  I&apos;ve sent a note to support at coremetrics dot com
&gt; about the issue.  Hopefully this is already fixed in a software update and
&gt; comet.co.uk can just pick up a new version!

Response from Coremetrics support:

Ticket #:	5377-4752077
Date Created:	12/19/2007 12:34 AM CDT

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64725</commentid>
    <comment_count>10</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-12-19 05:54:45 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; Response from Coremetrics support:
&gt; Ticket #:       5377-4752077
&gt; Date Created:   12/19/2007 12:34 AM CDT

---
Hi David,

We have forwarded your message to our Product Management team for further review and consideration for any future software releases.  Please let us know if you need anything further.

Thank you,
Coremetrics Customer Support
---

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84968</commentid>
    <comment_count>11</comment_count>
    <who name="Alex Stapleton">alex.stapleton</who>
    <bug_when>2008-07-02 02:51:46 -0700</bug_when>
    <thetext>It&apos;s still broken. Same error by the looks of things.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84976</commentid>
    <comment_count>12</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-07-02 06:44:36 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; It&apos;s still broken. Same error by the looks of things.

Confirmed.  Interestingly, the &quot;Add to Basket&quot; link on the home page DOES work, but the &quot;Add to Basket&quot; link on an individual product page still gives the same error message.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>176333</commentid>
    <comment_count>13</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-01-02 10:02:37 -0800</bug_when>
    <thetext>This works fine now.  According to the comments above, this was a site issue all along.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>