[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Please help debug asp.net / javascript compile bug

Posted on 2011-05-03
14
Medium Priority
?
240 Views
Last Modified: 2012-05-11
Go to:

http://test.huskyshoponline.com/

and you'll see an error about "missing )"

I need help fixing this please.
0
Comment
Question by:Tom Knowlton
12 Comments
 
LVL 9

Expert Comment

by:radcaesar
ID: 35516433
I didnt see any errors, But its bad design, Check ur page on IE6.

In Which browser and version you got error.

Send ur code.
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 35516478
I don't have IE6.  Not sure I want to install it **just** for this.

Here is my master page markup:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="TCSSite.Master.cs" Inherits="Campus_Webstore.SiteWideMaster.TCSSiteUCONN" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/UserControls/TopCart.ascx" TagName="TopCart" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/usertop.ascx" TagName="usertop" TagPrefix="uc2" %>
<%@ Register Src="~/UserControls/Catalogs.ascx" TagName="Catalogs" TagPrefix="uc3" %>
<%@ Register src="../../UserControls/HorizMenu.ascx" tagname="HorizMenu" tagprefix="uc5" %>
<%@ Register src="../../UserControls/AccordionNav.ascx" tagname="AccordionNav" tagprefix="uc4" %>
<%@ Register Src="~/UserControls/gentoplogin.ascx" TagName="Login1" TagPrefix="uc10" %>
<%@ Register Src="~/UserControls/HuskyFooter.ascx" TagName="HuskyFooter" TagPrefix="uc11" %>
<%@ Register assembly="Campus Webstore" namespace="Campus_Webstore" tagprefix="cc1" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="Head1" runat="server">



<title>UConn Co-op Husky Shop</title>
    <link href="~/Scripts/jquery.superbox.css" rel="stylesheet" type="text/css" />
    <link href="~/App_Themes/uconn/cws2.css" rel="stylesheet" type="text/css" />
    <link href="~/App_Themes/uconn/uconn.css" rel="stylesheet" type="text/css" />
    <link href="~/Scripts/allclients.css" rel="stylesheet" type="text/css" />
    <link href="../../App_Themes/uconn/addoredit_control.css" rel="stylesheet" type="text/css" />
    <link href="../../App_Themes/uconn/addoredit_popupstyling.css" rel="stylesheet" type="text/css" />
    <link href="../../App_Themes/uconn/shippingmethodstyling.css" rel="stylesheet" type="text/css" />
    <link href="../../App_Themes/uconn/orderdonestyling.css" rel="stylesheet" type="text/css" />
    <link href="../../App_Themes/uconn/securepaymentpagestyling.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery-1.4.1.js"></script>
    <script src="../../Scripts/husky_top_menu.js" type="text/javascript"></script>
    <script src="../../EFUImageUploader/efu-js/easyflashuploader.js" type="text/javascript"></script>
    <script src="../../EFUImageUploader/efu-js/language.en.js" type="text/javascript"></script>
    <link rel="SHORTCUT ICON" href="../../favicon.ico" />

    <%-- <link rel="shortcut icon" href="../App_Themes/SkinFile/Images/favicon.ico" type="image/vnd.microsoft.icon" />--%>

<!-- ******** BEGIN LIKNO WEB ACCORDION CODE FOR likno_accordion_project ******** -->
<%--<script type="text/javascript">    
var lwacLinkedBy = "LiknoWebAccordion [1]", lwacName = "likno_accordion_project", lwacBN = "126";
</script>
<script charset="UTF-8" src="../../Scripts/likno_accordion_project.js" type="text/javascript"></script>--%>
<!-- ******** END LIKNO WEB ACCORDION CODE FOR likno_accordion_project ******** -->


<script type="text/javascript">
    function CheckForFrameChange()
    {
        var theframe = document.getElementById("ccinfo");

        strURL = theframe.src;
        //setup a pointer to the begining of the /photos/ part of the string
        var hasit = strURL.indexOf('ElementPSResults');
        if (hasit > 0)
        {
            var theHTML = document.getElementById("ccinfo").contentWindow.document.body.innerHTML;
            if (theHTML.indexOf('veryobviousSuccess') > 0)
            {
                alert("Suceess was found");
            }
        }
        else
        {
           // CheckForFrameChange();
        }
    }
</script>





</head>
<body id="bodytaguconn" runat="server" onload="CheckForFrameChange();">
    <form id="mainbodyformuconn" runat="server">
    <ajaxToolkit:ToolkitScriptManager runat="server" ID="toolKit" AllowCustomErrorsRedirect="true"
        EnablePartialRendering="true">


ETC.,  ETC.

Open in new window

0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 35516830
I get the error in Mozilla Firefox 3.6x
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:dejaanbu
ID: 35688300
i couldnt see any errors in FF 4
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 35691236
I need someone who can help me debug this in FF 3.6x
0
 
LVL 10

Expert Comment

by:GlobaLevel
ID: 35691300
There are many errors..can you state which you want to work on..we cant design the whole page for your.......

Here are a few things:

1) I understand your using FF..however a majority of users at businesses and schools use IE...and it should work there as well...
2) You header icon is off/your css is off...please both the master page and the .aspx page that relate to it..we cant help without more info..
3) if you are using HTTP links for CSS and icons..they should be tested independly in browsers to assure that image servers/CSS servers are working correclty...
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 35691371
This same javascript works fine in my dev environment.

As soon as I removed my attempt to reference the javascript function in my <body> tag "onload" event, the error went away.

No offense, but I need someone who can help walk me through the troubleshooting for this error, GlobalLevel.  I don't think that person is you for this particular question.  Same goes for the other experts who have helped so far.

I need very specific troubleshooting advice **just** for the problem at hand, and for the browser version in question.

I am going to ask for some intervention on this question.

0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 35691432
Here is my MINI asp.net project where I am attempting to do something when the iframe finishes loading.

See attachment.
Default.zip
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 35700054
Try loading up Firebug: https://getfirebug.com/downloads/
0
 
LVL 17

Accepted Solution

by:
Carlos Villegas earned 2000 total points
ID: 35701631
Hi knowlton, I did some changes to your script:
<script type="text/javascript">
    function CheckForFrameChange()
    {
    	window.scroll(0, 0);

        var theframe = document.getElementById("ccinfo");
        if (theframe == null)
        	return;

        strURL = theframe.src;
        //setup a pointer to the begining of the /photos/ part of the string
        var hasit = strURL.indexOf('ElementPSResults');
        if (hasit > 0)
        {
            var theHTML = document.getElementById("ccinfo").contentWindow.document.body.innerHTML;
            if (theHTML.indexOf('veryobviousSuccess') > 0)
            {
                alert("Suceess was found");
            }
        }
        else
        {
           // CheckForFrameChange();
        }
    }
</script>

Open in new window


I think that your error is caused by this line because it is executed without take care of the load state of yours linked javascript files:
window.scroll(0, 0);

Open in new window

So I moved it to your CheckForFrameChange method, please call it from your document onload event and see if that help, also I added a condition to avoid a possible null reference exception.
0
 
LVL 17

Expert Comment

by:Carlos Villegas
ID: 35701654
Notice, I did take the code directly from your page:
http://test.huskyshoponline.com/
Not from the code that you posted here (this dont has window.scroll(0, 0); on it).
0
 
LVL 5

Author Closing Comment

by:Tom Knowlton
ID: 35817069
thx
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question