Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page loading slow 1

Status
Not open for further replies.

rtshort

IS-IT--Management
Feb 28, 2001
878
US
I have an ASP Page that has 23 Combo Boxes on a Form made in Interdev. When the page loads, it fills 4 of the Combo Boxes. The rest are loaded when one of the others is
clicked on.

I've also tried loading the page and not filling any of them to see if that makes a difference. No connections or recordsets on load either. It didn't.

Once the page loads, either way above, when you try to scroll the page it's very "jerky". It won't scroll smoothly.

Makes it suck for the user.

Anyone have a hint?

Rob
Just my $.02.
 
Actually, I did figure out part of it, but I don't know a way around it.

When the page loads in IE7 it's jerky. Some lawsuit with Eolas caused M$ to make a user "click" on an ActiveX Control to activate it before it can be used.

I have an older computer with IE6 that I just tried it on, and it works fine.

I'm guessing that's the problem, but I'm not sure. I have a page with TextBoxes on it that loads quick and you still have to click on them to activate it. Just strange to me.

Anyone know a way around this?

Rob
Just my $.02.
 

Ah! the dreaded line 23 problem!

I guess its in line 23 of your code.

But we would all stand a better chance of helping if we could see the page live, and the code behind it.

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Sure.

The URL is Once you get there, click on the button that says "Start Using Mi-step©". That will open another window. When the new window opens, and I will change that later, click on "Start Using Mistep". From there click on "Returning Users". UserName is "test" and Password is "test". Then of course click "Continue". From there, click on "New Estimate". The next page, just click "continue". That will lead you to the "Vessel Owner" page. You can just enter minimal information here. Then click "Continue" at the bottom of that page.

The next page, "VesselInfo.asp" is the page that I'm asking for help on. It's very jerky. It load fairly fast, but when you scroll it, you will see what I'm talking about.

Here is the code.

Code:
<%@ Language=VBScript%>

<%Dim cnHul, rsHul, sqlHul%>
<%Dim cnEng, rsEng, sqlEng%>
<%Dim cnSdr, rsSdr, sqlSdr%>
<%Dim cnTrn, rsTrn, sqlTrn%>
<%Dim cn, rs, sql, msg%>


<%
ClaimNo = Request.Cookies("ClaimNo")
%>

<Div>
<Script Language = "JavaScript" src="_ScriptLibrary/RS.HTM"></Script>
</Div>


<%
Response.Cookies("LName") = Trim(Request.Form("txtVloLName"))
Response.Cookies("FName") = Trim(Request.Form("txtVloFName"))

Set cnHul = Server.CreateObject("ADODB.Connection")
Set cnEng = Server.CreateObject("ADODB.Connection")
Set cnSdr = Server.createObject("ADODB.connection")
Set cnTrn = Server.CreateObject("ADODB.Connection")
Set rsHul = Server.CreateObject("ADODB.RecordSet")
Set rsEng = Server.CreateObject("ADODB.RecordSet")
Set rsSdr = Server.CreateObject("ADODB.RecordSet")
Set rsTrn = Server.CreateObject("ADODB.RecordSet")

cnHul.ConnectionString = "Driver=SQL Server;uid=User;pwd=PWord;Server=Server;Database=DB"
cnHul.Open
sqlHul = "Select Distinct HulStyle from HullDB order by HulStyle"
rsHul.Open sqlHul, cnHul, 3, 3

cnEng.ConnectionString= "Driver=SQL Server;uid=User;pwd=PWord;server=Server;Database=DB"
cnEng.Open
sqlEng = "Select Distinct EngType from EngineDB Order By EngType"
rsEng.Open sqlEng, cnEng, 3, 3

cnSdr.ConnectionString = "Driver=SQL Server;uid=User;pwd=PWord;server=PWord;Database=DB"
cnSdr.Open
sqlSdr = "Select Distinct SdrMake From SterndriveDB Order By SdrMake"
rsSdr.Open sqlSdr, cnSdr, 3, 3

cnTrn.ConnectionString = "Driver=SQL Server;uid=User;pwd=PWord;server=Server;Database=DB"
cnTrn.Open
sqlTrn = "Select Distinct TrnMake From TransmissionDB Order by TrnMake"
rsTrn.Open sqlTrn, cnTrn, 3, 3
%>


<HTML>
<HEAD>

<Script Language = "JavaScript">
<!--
    window.history.forward(-1); 
-->
</script>

<META name=VI60_defaultClientScript content=VBScript>
<TITLE>MI-STEP© Select Vessel Information</TITLE>
<meta name="author" content="PWordert T. Short II, McComb, MS">
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Public Function GetHulID()
	Dim HulID, HulStyle, HulMake, HulModel, HulYear, HulLength, HulHIN
	HulStyle = Trim(frmVesselInfo.cboHulStyle.Value)
	HulMake = Trim(frmVesselInfo.cboHulMake.Value)
	HulModel = Trim(frmVesselInfo.cboHulModel.Value)
	HulYear = Trim(frmVesselInfo.cboHulYear.Value)
	HulLength = Trim(frmVesselInfo.cboHulLength.Value)
	HulHIN = Trim(frmVesselInfo.cboHulHIN.Value)
	Set co = RSExecute("GetVesselData.asp", "GetHull", HulStyle, HulMake, HulModel, HulYear, HulLength, HulHIN)
	HulID = (co.return_value)
	frmVesselInfo.txtHulID.value = HulID
End Function

