It looks like you can't use CFLOCATION since IE doesn't reflect the new URL
in the address bar, but depending on how many entries are in the db you
could use JS to solve your problem.
If there are fewer than 100 entries you could create parallel arrays in JS
when the page loads then use a function to check the arrays when a user
types something in the text field like so:
<CFQUERY NAME="redirect" DATASOURCE="cygwinprofile">
SELECT *
FROM profile
</CFQUERY>
<script....>
function reLocate(value){
var aliasArray = new
Array(<cfoutput>#quotedValueList(redirect.alias)#</cfoutput>);
var folderNameArray = new
Array(<cfoutput>#quotedValueList(redirect.path)#</cfoutput>)
for( i=0; i<aliasArray.length; i++ ){
if( aliasArray[i] == value ){
window.location = pathArray[i];
break;
}
}
}
This will be case sensitive unless you use the TOUPPERCASE or TOLOWERCASE
functions.
Another choice is to use a META refresh tag if your goal is refreshability
Bryan Love ACP
Internet Application Developer
[EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 9:54 AM
To: CF-Talk
Subject: Re: Form submission
Hi,
I'm a little stumped.
I'm using CFDIRECTORY to list dir/files with hyperlinks on all.
If I click on a directory I get the following in the URL:
http://127.0.0.1/index.cfm?dir=d%3A%5Cbooks\
I also have an <INPUT box where I can type in for example "b161" and click
on the submit button which then looks into the database
for a match then passes the directory path to a <CFPARAM which works great.
My problem is I want to pass all this info to the browser URL but all I get
is http://127.0.0.1/redirect.cfm.
What I really want is http://127.0.0.1/redirect.cfm?dir=d%3A%5Cbooks\ so if
the user hits the refresh I won't get a browser error..."This page cannot
be sent without resending the information. Click retry to send the
information again....etc"
Is there a way to pass this information to the index.cfm file rather than
redirecting to another file?
<CFFORM ACTION="redirect.cfm" METHOD="GET" ENABLECAB="Yes" name="form3">
<TABLE WIDTH="168" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD>
<CFINPUT TYPE="text" NAME="redirect" VALUE="" SIZE="10"
MAXLENGTH="30"
CLASS="dirlinks">
</TD>
<TD ALIGN="right">
<INPUT TYPE="submit" VALUE="Go!" CLASS="dirlinks">
<CFQUERY NAME="redirect" DATASOURCE="cygwinprofile">
SELECT *
FROM profile
WHERE alias = '#redirect#'
</CFQUERY>
</TD>
</TR>
</TABLE>
</CFFORM>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists