Skip to main content
Participating Frequently
June 15, 2006
Question

PLease help

  • June 15, 2006
  • 1 reply
  • 554 views
I am having a heck of a time getting dreamweaver to pass the seclection made from a dynamic drop-down in the URL to anopther page when a Detail link is clicked. No mater what I do - Dreaweaver will only send the item from first record in the DB table and not any one of the other items selected in the drop down from other records. Please assist in anyway you you can - I have scoured the entire knowledge base, thse forums and google and can't seem to get it right. Many thx in advance.
This topic has been closed for replies.

1 reply

Inspiring
June 15, 2006
Post your code - lets take a look.
Cheers,
Rob
http://robgt.com/ [Tutorials and Extensions]
Firebox stuff: http://robgt.com/firebox
Skype stuff: http://robgt.com/skype
Dell stuff: http://robgt.com/dell
SatNav stuff: http://robgt.com/satnav



BAPWEBAuthor
Participating Frequently
June 15, 2006
Thx Rob -

<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="Connections/caspa.asp" -->
<%
var Recordset1_cmd = Server.CreateObject ("ADODB.Command");
Recordset1_cmd.ActiveConnection = MM_caspa_STRING;
Recordset1_cmd.CommandText = "SELECT Field1 FROM [Access]";
Recordset1_cmd.Prepared = true;

var Recordset1 = Recordset1_cmd.Execute();
var Recordset1_numRows = 0;
%>
<% var MM_paramName = ""; %>
<%
// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

// create the list of parameters which should not be maintained
var MM_removeList = "&index=";
if (MM_paramName != "") MM_removeList += "&" + MM_paramName.toLowerCase() + "=";
var MM_keepURL="",MM_keepForm="",MM_keepBoth="",MM_keepNone="";

// add the URL parameters to the MM_keepURL string
for (var items=new Enumerator(Request.QueryString); !items.atEnd(); items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepURL += "&" + items.item() + "=" + Server.URLencode(Request.QueryString(items.item()));
}
}

// add the Form variables to the MM_keepForm string
for (var items=new Enumerator(Request.Form); !items.atEnd(); items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepForm += "&" + items.item() + "=" + Server.URLencode(Request.Form(items.item()));
}
}

// create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL + MM_keepForm;
if (MM_keepBoth.length > 0) MM_keepBoth = MM_keepBoth.substring(1);
if (MM_keepURL.length > 0) MM_keepURL = MM_keepURL.substring(1);
if (MM_keepForm.length > 0) MM_keepForm = MM_keepForm.substring(1);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CASPA - Connecticut Association of School Personnel Administrators</title>

<script src="WA_Cookies/Cookies.js"></script>
<script type="text/JavaScript">
<!--


function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a )&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d)&&d.all) x=d.all; for (i=0;!x&&i<d.forms.length;i++) x=d.forms
;
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers .document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a
))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

<link href="caspa.css" rel="stylesheet" type="text/css" /></head>

<body>
<a name="top" id="top"></a>
<p> </p>
<table width="806" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="806" height="135" align="left" valign="top"><img src="img/nav/header.jpg" alt="CASPA" width="806" height="135" /></td>
</tr>
<tr>
<td align="left" valign="top" background="img/nav/bkg_whole_page_rht_lft_bord.jpg"><table width="806" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="193" align="left" valign="top">

<!--#include file="menu.html" -->

<p> </p></td>
<td width="613" align="left" valign="top">
<p align="right"> <span class="style3">(<a href="<%= MM_Logout %>" class="style3">logout</a>)</span>       </p>
<p align="center" class="style3">CASPA Admin -Set Member Access Level ( back to <a href="admin.asp">admin homepage</a>) <strong></strong></p>
<p align="left" class="style3">Directions:</p>
<ul class="style2">
<li><strong>Scroll to the member's e-mail address</strong></li>
<li><strong>Click Detail </strong></li>
</ul>
<form id="form1" name="form1">
E-mail Adress of Member: <br />
<table width="96%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="64%" class="style2"><label>
<select name="email" id="email">
<%
while (!Recordset1.EOF) {
%>
<option value="<%=(Recordset1.Fields.Item("Field1").Value)%>" <%=((Recordset1.Fields.Item("Field1").Value == (Recordset1.Fields.Item("Field1").Value))?"selected=\"selected\"":"")%> ><%=(Recordset1.Fields.Item("Field1").Value)%></option>
<%
Recordset1.MoveNext();
}
if (Recordset1.CursorType > 0) {
if (!Recordset1.BOF) Recordset1.MoveFirst();
} else {
Recordset1.Requery();
}
%>
</select>
</label></td>
<td width="36%"><label><A HREF="access_detail.asp?<%= Server.HTMLEncode(MM_keepBoth) + ((MM_keepBoth!="")?"&":"") + "Field1=" + Recordset1.Fields.Item("Field1").Value %>">Detail</A></label></td>
</tr>
</table>
<p>
<label></label></div> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</form>
</td>
</tr>
</table></td>
</tr>
<tr>
<td width="806" height="13" align="left" valign="top"><img src="img/nav/bottom.jpg" alt="CASPA" width="806" height="13" /></td>
</tr>
<tr>
<td height="13" align="left" valign="top">
<!--#include file="footer.html" -->
</td>
</tr>
</table>
<p> Detail</p>
</body>
</html>
<%
Recordset1.Close();
%>