Public Function GetEngID()
	Dim EngID, EngType, EngMake, EngModel, EngHP, EngYear, EngFType, EngIType, EngSerNo
	EngType = Trim(frmVesselInfo.cboEngType.Value)
	EngMake = Trim(frmVesselInfo.cboEngMake.Value)
	EngModel = Trim(frmVesselInfo.cboEngModel.Value)
	EngHP = Trim(frmVesselInfo.cboEngHP.Value)
	EngYear = Trim(frmVesselInfo.cboEngYear.Value)
	EngFType = Trim(frmVesselInfo.cboEngFuelType.Value)
	EngIType = Trim(frmVesselInfo.cboEngInjType.Value)
	EngSerNo = Trim(frmVesselInfo.cboEngSerNo.Value)
	Set co = RSExecute ("GetVesselData.asp", "GetEngine", EngType, EngMake, EngModel, EngHP, EngYear, EngFType, EngIType, EngSerNo)
	EngID = (co.return_Value)
	frmVesselInfo.txtEngID.Value = EngID
End Function

Public Function GetSdrID()
	Dim SdrID, SdrMake, SdrModel, SdrYear, SdrSerNo
	SdrMake = Trim(frmVesselInfo.cboSdrMake.Value)
	SdrModel = Trim(frmVesselInfo.cboSdrModel.Value)
	SdrYear = Trim(frmVesselInfo.cboSdrYear.Value)
	SdrSerNo = Trim(frmVesselInfo.cboSdrSerNo.Value)
	Set co = RSExecute("GetVesselData.asp", "GetSterndrive", SdrMake, SdrModel, SdrYear, SdrSerNo)
	SdrID = (co.return_value)
	frmVesselInfo.txtSdrID.value = SdrID
End Function

Public Function GetTrnID()
	Dim TrnID, TrnMake, TrnModel, TrnYear, TrnApp, TrnSerNo
	TrnMake = Trim(frmVesselInfo.cboTrnMake.Value)
	TrnModel = Trim(frmVesselInfo.cboTrnModel.Value)
	TrnYear = Trim(frmVesselInfo.cboTrnYear.Value)
	TrnApp = Trim(frmVesselInfo.cboTrnApplication.Value)
	TrnSerNo = Trim(frmVesselInfo.cboTrnSerNo.Value)
	Set co = RSExecute("GetVesselData.asp", "GetTransmission", TrnMake, TrnModel, TrnYear, TrnApp, TrnSerNo)
	TrnID = (co.return_value)
	frmVesselInfo.txtTrnID.value = TrnID
End Function

Sub cmdContinue_Click
	Dim Ctl
	For Each Ctl in frmVesselInfo
		If InStr(ctl.id, "cbo") and ctl.Enabled = True Then
			If ctl.Text <> "" and ctl.MatchFound = False Then
				Msgbox "You must select the information above from the choices given in the Drop Down boxes." & vbCrLf & "At least one box above has information that has been typed in or altered." & vbCrLf & "Please re-select your information.", vbExclamation + vbOkOnly, "CAN NOT WRITE IN INFORMATION"
				ctl.Focus
				Exit Sub
			End If
		End If
	Next

	Dim SureMsg
	If frmVesselInfo.cboHulHIN.Enabled = True And frmVesselInfo.cboHulHIN.Value = "" then
		SureMsg = MsgBox("You have not selected a Hull!" & vbcrlf & "Do you wish to select one now?", vbYesNo + vbQuestion, "SELECT HULL")
		If SureMsg = vbYes then 
			frmVesselInfo.cboHulStyle.Focus
			Exit Sub
		Else
			frmVesselInfo.cboHulStyle.Clear
			frmVesselInfo.cboHulMake.Clear
			frmVesselInfo.cboHulModel.Clear
			frmVesselInfo.cboHulYear.Clear
			frmVesselInfo.cboHulLength.Clear
			frmVesselInfo.cboHulHIN.Clear
		End If
	End If
	If frmVesselInfo.cboEngSerNo.Enabled = True and frmVesselInfo.cboEngSerNo.Value = "" then
		SureMsg = Msgbox("You have not selected an Engine!" & vbcrlf & "Do you wish to select one now?", vbYesNo + vbQuestion, "SELECT ENGINE")
		If sureMsg = vbYes then 
			frmVesselInfo.cboEngType.focus
			Exit Sub
		Else
			frmVesselInfo.cboEngType.Clear
			frmVesselInfo.cboEngMake.Clear
			frmVesselInfo.cboEngModel.Clear
			frmVesselInfo.cboEngHP.Clear
			frmVesselInfo.cboEngYear.Clear
			frmVesselInfo.cboEngFuelType.Clear
			frmVesselInfo.cboEngInjType.Clear
			frmVesselInfo.cboEngSerNo.Clear
		End If
	End If	
	If frmVesselInfo.cboSdrSerNo.Enabled = True and  frmVesselInfo.cboSdrSerNo.Text = "" then
		SureMsg = MsgBox("You have not selected a Sterndrive!" & vbcrlf & "Do you wish to select one now?", vbYesNo + vbQuestion, "SELECT STERNDRIVE")
		If SureMsg = vbYes then
			frmVesselInfo.cboSdrMake.focus
			Exit Sub
		Else
			frmVesselInfo.cboSdrMake.Clear
			frmVesselInfo.cboSdrModel.Clear
			frmVesselInfo.cboSdrYear.Clear
			frmVesselInfo.cboSdrSerNo.Clear
		End If
	End If
	If frmVesselInfo.cboTrnSerNo.Enabled = True And frmVesselInfo.cboTrnSerNo.Text = "" then
		SureMsg = MsgBox("You have not selected a Transmission!" & vbcrlf & "Do you wish to select one now?", vbYesNo + vbQuestion, "SELECT TRANSMISSION")
		If SureMsg = vbYes then
			frmVesselInfo.cboTrnMake.focus
			Exit Sub
		Else
			frmVesselInfo.cboTrnMake.Clear
			frmVesselInfo.cboTrnModel.Clear
			frmVesselInfo.cboTrnYear.Clear
			frmVesselInfo.cboTrnApplication.Clear
			frmVesselInfo.cboTrnSerNo.Clear
		End If
	End If
	If frmVesselInfo.cboHulHIN.Text = "" and frmVesselInfo.cboEngSerNo.Text = "" and frmVesselInfo.cboSdrSerNo.Text = "" and frmVesselInfo.cboTrnSerNo.Text = "" Then
		MsgBox "You must completly select at least one item above to continue!" & vbCrLf & vbCrLf &  "An estimate can not be prepaired without making at least one selection!", vbInformation, "INCOMPLETE SELECTION"
		Exit Sub
	End If
	If frmVesselInfo.cboEngSerNo.Value <> "" Then
		Call GetEngID
	End If
	If frmVesselInfo.cboHulHIN.Value <> "" Then
		Call GetHulID
	End If
	If frmVesselInfo.cboSdrMake.Value <> "" Then
		Call GetSdrID
	End If
	If frmVesselInfo.cboTrnSerNo.Value <> "" Then
		Call GetTrnID
	End If
	frmVesselInfo.cmdContinue.Enabled = False
	frmVesselInfo.method = "Post"
	frmVesselInfo.action = "InsertNewOwner.asp"
	frmVesselInfo.submit()
