Question : Trying to Debug Asp.Net page with javascript

I am trying to step through an asp page that is composed entirely of javascript.  Thought I could do this using a combination of the microsoft script debugger and ie6.

I have unchecked the Disable Script Debugger boxes in ie

I go to a browser window and type
http://localhost/fsm/pages/fsmlookup.aspx  (I have posted the contents of fsmlookup.aspx below)

after the page is displayed I click view....Script Debugger and then Break at next statement.

I was hoping that when I clicked the button on the form or click on one of the dropdown menus I could step through the code but I don't get an opportunity to set any breakpoints.  The code just executes.  (the microsoft script debugger window displays but the running documents window is blank)

I inherited maintenance of this page from someone who is no longer here and don't understand why there is the <%@ Page Language="vb" AutoEventWireup="false" Codebehind="FSMLookup.aspx.vb" Inherits="FSM.FSMLookup" %> tag.   There is no code behind that I can see.

Here is a breakdown of the iis entry

web sites
    default web site
              Fsm
                     bin
                     classes
                     dialog
                     images
                     pages
                     web references


Not sure what I might be missing

Please Help



1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="FSMLookup.aspx.vb" Inherits="FSM.FSMLookup" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
  <HEAD>
    <title>Midas.com</title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" Content="Visual Basic 7.0">
    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
	<link href="../Include/Styles.css" type="text/css" rel="stylesheet" />
	<script src="../Include/CommonClient.js"></script>
  </HEAD>
  
	<script language="javascript">

		function setActiveFieldValue(sDate){
			frmFSMRequest.txtLastServiceDate.value = sDate;
		}

		function initPage(){
			navPage();
			window.focus();
			if (frmFSMRequest.txtMessage.value == "true")
				{
					window.alert(frmFSMRequest.txtMessage.value);
				}
			if (frmFSMRequest.txtSetMileageFocus.value == "true")
				{
					frmFSMRequest.drpMileage.focus();
				}
		}

		/***********************
		* openPopup() 
		* Open a new window as a popup centered,
		* in the screen.
		************************/
		function openPopup(strUrl, strWindowName, intWidth, intHeight, bScroll){
		var theWin, bScrollbars, strCoord;

			// don't activate caller.
			setPopupFocus();
			
			// build url	
			strUrl = FormatUrl(strUrl);

			// set window properties and call page.
			if(bScroll == true){bScrollbars = 1} else {bScrollbars = 0};
			strCoord = getWindowCoord(intWidth, intHeight);
			theWin = window.open(strUrl, strWindowName, "resizable=yes,toolbar=no,menubar=no,location=no,status=yes,scrollbars=" + bScrollbars + "," + strCoord);
			theWin.opener = self;
		}


	</script>

