Solved

dropdown box onChange problems

Posted on 2003-12-12
3
369 Views
Last Modified: 2013-12-24
Hi Experts,

I got the scripts from EE and was testing on it, but there's some problems:

<script language="JavaScript">
      function gotosite(url)
      {
            window.location.href=url;

      }
</script>

<cfselect name="type" multiple="no" passthrough="onChange='gotosite(this.options[this.selectedIndex].value)'">
<cfoutput query="ssr_albumtype_list">
      <option value='photo_add.cfm?type=#albumtype#'>#albumtype#</option>
</cfoutput>      
</cfselect>


Dropdown values
- member
- public
Ok, When i select a value (public) from the dropdown, the page will refresh itself. But the type i selected did not change in the dropdown box, it is still (member). I can't select back the (member) value. What is wrong with my codes?

Jimbo
0
Comment
Question by:jimboVB
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
anandkp earned 50 total points
ID: 9927886
is this what ur looking for

<CFSELECT NAME="type" MULTIPLE="no" PASSTHROUGH="onChange='gotosite(this.options[this.selectedIndex].value)'">
<CFOUTPUT QUERY="ssr_albumtype_list">
    <OPTION VALUE='PHOTO_ADD.CFM?TYPE=#ALBUMTYPE#' <CFIF ISDEFINED('TYPE') AND COMPARENOCASE(ALBUMTYPE,TYPE) EQ 0>Selected</CFIF>>#albumtype#</OPTION>
</CFOUTPUT>    
</CFSELECT>

let me know

K'Rgds
Anand
0
 
LVL 1

Author Comment

by:jimboVB
ID: 9928009
Alrite, that was a fast answer, thx.. XD

I got another question though, quicks answers too.. =P

Alrite, when i click on this link "photo_add.cfm" (without defining ?type= at the back) the server will give me an error. "TYPE is undefined in URL". What can i do?
0
 
LVL 1

Author Comment

by:jimboVB
ID: 9928033
well, nevermind, i got it solved.
just added this line of code

<cfparam name="url.type" default="all">

thanks for helping... ^^
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Migration from IIS6 onto IIS7 6 48
VPN Dedicated IP address question 7 43
Forbidden errors 5 121
cookies analysis tools 2 65
This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now