End Sub

-->

Sub window_onload
	If ("<%=request.cookies("UserID")%>") = "" Then
		MsgBox "This page can not be accessed directly!" & vbcrlf & "Please log on first!", vbcritical, "LOG ON"
		location.href = "Index.asp"
	End If
<%
If rsHul.BOF = true and rsHul.EOF = True then
%>
	frmVesselInfo.cboHulStyle.AddItem "No Record Found"
<%
Else
	rsHul.MoveFirst
	Do Until rsHul.EOF = true
%>
		frmVesselInfo.cboHulStyle.AddItem "<%=rsHul.Fields("HulStyle").Value%>"
<%		
		rsHul.MoveNext
	Loop
End If
rsHul.Close
Set rsHul = Nothing
cnHul.Close
Set cnHul = Nothing
%>

<%
If rsEng.BOF = True and rsEng.EOF = True Then
%>
	frmVesselInfo.cboEngType.AddItem "No Records Found"
<%
Else
	rsEng.MoveFirst
	Do Until rsEng.EOF = True
%>
		frmVesselInfo.cboEngType.AddItem "<%=rsEng.Fields("EngType").value%>"
<%	
		rsEng.MOveNext
	Loop
End If
rsEng.Close
Set rsEng = Nothing
cnEng.close
Set cnEng = Nothing
%>	

<%
If rsSdr.BOF = True and rsSdr.EOF = True Then
%>
	frmVesselInfo.cboSdrMake.AddItem "No Records Found"
<%
Else	
	rsSdr.MoveFirst
	Do Until rsSdr.EOF = True
%>
		frmVesselInfo.cboSdrMake.AddItem "<%=rsSdr.Fields("SdrMake").value%>"
<%
		rsSdr.MoveNext
	Loop
End If
rsSdr.Close
Set rsSdr = Nothing	
cnSdr.close
Set cnSdr = Nothing
%>


<%
If rsTrn.BOF = True and rsTrn.EOF = True Then
%>
	frmVesselInfo.cboTrnMake.AddItem "No Record Found"
<%
Else
	rsTrn.MoveFirst
	Do Until rsTrn.EOF = True
%>
		frmVesselInfo.cboTrnMake.AddItem "<%=rsTrn.Fields("TrnMake").Value%>"
<%
		rsTrn.MoveNext
	Loop
End If
rsTrn.Close
Set rsTrn = Nothing
cnTrn.Close
Set cnTrn = Nothing
%>

frmVesselInfo.txtPolicyNo.Text = Trim(("<%=Request.Form("txtPolicyNo")%>"))
frmVesselInfo.txtRefNo.Text = Trim(CStr("<%=Request.Form("txtRefNo")%>"))
frmVesselInfo.txtFName.Text = Trim(Cstr("<%=Request.Form("txtVloFName")%>"))
frmVesselInfo.txtLName.Text = Trim(CStr("<%=Request.Form("txtVloLName")%>"))
frmVesselInfo.txtAddress.Text = Trim(CStr("<%=Request.Form("txtVloAddress")%>"))
frmVesselInfo.txtCity.Text = Trim(CStr("<%=Request.Form("txtVloCity")%>"))
frmVesselInfo.txtStProv.Text = Trim(CStr("<%=Request.Form("txtVloStProv")%>"))
frmVesselInfo.txtPostalCode.Text = Trim(CStr("<%=Request.Form("txtVloPostalCode")%>"))
frmVesselInfo.txtCountry.Text = Trim(CStr("<%=Request.Form("txtVloCountry")%>"))
frmVesselInfo.txtPhone1.Text = Trim(Cstr("<%=Request.Form("txtVloPhone1")%>"))
frmVesselInfo.txtPhone2.Text = Trim(CStr("<%=Request.Form("txtVloPhone2")%>"))
frmVesselInfo.txtCell.Text = Trim(CStr("<%=Request.Form("txtVloCell")%>"))
frmVesselInfo.txtFax.Text = Trim(CStr("<%=Request.Form("txtVloFax")%>"))
frmVesselInfo.txtEMail.Text = Trim(CStr("<%=Request.Form("txtVloEMail")%>"))
End Sub

