globeautosales
11-11-2003, 04:19 PM
=======================
IIS 5.0
Access 2000
Database is used via intranet
running .asp pages.
All scripting is vbsript
=======================
I hope I don't make this sound harder than what it probably is.
I'm working to two pages:
recent.asp
edit.asp
recent.asp is essentially what you would call a report in access. It shows a list of our current customers.
edit.asp is essentially what you would call a form in access. We use this to edit :D our customers. The navigation on this page is a drop down box that shows a list of our customers and when you select it it navigates to that record. Here's the code:
<SCRIPT language=vbscript event=onchange for=CustID>
<!--
Dim rs
Set rs = MSODSC.DefaultRecordset
rs.Find "[Name] = '" & document.all.item("CustID").value & "'", 0, 1, 1
-->
</SCRIPT>
What I'm trying to do is on the recent.asp is include a button that opens edit.asp and navigates automatically to that customer. Something like this:
<SCRIPT language=vbscript event=onclick for=editbutton>
Dim Customer
Customer = MSODSC.DefaultRecordset("name")
window.open ("edit.asp?CustID=" &Customer)
</SCRIPT>
As it stands right now, it opens the window but doesn't navigate to the appropriate customer.
Any ideas?
PS If anyone knows a way other than vbscript, I am open to suggestions.
IIS 5.0
Access 2000
Database is used via intranet
running .asp pages.
All scripting is vbsript
=======================
I hope I don't make this sound harder than what it probably is.
I'm working to two pages:
recent.asp
edit.asp
recent.asp is essentially what you would call a report in access. It shows a list of our current customers.
edit.asp is essentially what you would call a form in access. We use this to edit :D our customers. The navigation on this page is a drop down box that shows a list of our customers and when you select it it navigates to that record. Here's the code:
<SCRIPT language=vbscript event=onchange for=CustID>
<!--
Dim rs
Set rs = MSODSC.DefaultRecordset
rs.Find "[Name] = '" & document.all.item("CustID").value & "'", 0, 1, 1
-->
</SCRIPT>
What I'm trying to do is on the recent.asp is include a button that opens edit.asp and navigates automatically to that customer. Something like this:
<SCRIPT language=vbscript event=onclick for=editbutton>
Dim Customer
Customer = MSODSC.DefaultRecordset("name")
window.open ("edit.asp?CustID=" &Customer)
</SCRIPT>
As it stands right now, it opens the window but doesn't navigate to the appropriate customer.
Any ideas?
PS If anyone knows a way other than vbscript, I am open to suggestions.