Bug 32697 - Javascript parse error 'failed function call attempt' (www.sainsburystoyou.co.uk)
Summary: Javascript parse error 'failed function call attempt' (www.sainsburystoyou.co...
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-19 21:48 UTC by David Flynn
Modified: 2002-10-22 11:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Flynn 2001-09-19 21:38:24 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kjs
Version:           KDE 2.2.1 
Severity:          normal
Installed from:    Compiled From Sources
Compiler:          gcc 2.95.2
OS:                Linux
OS/Compiler notes: Not Specified

After logging into www.sainsburystoyou.co.uk it says 'the shop is loading for you' but just stops. konqueror's output shows the following:

JavaScript parse error at line 73.
JS: Failed function call attempt on: undefined : Undefined (0x81f94b0)
JS: Was property 'loadAppletFrame'
JS: of: [object Window] : Object (0x8221120)
JS: Type error at line 3. Expression is no object. Cannot be called.

The code that is in the frame is the following:

<base href="http://www.sainsburystoyou.com/eshop/jsps/please_wait.jsp">


<HTML>


<HEAD>
    <META http-equiv="Pragma" content="no-cache">
    <META http-equiv="Cache-Control" content="no-cache">

<STYLE>
FONT.clTitleFont{font-family:Arial Helvetica Sans Serif;font-size:18px;font-weight:700;color:#FF6600;}

#statusLayer{position:absolute; width:400px; height:300px;}


#timeRemainingLayer{position:relative; height:10; visibility:hidden; }

</STYLE>
<SCRIPT LANGUAGE="JavaScript">
var expiry = new Date();
var oneYearFromNow = expiry.getTime() + (365 * 24 * 60 * 60 * 1000);
expiry.setTime(oneYearFromNow);
document.cookie="URN=98903931723115;expires=" + expiry.toGMTString() + ";path=/";

var bar_blocks=20;
var replace_bar=0;
    var isIE5=(navigator.userAgent.indexOf('MSIE 5')>0);
    var isNN=(navigator.userAgent.indexOf('Netscape')>0);
    var isNN46=isNN && (navigator.userAgent.indexOf('4.6')>0);


    var pageLoaded=false;

    function OnError(msg url lno) {
       return true
    }

function update(percentage_completed)
{
    if(!pageLoaded){
        return;
    }
// works out how many blocks to colour
var new_bar_position = Math.round((bar_blocks/100.0)*percentage_completed);

// return to start if necessary
if (new_bar_position < (replace_bar-1)) {
initbar();
replace_bar = 0;
}
// ensure we don't go beyond end of status bar and draw up to currently completed status
while((replace_bar<bar_blocks)&&(replace_bar<=new_bar_position))
{
eval('document.bar'+replace_bar+'.src = "/eshop/images/orange.gif";');
++replace_bar;
}
window.status = 'store loading... ' + percentage_completed + '%';
}
function initbar() {

    if(!pageLoaded){
        return;
    }
if(document.layers){
document.timeRemainingLayer.visibility='visible';
}
else{
timeRemainingLayer.style.visibility='visible';
}
for (i=0; i<bar_blocks; i++) eval('document.bar'+i+'.src="/eshop/images/blue.gif";');
}
    function checkAppletExists()
    {
       var checkApp=false;

       if (isIE5)
        {
            checkApp=eval("try {window.parent.logo.isPresent();} catch (e) {false;}");
        } else if (isNN && !isNN46)
        {

    onError = OnError
            checkApp=window.parent.logo.isPresent();
       onError = null;

        }

        return checkApp;
    }
    function loadAppletFrame()
    {
    if(!checkAppletExists()) {
    var today = new Date();
    var appletPath = "/servlet/Eshop/main.Home/logoapplet?num=" + today.getTime();
    document.loadApplet.action = appletPath ;
    document.loadApplet.submit();
   }
    }

var blueImg=new Image();
var orangeImg=new Image();
blueImg.src="/eshop/images/blue.gif"; orangeImg.src="/eshop/images/orange.gif";
</SCRIPT>
<TITLE></TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/eshop/html/style.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH=720>
<TR>
<TD COLSPAN=4 HEIGHT="50"><IMG SRC="/eshop/images/clear.gif" WIDTH=11 HEIGHT=1 ALT=""></TD>
</TR>
<TR>
<TD><IMG SRC="/eshop/images/clear.gif" WIDTH=50 HEIGHT=1 ALT=""></TD>

<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="310">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="310">
<TR>
<TD HEIGHT="25" WIDTH="310" VALIGN="TOP">
<FONT CLASS="clTitleFont">the shop is loading for you</FONT>
 <FORM NAME="loadApplet" TARGET="logo" METHOD="POST">
<INPUT TYPE="hidden" NAME="URN" VALUE="989039">
 </FORM>
 <SCRIPT LANGUAGE="JavaScript">
    loadAppletFrame();
 </SCRIPT>
</TD>
</TR>

<TR>
<TD WIDTH="310" HEIGHT="70" VALIGN="TOP">
This may take a few minutes but you'll<BR>
then be able to shop quickly from the<BR>
full Sainsbury's to You range.<BR>
<BR>
<DIV ID="timeRemainingLayer">Time remaining :</DIV>

</TD>
</TR>
<TR><TD HEIGHT="5"><IMG SRC="/eshop/images/clear.gif" WIDTH="310" HEIGHT="5" ALT=""></TD></TR>

<TR>
<TD>
<SCRIPT LANGUAGE="JavaScript">
<!--
for (k=0;k<bar_blocks;k++)
document.write('<img src="/eshop/images/clear.gif" width=' + 200/bar_blocks + ' height=10 name="bar'+k+'" hspace=1>');

pageLoaded=true;
// -->
</SCRIPT>
</TD>
</TR>

</TABLE>
</TD>
<TD VALIGN="top" ALIGN="left">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD><IMG SRC="/images/clear.gif" WIDTH=4 HEIGHT=1 ALT=""></TD>
<TD BGCOLOR="#336699"><IMG SRC="/eshop/images/clear.gif" WIDTH=1 HEIGHT=150 ALT=""></TD>
<TD><IMG SRC="/images/clear.gif" WIDTH=25 HEIGHT=1 ALT=""></TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="330">
<TABLE ALIGN="LEFT" BORDER=0 CELLPADDING="0" CELLSPACING="0" WIDTH="330">
<TR><TD ALIGN="LEFT" VALIGN="TOP" HEIGHT="25" WIDTH="330" ><FONT CLASS="clTitleFont">new website coming soon</FONT></td></tr>

<TR><TD ALIGN="LEFT" VALIGN="TOP" HEIGHT="120" WIDTH="330">We've been making some great improvements to our website that will make ordering online with Sainsbury's to You easier than ever.<p>Our improved site will be available to you soon.  You'll find all the information you need to get started at:<p>www.sainsburys.co.uk/quickguide </TD></TR>

<TR><TD ALIGN="RIGHT" VALIGN="BOTTOM" WIDTH="330"><IMG SRC="/eshop/images/login_main_image.gif" WIDTH=279 HEIGHT=191 ALT="" BORDER="0"></TD></TR>
</TABLE>
</TD>
</TR>

</TABLE>
</BODY>
<HEAD>
<META http-equiv="Pragma" content="no-cache">
<META http-equiv="Cache-Control" content="no-cache">
</HEAD>
</HTML>

 If you don't have someone in the UK that can experiment with the site I can give login details.

 It would be nice if this could be fixed soon. I have a free delivery voucher which expires on the 5th of October :-)


(Submitted via bugs.kde.org)
Comment 1 David Faure 2002-10-22 11:07:44 UTC
function OnError(msg url lno) {