Sub cboEngModel_Click()
	frmVesselInfo.cboEngHP.Clear
	frmVesselInfo.cboEngYear.Clear
	frmVesselInfo.cboEngFuelType.Clear
	frmVesselInfo.cboEngInjType.Clear
	frmVesselInfo.cboEngSerNo.Clear
	Dim EngType, EngMake, EngModel, EngHP
	EngType = frmVesselInfo.cboEngType.Value
	EngMake = frmVesselInfo.cboEngMake.Value
	EngModel = frmVesselInfo.cboEngModel.Value
	Set co = RSExecute("FillEngCombo.asp", "FillEngHP", EngType, EngMake, EngModel)
	EngHP = (co.return_value)
	If InStr(EngHP, ",") > 0 then
		EngHP = Split(co.return_value, ",")
		For Each EngHP in EngHP
			frmVesselInfo.cboEngHP.AddItem EngHP
		Next
	else
		EngHP = (co.return_value)
		frmVesselInfo.cboEngHP.AddItem EngHP
	End If
End Sub

Sub cboEngHP_Click
	frmVesselInfo.cboEngYear.Clear
	frmVesselInfo.cboEngFuelType.Clear
	frmVesselInfo.cboEngInjType.Clear
	frmVesselInfo.cboEngSerNo.Clear
	Dim EngType, EngMake, EngModel, EngHP, EngYear
	EngType = frmVesselInfo.cboEngType.Value
	EngMake = frmVesselInfo.cboEngMake.Value
	EngModel = frmVesselInfo.cboEngModel.Value
	EngHP = frmVesselInfo.cboEngHP.Value
	Set co = RSExecute("FillEngCombo.asp", "FillEngYear", EngType, EngMake, EngModel, EngHP)
	EngYear = (co.return_value)
	If InStr(EngYear, ",") Then
		EngYear = Split(co.return_value, ",")
		For Each EngYear in EngYear
			frmVesselInfo.cboEngYear.AddItem EngYear
		Next
	Else
		EngYear = (co.return_value)
		frmVesselInfo.cboEngYear.AddItem EngYear
	End If
End Sub

Sub cboEngYear_Click
	frmVesselInfo.cboEngFuelType.Clear
	frmVesselInfo.cboEngInjType.Clear
	frmVesselInfo.cboEngSerNo.Clear
	Dim EngType, EngMake, EngModel, EngHP, EngYear, EngFType
	EngType = frmVesselInfo.cboEngType.Value
	EngMake = frmVesselInfo.cboEngMake.Value
	EngModel = frmVesselInfo.cboEngModel.Value
	EngHP = frmVesselInfo.cboEngHP.Value
	EngYear = frmVesselInfo.cboEngYear.Value
	Set co = RSExecute("FillEngCombo.asp", "FillEngFType", EngType, EngMake, EngModel, EngHP, EngYear)
	EngFType = (co.return_value)
	If InStr(EngFType, ",") Then
		EngFType = Split(co.return_value, ",")
		For Each EngFType in EngFType
			frmVesselInfo.cboEngFuelType.AddItem EngFType
		Next
	Else
		EngFType = (co.return_value)
		frmVesselInfo.cboEngFuelType.AddItem EngFType
	End If	
End Sub

Sub cboEngFuelType_Click
	frmVesselInfo.cboEngInjType.Clear
	frmVesselInfo.cboEngSerNo.Clear
	Dim EngType, EngMake, EngModel, EngHP, EngYear, EngFType, EngIType
	EngType = frmVesselInfo.cboEngType.Value
	EngMake = frmVesselInfo.cboEngMake.Value
	EngModel = frmVesselInfo.cboEngModel.Value
	EngHP = frmVesselInfo.cboEngHP.Value
	EngYear = frmVesselInfo.cboEngYear.Value
	EngFType = frmVesselInfo.cboEngFuelType.Value
	Set co = RSExecute("FillEngCombo.asp", "FillEngIType", EngType, EngMake, EngModel, EngHP, EngYear, EngFType)
	EngIType = (co.return_value)
	If InStr(EngIType, ",") = True Then
		EngIType = Split(co.return_value, ",")
		For Each EngIType in EngIType
			frmVesselInfo.cboEngInjType.AddItem EngIType
		Next
	Else
		EngIType = (co.return_value)
		frmVesselInfo.cboEngInjType.AddItem EngIType
	End If
End Sub

