CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Listbox used for navigating application

Print topic Send  topic

Author Message
BucBrews
Posted: 01/03/2003, 1:11 PM

Looking for some help with using a listbox to select the type of form to open after the user hits the "select" button (redirect). The page was created using the record builder even though the listbox options are only selections for the next displayed form not for data input. I'm using ASP and the listbox option values (select properties)are the filenames or urls. The purpose of the listbox is to allow selection of a form instead of hyperlinks.
jxhpl
Posted: 01/04/2003, 7:20 PM

u can try the following code below. It will redirect the user to a URL as soon as they change the selection from the dropdown menu. you can use a button instead with something like onClick="javascript:document.location.href=document.goUrl.cboLinks.value"

hope this helps.
<%
set rsLinks = server.createObject("ADODB.Recordset")
set objConn = server.CreateObject("ADODB.Connection")
strSql = "your sql statement to get the links and their descriptions from the table in the database"
rsLinks.Open strSql, objConn ,1,2
if not rsLinks.EOF and rsLinks.BOF then
const URL = 0
const DISPLAY = 1
aLinks = rsLinks.getRows
end if
rsLinks.Close
set rsLinks = nothing
set objConn = nothing
%>
<form name="goUrl">
<select name="cboLinks" onChange="javascript:document.location.href = this.value">
<%
if isarray(aLinks) then
for i = 0 to ubound(aLinks,2)
%>
<option value="<%=aLinks(URL ,0)%>"><%=aLinks(DISPLAY,0)%></option>
<%
next
end if
%>
</form>
jxhpl
Posted: 01/04/2003, 7:23 PM

Have a look at the link below. It is very close to what you are looking for. They have a links instead of a button for the redirection.

It is a great site overall for tips and tricks and javascript.

http://javascript.internet.com/navigation/dynamic-links.html

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.