<body onload="javascript:initPage();">
<form id="frmFSMRequest" method="post" runat="server">
<asp:validationsummary id="vsmFSMRequest" runat="server" ForeColor="#0066ff" ShowMessageBox="true" DisplayMode="BulletList" HeaderText="Please correct the following errors and try again." ShowSummary="false"></asp:validationsummary>
<table width="747" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td>
            <div id="registerContentArea">
                <!--Content Area -->
				<table cellSpacing="1" cellPadding="1" border="0" width="560px">
						<tr>
						<td align="center" class="FieldLabel" colspan=2>Please enter your vehicle information to lookup <BR>and print your Factory Recommended Maintenance Schedule.*</td>
						<td align="left" class="FieldLabel">Service Schedule Preference*</td>
					</tr>
					<tr>
						<td align="Center" colspan=2 style="FONT-SIZE: 7pt">* Subject to availability</td>
						<td align="Left" style="FONT-SIZE: 7pt">* Please consult your owner's manual</td>
					</tr>
					
					<tr><td align="Center" colspan="2">&nbsp;</td></tr>
					<tr>
						<td align="right" class="FieldLabel" colspan=0>Year:&nbsp;</td>
						<td align="left">
							<asp:dropdownlist OnSelectedIndexChanged="drpYear_onChange"  AutoPostBack="True" Width="60px" id="drpYear" runat="server" TabIndex=17></asp:dropdownlist>
							<asp:CompareValidator id="reqYear" runat="server" ErrorMessage="Please select a vehicle year." ForeColor="#0066ff" Display="Dynamic" ControlToValidate="drpYear" Operator="NotEqual" ValueToCompare="0">*</asp:CompareValidator>
						</td>
						<td align="left" colspan=2><asp:radiobutton id="rdServiceScheduleSevere" groupname="ServiceSchedule" text="Severe Service" runat="server" AutoPostBack="True" OnCheckedChanged="rdServiceScheduleSevere_onCheckChanged"></asp:radiobutton></td>
					</tr>
					<tr>
						<td align="right" class="FieldLabel">Make:&nbsp;</td>
						<td align="left">
							<asp:dropdownlist id="drpMake" OnSelectedIndexChanged="drpMake_onChange" AutoPostBack="True" Width="130px" runat="server" TabIndex=18></asp:dropdownlist>
							<asp:CompareValidator id="cmpMake" runat="server" ErrorMessage="Please select Make." ForeColor="#0066ff" Display="Dynamic" ControlToValidate="drpMake" Operator="NotEqual" ValueToCompare="0">*</asp:CompareValidator>
						</td>
						<td><asp:radiobutton id="rdServiceScheduleNormal" groupname="ServiceSchedule" text="Normal Service" runat="server" AutoPostBack="True" OnCheckedChanged="rdServiceScheduleNormal_onCheckChanged"></asp:radiobutton></td>						
					</tr>
					<tr>
						<td align="right" class="FieldLabel">Model:&nbsp;</td>
						<td>
							<asp:dropdownlist id="drpModel" OnSelectedIndexChanged="drpModel_onChange" AutoPostBack="True" Width="150px" runat="server" TabIndex=19></asp:dropdownlist>
							<asp:CompareValidator id="cmpModel" runat="server" ErrorMessage="Please select Model." ForeColor="#0066ff" Display="Dynamic" ControlToValidate="drpModel" Operator="NotEqual" ValueToCompare="0">*</asp:CompareValidator>
						</td>
					</tr>
					<tr>
						<td align="right" class="FieldLabel">Engine:&nbsp;</td>
						<td align="left">
							<asp:dropdownlist id="drpEngine" OnSelectedIndexChanged="drpEngine_onChange" AutoPostBack="True" Width="150px" runat="server" TabIndex=20></asp:dropdownlist>
							<asp:CompareValidator id="cmpEngine" runat="server" ErrorMessage="Please select Engine." ForeColor="#0066ff" Display="Dynamic" ControlToValidate="drpEngine" Operator="NotEqual" ValueToCompare="0">*</asp:CompareValidator>
						</td>
					</tr>

					<tr>
						<td align="right" class="FieldLabel">Mileage:&nbsp;</td>
						<td align="left">
							<asp:dropdownlist AutoPostBack="False" Width="190px" id="drpMileage" runat="server"></asp:dropdownlist>
							<asp:CompareValidator id="cmpMileage" runat="server" ErrorMessage="Please select Mileage Interval." ForeColor="#0066ff" Display="Dynamic" ControlToValidate="drpMileage" Operator="NotEqual" ValueToCompare="0">*</asp:CompareValidator>
							<asp:CompareValidator id="cmpMileageBlank" runat="server" ErrorMessage="No Mileage Intervals available." ForeColor="#0066ff" Display="Dynamic" ControlToValidate="drpMileage" Operator="NotEqual" ValueToCompare="-1">*</asp:CompareValidator>
							<asp:TextBox ID="txtMileage" width="80px" Runat="server" Visible="False" AutoPostBack="False"></asp:TextBox>
							<asp:CustomValidator ID="csvMileageTxt" Runat="server" ErrorMessage="Please enter a numeric Mileage value." ControlToValidate="txtMileage" ForeColor="#0066ff" Display="Dynamic" OnServerValidate="isValidNumber" ClientValidationFunction="isValidNumber">*</asp:CustomValidator>
							<asp:CompareValidator id="cmpMileageTxt" runat="server" ErrorMessage="Please enter a Mileage value greater than zero." ForeColor="#0066ff" Display="Dynamic" ControlToValidate="txtMileage" Operator="GreaterThan" ValueToCompare="0">*</asp:CompareValidator>
							<asp:RequiredFieldValidator ID="reqMileageTxtBlank" Runat="server" ControlToValidate="txtMileage" ErrorMessage="Please enter a Mileage value" ForeColor="#0066ff">*</asp:RequiredFieldValidator>
						</td>
					</tr>
					<tr>
						<td align="right" class="FieldLabel">Date of Last Service:&nbsp;</td>
						<td align="left">
							<asp:TextBox ID="txtLastServiceDate" width="80px" Runat="server"></asp:TextBox>
							<asp:CustomValidator ID="csvLastServiceDate" Runat="server" ErrorMessage="Please enter a valid date in MM/DD/YYYY format." ControlToValidate="txtLastServiceDate" ForeColor="#0066ff" Display="Dynamic" OnServerValidate="isValidDate" ClientValidationFunction="isValidDate">*</asp:CustomValidator>
							&nbsp;							
							<A href="javascript:openDatePopup('frmFSMRequest.txtLastServiceDate', '../')" onmousedown="javascript:setPopupFocus();"><IMG id=startdatepic height=16 src="../images/but_calendar.gif" width=16 border=0></A>
						</td>
					</tr>
					<tr><td align="center" colspan=3>&nbsp;</td></tr>
					<tr><td colspan=3 align="center"><asp:button id="cmdGo" CausesValidation="True" onclick="Page_Parser" runat="server" Text=" View Service Interval " commandname="go"></asp:button></td></tr>
					<tr><td colspan=3 align="center"><asp:button id="cmdContinue" CausesValidation="True" visible="False" onclick="cmdContinue_OnClick" runat="server" Text=" Continue " commandname="continue"></asp:button></td></tr>
					<tr><td><br></td></tr>
				</table>
            </div>
			<!--#include file="../include/CommonField.htm" -->
			<input id="txtSetMileageFocus" type="hidden" name="txtSetMileageFocus" runat="server">
			<input id="txtVehicleDescription" type="hidden" name="txtVehicleDescription" runat="server">
			<input id="txtReferrer" type="hidden" name="txtReferrer" runat="server">
        </td>
    </tr>
</table>
</form>
<script language="javascript">

function navPage(){
	<asp:PlaceHolder id="phNav" runat="server"></asp:PlaceHolder>
}

/***********************
* openDatePopup() 
* Open a date popup centered,
* in the screen.
************************/
function openDatePopup(objDateField, sRelativePath){
var intWidth, intHeight, strWindowName, strCoord, sURL;
	
	// set globally defined js var in page.
	setPopupFocus();
	objActiveField = objDateField;
	
	// define window properties.
	intWidth=240;
	intHeight=220;
	strWindowName="DateDialog";
	strCoord = getWindowCoord(intWidth, intHeight);

	// build url
	sURL = FormatUrl(sRelativePath + "/Dialog/DateDialog.aspx?txtDate=" + objDateField.value)
	
	// call page
	theWin = window.open(sURL, strWindowName, "resizable=no,titlebar=0,toolbar=no,menubar=no,location=no,status=no,scrollbars=no," + strCoord);

	//code below does not seem to be needed.
	//---------------------------------------
	//theWin.opener = self;
	//return (theWin);
}
function setPopupFocus(){
	blnPopupFocus = true;
}

/***********************
* getWindowCoord() 
* Pass in width and height of desired 
*	window size, and screen coordinates
*   are returned for a centered window.
************************/
function getWindowCoord(width,height){

   	var str=",height=" + height + ", " + "width=" + width;

	if (window.screen) 
	{ 
		xc = getScreenXPos(width);
		yc = getScreenYPos(height);

		str += ",left=" + xc + ",screenX=" + xc; 
		str += ",top=" + yc + ",screenY=" + yc; 
	}  

	return (str)
}

/***********************
* FormatUrl() 
* Build a URL with required query-string
*	name-value pairs
************************/
function FormatUrl(sUrl){
var objFacility, objUser, lFacilityId, lUserId;

	// get facilityId, userId if defined.
	try{
		objFacility = document.forms[0].txtActiveFacilityId;
		objUser = document.forms[0].txtActiveUserId;
		lFacilityId = objFacility.value;
		lUserId = objUser.value;
	}catch(ex){
		lFacilityId = 0;
		lUserId = 0	;
	}

	sUrl = appendUrl(sUrl, "txtActiveFacilityId", lFacilityId);
	sUrl = appendUrl(sUrl, "txtActiveUserId", lUserId);

	return (sUrl);
}

/***********************
* getScreenXPos() 
* Return a centered horitonal coord
*	based upon desired window width.
************************/
function getScreenXPos(width){
var aw, xc, horizOffset;

	xc = 0;
	horizOffset = 50;
	aw = screen.availWidth;
	
	if (aw > width){
		xc = (aw - width) / 2 - horizOffset;
	}
	
	return (xc);
}

/***********************
* getScreenYPos() 
* Return a centered vertical coord
*	based upon desired window height.
************************/
function getScreenYPos(height){
var ah, yc;

	yc = 0;
	ah = screen.availHeight; 

	if (ah > height){ 
		yc = (ah - height) / 2; 
	} 

	return (yc);
}

/***********************
* appendUrl() 
* Add querystring elements to a url.
************************/
function appendUrl(sUrl, sName, sValue){
var sDelimiter;

	if (sUrl.indexOf("?") > -1){
		sDelimiter = "&"
	} else {
		sDelimiter = "?"
	}

	sUrl = sUrl + sDelimiter + sName + "=" + sValue;
	
	return (sUrl);
}

/***********************
* isValidDate() 
* checks if date passed is in valid mm/dd/yyyy format
************************/
function isValidDate (objSource, objArgs) {
var sep, blnValid, sValue, dValue;
	
	sep = "/";
	blnValid = true;
	sValue = objArgs.Value;
	dValue = new Date(sValue);
	
	if (isNaN(dValue)){
		blnValid = false
	}
	
	objArgs.IsValid = blnValid;
}

</script>
</body>
</HTML>

Answer : Trying to Debug Asp.Net page with javascript

Do you have KEEP TOGETHER set on the report footer?

Do you have NEW PAGE BEFORE set on the footer?

Check in the SECTION EXPERT

mlmcc
Random Solutions  
 
programming4us programming4us