Sub cboEngInjType_Click
	frmVesselInfo.cboEngSerNo.Clear
	Dim EngType, EngMake, EngModel, EngHP, EngYear, EngFType, EngIType, EngSerNo
	EngType = frmVesselInfo.cboEngType.Value
	EngMake = frmVesselInfo.cboEngMake.Value
	EngModel = frmVesselInfo.cboEngModel.Value
	EngHP = frmVesselInfo.cboEngHP.Value
	EngYear = frmVesselInfo.cboEngYear.Value
	EngFType = frmVesselInfo.cboEngFuelType.Value
	EngIType = frmVesselInfo.cboEngInjType.Value
	Set co = RSExecute("FillEngCombo.asp", "FillEngSerNo", EngType, EngMake, EngModel, EngHP, EngYear, EngFType, EngIType)
	EngSerNo = (co.return_value)
	If InStr(EngSerNo, ",") Then
		EngSerNo = Split(co.return_value, ",")
		For Each EngSerNo in EngSerNo
			frmVesselInfo.cboEngSerNo.AddItem EngSerNo
		Next
	Else
		EngSerNo = (co.return_value)
		frmVesselInfo.cboEngSerNo.AddItem EngSerNo
	End If 
End Sub

Sub cboHulStyle_Click
	frmVesselInfo.cboHulMake.Clear
	frmVesselInfo.cboHulModel.Clear
	frmVesselInfo.cboHulYear.Clear
	frmVesselInfo.cboHulLength.Clear
	frmVesselInfo.cboHulHIN.Clear
	Dim HulMake, HulStyle
	HulStyle = frmVesselInfo.cboHulStyle.Value
	Set co = RSExecute("FillHulCombo.asp", "FillHulMake", HulStyle)
	HulMake = (co.return_value)
	If InStr(HulMake, ",") Then
		HulMake = Split(co.return_value, ",")
		For Each HulMake in HulMake
			frmVesselInfo.cboHulMake.AddItem Hul
		Next
	Else
		HulMake = (co.return_value)
		frmVesselInfo.cboHulMake.AddItem HulMake
	End If
End Sub

Sub cboHulMake_Click
	frmVesselInfo.cboHulModel.Clear
	frmVesselInfo.cboHulYear.Clear
	frmVesselInfo.cboHulLength.Clear
	frmVesselInfo.cboHulHIN.Clear
	Dim HulStyle, HulMake, HulModel
	HulStyle = frmVesselInfo.cboHulStyle.Value
	HulMake = frmVesselInfo.cboHulMake.Value
	Set co = RSExecute("FillHulCombo.asp", "FillHulModel", HulStyle, HulMake)
	HulModel = (co.return_value)
	If InStr(HulStyle, ",") > 0 Then
		HulModel = Split(co.return_value, ",")
		For Each HulModel in HulModel
			frmVesselInfo.cboHulModel.AddItem HulModel
		Next
	Else
		HulModel = (co.return_value)
		frmVesselInfo.cboHulModel.AddItem HulModel
	End If
End Sub

Sub cboHulModel_Click
	frmVesselInfo.cboHulYear.Clear
	frmVesselInfo.cboHulLength.Clear
	frmVesselInfo.cboHulHIN.Clear
	Dim HulStyle, HulMake, HulModel, HulYear
	HulStyle = frmVesselInfo.cboHulStyle.Value
	HulMake = frmVesselInfo.cboHulMake.Value
	HulModel = frmVesselInfo.cboHulModel.Value
	Set co = RSExecute("FillHulCombo.asp", "FillHulYear", HulStyle, HulMake, HulModel)	
	HulYear = (co.return_value)
	If InStr(HulYear, ",") > 0 Then
		For Each HulYear in HulYear
			HulYear = Split(co.return_value)
			frmVesselInfo.cboHulYear.AddItem HulYear
		Next
	Else
		HulYear = (co.return_value)
		frmVesselInfo.cboHulYear.AddItem HulYear
	End If
End Sub

Sub cboHulYear_Click
	frmVesselInfo.cboHulLength.Clear
	frmVesselInfo.cboHulHIN.Clear
	Dim HulStyle, HulMake, HulModel, HulYear, HulLength
	HulStyle = frmVesselInfo.cboHulStyle.Value
	HulMake = frmVesselInfo.cboHulMake.Value
	HulModel = frmVesselInfo.cboHulModel.Value
	HulYear = frmVesselInfo.cboHulYear.Value
	Set co = RSExecute("FillHulCombo.asp", "FillHulLength", HulStyle, HulMake, HulModel, HulYear)	
	HulLength = (co.return_value)
	If InStr(HulLength, ",") > 0 Then
		HulLength = Split(co.return_value, ",")
		For Each HulLength in HulLength
			frmVesselInfo.cboHulLength.AddItem HulLength
		Next
	Else
		HulLength = (co.return_value)
		frmVesselInfo.cboHulLength.AddItem HulLength
	End If
End Sub

Sub cboHulLength_Click
	frmVesselInfo.cboHulHIN.Clear
	Dim HulStyle, HulMake, HulModel, HulYear, HulLength, HulHIN
	HulStyle = frmVesselInfo.cboHulStyle.Value
	HulMake = frmVesselInfo.cboHulMake.Value
	HulModel = frmVesselInfo.cboHulModel.Value
	HulYear = frmVesselInfo.cboHulYear.Value
	HulLength = frmVesselInfo.cboHulLength.Value
	Set co = RSExecute("FillHulCombo.asp", "FillHulHIN", HulStyle, HulMake, HulModel, HulYear, HulLength)	
	HulHIN = (co.return_value)
	If InStr(HulHIN, ",") > 0 Then
		HulHIN = Split(co.return_value, ",")
		For Each HulHIN in HulHIN
			frmVesselInfo.cboHulHIN.AddItem HulHIN
		Next
	Else
		HulHIN = (co.return_value)
		frmVesselInfo.cboHulHIN.AddItem HulHIN
	End If
End Sub

