Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

undefined parameter 1

Status
Not open for further replies.

wouter

Technical User
Jul 3, 2000
45
NL
i've got this page you can access in three ways:

1. Without a parameter.

2. With a parameter (desktop.cfm?param_status=on)

3. With a parameter (desktop.cfm?param_status=off)

When the page is accessed with a parameter there's no problem at all, but when the page is accessed without a parameter (just 'desktop.cfm') is says (ofcourse) param_status is undefined.

Is there a way to say like:

<cfif param_status = undefined>

blah blah blah blah

</cfif>

Any help is greatly appreciated.

regards, wouter Wouter
zure_zult@hotmail.com
To me, boxing is like a ballet, except there's no music, no choreography, and the dancers hit each other.
 
What I've done in some of my pages that can be access in a similar manner is do:

<cfif not isdefined(&quot;url.param_status&quot;)>
<cfset url.param_status = &quot;off&quot;>
</cfif>

effectively spoofing the parameter.


 
You can use the cfparam tag:

<cfparam name=&quot;URL.param_status&quot; default=&quot;off&quot;>

-Tek
 
Thanks, IsDefined worked like a charm. I'll give cfparam a try too, because i'm not yet familiar (enough) with this tag. Thanks for your response. Wouter
zure_zult@hotmail.com
To me, boxing is like a ballet, except there's no music, no choreography, and the dancers hit each other.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top