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 
|
 |
 |
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 |
 |
 |
|