Sub cboEngType_Click()
	frmVesselInfo.cboEngMake.Clear
	frmVesselInfo.cboEngModel.Clear
	frmVesselInfo.cboEngHP.Clear
	frmVesselInfo.cboEngYear.Clear
	frmVesselInfo.cboEngFuelType.Clear
	frmVesselInfo.cboEngInjType.Clear
	frmVesselInfo.cboEngSerNo.Clear
	If frmVesselInfo.cboEngType.Text = "O/B" Then
		MsgBox "Selecting an Outboard Engine will disable the Stern Drive and Transmission Selections since they are not needed with an Outboard Engine!", vbInformation + vbOkOnly, "MI-STEP© INFORMATION"
	End If
	Dim EngMake, EngType
	EngType = frmVesselInfo.cboEngType.Value
	Set co = RSExecute("FillEngCombo.asp", "FillEngMake", EngType)
	EngMake = Split(co.return_value, ",")
	for each EngMake in EngMake
		frmVesselInfo.cboEngMake.AddItem EngMake
	Next
End Sub
'**********************************************************************************
Sub cboEngMake_Click()
	frmVesselInfo.cboEngModel.Clear
	frmVesselInfo.cboEngHP.Clear
	frmVesselInfo.cboEngYear.Clear
	frmVesselInfo.cboEngFuelType.Clear
	frmVesselInfo.cboEngInjType.Clear
	frmVesselInfo.cboEngSerNo.Clear
	Dim EngModel, EngType, EngMake
	EngType = frmVesselInfo.cboEngType.Value
	EngMake = frmVesselInfo.cboEngMake.Value
	Set co = RSExecute("FillEngCombo.asp", "FillEngModel", EngType, EngMake)
	EngModel = (co.return_value)
	If InStr(EngModel, ",") > 0 then
		EngModel = Split(co.return_value, ",")
		for each EngModel in EngModel
			frmVesselInfo.cboEngModel.AddItem EngModel
		next
	Else
		EngModel = (co.return_value)
		frmVesselInfo.cboEngModel.AddItem EngModel
	End If
End Sub

Sub cboSdrMake_Click
	frmVesselInfo.cboSdrModel.Clear
	frmVesselInfo.cboSdrYear.Clear
	frmVesselInfo.cboSdrSerNo.Clear
	MsgBox "Selecting a Sterndrive and Transmission will clear and disable the Outboard Engine since the two are not used together.", vbInformation + vbOkOnly, "MI-STEP© INFORMATION"
	Dim SdrMake, SdrModel
	SdrMake = frmVesselInfo.cboSdrMake.Value
	Set co = RSExecute("FillSdrCombo.asp", "FillSdrModel", SdrMake)
	SdrModel = (co.return_value)
	If InStr(SdrModel, ",") > 0 Then
		SdrModel = Split(co.return_value, ",")
		For Each SdrModel in SdrModel
			frmVesselInfo.cboSdrModel.AddItem SdrModel
		Next
	Else
		SdrModel = (co.return_value)
		frmVesselInfo.cboSdrModel.AddItem SdrModel
	End If
End Sub

Sub cboSdrModel_Click
	frmVesselInfo.cboSdrYear.Clear
	frmVesselInfo.cboSdrSerNo.Clear
	Dim SdrMake, SdrModel, SdrYear
	SdrMake = frmVesselInfo.cboSdrMake.Value
	SdrModel = frmVesselInfo.cboSdrModel.Value
	Set co = RSExecute("FillSdrCombo.asp", "FillSdrYear", SdrMake, SdrModel)
	SdrYear = (co.return_value)
	If InStr(SdrYear, ",") > 0 Then
		SdrYear = Split(co.return_value, ",")
		For Each SdrYear in SdrYear
			frmVesselInfo.cboSdrYear.AddItem SdrYear
		Next
	Else
		SdrYear = (co.return_value)
		frmVesselInfo.cboSdrYear.AddItem SdrYear
	End If
End Sub

Sub cboSdrYear_Click
	frmVesselInfo.cboSdrSerNo.Clear
	Dim SdrMake, SdrModel, SdrYear, SdrSerNo
	SdrMake = frmVesselInfo.cboSdrMake.Value
	SdrModel = frmVesselInfo.cboSdrModel.Value
	SdrYear = frmVesselInfo.cboSdrYear.Value
	Set co = RSExecute("FillSdrCombo.asp", "FillSdrSerNo", SdrMake, SdrModel, SdrYear)
	SdrSerNo = (co.return_value)
	If InStr(SdrSerNo, ",") > 0 Then
		SdrSerNo = Split(co.return_value, ",")
		For Each SdrSerNo in SdrSerNo
			frmVesselInfo.cboEngSerNo.AddItem SdrSerNo
		Next
	Else
		SdrSerNo = (co.return_value)
		frmVesselInfo.cboSdrSerNo.AddItem SdrSerNo
	End If
End Sub

Sub cboTrnMake_Click
	frmVesselInfo.cboTrnModel.Clear
	frmVesselInfo.cboTrnYear.Clear
	frmVesselInfo.cboTrnApplication.Clear
	frmVesselInfo.cboTrnSerNo.Clear
	MsgBox "Selecting a Sterndrive and Transmission will clear and disable the Outboard Engine since the two are not used together.", vbInformation + vbOkOnly, "MI-STEP© INFORMATION"
	Dim TrnMake, TrnModel
	TrnMake = frmVesselInfo.cboTrnMake.Value
	Set co = RSExecute("FillTrnCombo.asp", "FillTrnModel", TrnMake)
	TrnModel = (co.return_value)
	If InStr(TrnModel, ",") > 0 Then
		TrnModel = Split(co.return_value, ",")
		For Each TrnModel in TrnModel
			frmVesselInfo.cboTrnModel.AddItem TrnModel
		Next
	Else
		TrnModel = (co.return_value)
		frmVesselInfo.cboTrnModel.AddItem TrnModel
	End If
