CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 List Box Drop Down URL Jump

Print topic Send  topic

Author Message
Bubba

Posts: 33
Posted: 02/15/2005, 5:54 PM

Hi,

I am using CodeChage Studio 2.2.2.40 with ASP.

I have a drop down list box I have populated from a DB table.

The db table has 2 fields - the text value and the URL to access this area.

Control Source is set to the URL field
Bound Column is set to the URL field
Text Column is set to the Text value field
Data Source = SQL

Is there any way to emulate the typical JavaScript function that allows a user to select a value from a list box - then jump to a new URL based on their selection.

In JavaScipt I would do it like this:

<form name="jump1">
<select name="myjumpbox"
OnChange="location.href=jump1.myjumpbox.options[selectedIndex].value">
<option selected>Please Select...
<option value="http://www.url01/">URL 1
<option value="http://www.url02/">URL 2
<option value="http://www.url3/">URL 3
</select>
</form>

The draw back of course is the options are hard coded, thus static. Therefore I want to have the options bound to a database table - so the drop down values stay fresh.

I have tried several custom codes with CodeCharge but with no luck.

Has anyone achieved this? If so, could you please share your genius with me and the world :-)
View profile  Send private message
mrachow


Posts: 509
Posted: 02/15/2005, 11:58 PM

My first idea is
- Build the listbox with the text values
- After the user had done a selection and submitted the page take the selected id/key and read the URL from the database (CCDLookUp for reading one value).
- set the default variable Redirect to the read URL.
_________________
Best regards,
Michael
View profile  Send private message

Add new topic Subscribe to topic   


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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