End Sub

Sub cboTrnModel_Click
	frmVesselInfo.cboTrnYear.Clear
	frmVesselInfo.cboTrnApplication.Clear
	frmVesselInfo.cboTrnSerNo.Clear
	Dim TrnMake, TrnModel, TrnYear
	TrnMake = frmVesselInfo.cboTrnMake.Value
	TrnModel = frmVesselInfo.cboTrnModel.Value
	Set co = RSExecute("FillTrnCombo.asp", "FillTrnYear", TrnMake, TrnModel)	
	TrnYear = (co.return_value)
	If InStr(TrnYear, ",") > 0 Then
		TrnYear = Split(co.return_value, ",")
		For Each TrnYear in TrnYear
			frmVesselInfo.cboTrnYear.AddItem TrnYear
		Next
	Else
		TrnYear = (co.return_value)
		frmVesselInfo.cboTrnYear.AddItem TrnYear
	End If			
End Sub

Sub cboTrnYear_Click
	frmVesselInfo.cboTrnApplication.Clear
	frmVesselInfo.cboTrnSerNo.Clear
	Dim TrnMake, TrnModel, TrnYear, TrnApp
	TrnMake = frmVesselInfo.cboTrnMake.Value
	TrnModel = frmVesselInfo.cboTrnModel.Value
	TrnYear = frmVesselInfo.cboTrnYear.Value
	Set co = RSExecute("FillTrnCombo.asp", "FillTrnApp", TrnMake, TrnModel, TrnYear)
	TrnApp = (co.return_value)
	If InStr(TrnApp, ",") > 0 Then
		TrnApp = Split(co.return_value, ",")
		For Each TrnApp in TrnApp
			frmVesselInfo.cboTrnApplication.AddItem TrnApp
		Next
	Else
		TrnApp = (co.return_value)
		frmVesselInfo.cboTrnApplication.AddItem TrnApp
	End If
End Sub

Sub cboTrnApplication_Click
	frmVesselInfo.cboTrnSerNo.Clear
	Dim TrnMake, TrnModel, TrnYear, TrnApp
	TrnMake = frmVesselInfo.cboTrnMake.Value
	TrnModel = frmVesselInfo.cboTrnModel.Value
	TrnYear = frmVesselInfo.cboTrnYear.Value
	TrnApp = frmVesselInfo.cboTrnApplication.Value
	Set co = RSExecute("FillTrnCombo.asp", "FillTrnSerNo", TrnMake, TrnModel, TrnYear, TrnApp)	
	TrnSerNo = (co.return_value)
	If InStr(TrnSerNo, ",") > 0 then
		For Each TrnSerNo in TrnSerNo
			TrnSerNo = Split(co.return_value, ",")
			frmVesselInfo.cboTrnSerNo.AddItem TrnSerNo
		Next
	Else
		TrnSerNo = (co.return_value)
		frmVesselInfo.cboTrnSerNo.AddItem TrnSerNo
	End If	
End Sub

Sub cboEngSerNo_Click
	If frmVesselInfo.cboEngType.Text = "O/B" and frmVesselInfo.cboEngSerNo.Text <> "" Then
		frmVesselInfo.cboSdrMake.Enabled = False
		frmVesselInfo.cboSdrMake.Text = ""
		frmVesselInfo.cboSdrModel.Enabled = False
		frmVesselInfo.cboSdrModel.Text = ""
		frmVesselInfo.cboSdrYear.Enabled = False
		frmVesselInfo.cboSdrYear.Text = ""
		frmVesselInfo.cboSdrSerNo.Enabled = False
		frmVesselInfo.cboSdrSerNo.Text = ""
		frmVesselInfo.cboTrnMake.Enabled = False
		frmVesselInfo.cboTrnMake.Text = ""
		frmVesselInfo.cboTrnModel.Enabled = False
		frmVesselInfo.cboTrnModel.Text = ""
		frmVesselInfo.cboTrnYear.Enabled = False
		frmVesselInfo.cboTrnYear.Text = ""
		frmVesselInfo.cboTrnApplication.Enabled = False
		frmVesselInfo.cboTrnApplication.Text = ""
		frmVesselInfo.cboTrnSerNo.Enabled = False
		frmVesselInfo.cboTrnSerNo.Text = ""
	End If
End Sub

Sub cboSdrSerNo_Click
	If frmVesselInfo.cboSdrSerNo.Text <> "" then
		frmVesselInfo.cboEngType.Enabled = False
		frmVesselInfo.cboEngType.Text = ""
		frmVesselInfo.cboEngMake.Enabled = False
		frmVesselInfo.cboEngMake.Text = ""
		frmVesselInfo.cboEngModel.Enabled = False
		frmVesselInfo.cboEngModel.Text = ""
		frmVesselInfo.cboEngHP.Enabled = False
		frmVesselInfo.cboEngHP.Text = ""
		frmVesselInfo.cboEngYear.Enabled = False
		frmVesselInfo.cboEngYear.Text = ""
		frmVesselInfo.cboEngFuelType.Enabled = False
		frmVesselInfo.cboEngFuelType.Text = ""
		frmVesselInfo.cboEngInjType.Enabled = False
		frmVesselInfo.cboEngInjType.Text = ""
		frmVesselInfo.cboEngYear.Enabled = False
		frmVesselInfo.cboEngSerNo.Text = ""
	End If
End Sub

Sub cboTrnSerNo_Click
	If frmVesselInfo.cboTrnSerNo.Text  <> "" then
		frmVesselInfo.cboEngType.Enabled = False
		frmVesselInfo.cboEngType.Text = ""
		frmVesselInfo.cboEngMake.Enabled = False
		frmVesselInfo.cboEngMake.Text = ""
		frmVesselInfo.cboEngModel.Enabled = False
		frmVesselInfo.cboEngModel.Text = ""
		frmVesselInfo.cboEngHP.Enabled = False
		frmVesselInfo.cboEngHP.Text = ""
		frmVesselInfo.cboEngYear.Enabled = False
		frmVesselInfo.cboEngYear.Text = ""
		frmVesselInfo.cboEngFuelType.Enabled = False
		frmVesselInfo.cboEngFuelType.Text = ""
		frmVesselInfo.cboEngInjType.Enabled = False
		frmVesselInfo.cboEngInjType.Text = ""
		frmVesselInfo.cboEngYear.Enabled = False
		frmVesselInfo.cboEngSerNo.Text = ""
	End If
End Sub

I've also tried loading this page without opening any recordsets, and it's still slow.

Thanks

Rob
Just my $.02.
 
Here's one example of code that you need to change in several places:
Code:
Do Until rsTrn.EOF = True
%>
        frmVesselInfo.cboTrnMake.AddItem "<%=rsTrn.Fields("TrnMake").Value%>"
<%
        rsTrn.MoveNext
    Loop

should be
Code:
Do Until rsTrn.EOF = True
  Response.Write  "frmVesselInfo.cboTrnMake.AddItem " & Chr(39) & rsTrn.Fields("TrnMake").Value & Chr(39) & vbCrLf
  rsTrn.MoveNext
Loop

Lee
 

Sorry but I think you will always struggle with this as it stands. As it uses client side VBS and Microsoft Active X controls it's obviously completely unusable EXCEPT in IE. With the new security settings in IE7 it's effectively unusable, as every page brings up security warnings, and you need to select every control twice to activate it.

My client profile is around 25% FF, 33% IE6 and 35% IE7, so if your user profile is similar then two thirds of your potential users will go elsewhere.

Might be worth looking at a more conventional format for your site. This would be fairly straightforward AJAX, which would leave the site much quicker and more responsive, and available to many more users (currently 96% of my user profile has javascript enabled, and it's not hard to provide cover for those who don't).

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
It has to be something to do with the Active X Controls. I used it on my other older computer that has IE6 and you don't have to "click to activate" and it runs fine. Even once all of the controls are clicked and activated on the page, it's still jerky on IE7. On IE6 it is smooth as it should be and scrolls just fine.

I don't think personally that response.write would speed it up any since there is not a problem populating the Combo Box. As soon as you click on the first one, the next one is already populated. After more parts are added to the database though, that may do better for me. I'll certainly keep that in mind.

I've even taken all of the code off of the page and loaded it. Still jerky with no server side activity.

I'm aware that it's limited to IE, but the company that has seen it wants is. They wouldn't care if they had to go out and purchase IE. They really want it bad and I get calls everyday asking when it will be available. The only gripe they have is that one page being jerky to navigate.

Thanks for the tips.

Rob
Just my $.02.
 
Well, I had an idea, so I tried it. I clicked on all of the controls and the page was not jerky anymore.

If Bill would have just paid the Eolas for their technology like he want's to get paid, I'd have no problem.

I did find a site, that is supposed to have a fix, but it didn't work for me. I'm searching for another.

Rob
Just my $.02.
 
Just for anyone who is pulling their hair out like I was, it took me 2 days of "Googling" but I found a solution. Actually it's more of a workaround. I found several but this is the easiest one to implement.

Copy and paste this in a text editor and name it "ieupdate.js". It needs to be placed in the Root Directory of your web-site.

Code:
objects = document.getElementsByTagName("object");
for (var i = 0; i < objects.length; i++)
{
    objects[i].outerHTML = objects[i].outerHTML;
}

Copy and paste this at the end of the object tag.

Code:
<script type="text/javascript" src="ieupdate.js"></script>

The above causes the Object to be loaded via External Script therefore there is no violation of the Eolas patten.

M$ is supposed to have this fixed in April of this year, but just in case you know.

Thanks to all of you who gave me suggestions on this post. I really appreciate it.

Rob
Just my $.02.
 
Thanks Rob for posting your solution to this interesting problem.
 
Sure. I figured that if I had a problem with it, someone else might too and end up here from Google. Thought it would be nice for them to find a solution like I have here SO many times.

I see a lot of forums where people obviously figure something out and never post the solution.

I did find a "patch" for IE7 also that keeps you from having to "click to activate" but it has to be installed on the end users computer. That was not an option for me. I would post the link, but I've lost it. Sorry.

Have a GREAT WEEKEND ALL





Rob
Just my $.02.
 
And as Columbo would have said it, just one more thing.

I had a page with a grid on it and went through the rows using "I" as a variable. Needless to say, that page and the ieupdate script clashed.

I replaced the I with an X and named it xieupdate and used it on that page.

Rob
Just my $.02.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top