Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / General CF Topics / July 2008



Tip: Looking for answers? Try searching our database.

Novice need helps with variable defaults

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
fishidaho - 31 Jul 2008 04:26 GMT
I currently use this code as a default.. <CFPARAM NAME="URL.TR_ID"
DEFAULT="369">  I would like to alternate defaults numbers on a daily bases...  
can anyone provide me  advise on how to go about it..

Regards
Ben
Azadi - 31 Jul 2008 04:36 GMT
<cfset myvar = some cf math or other magic to get the number here>
<cfparam name="url.tr_id" default="#myvar#">

or just
<cfparam name="url.tr_id" default="#some cf math or other magic to get
the number here#">

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
fishidaho - 31 Jul 2008 20:53 GMT
I tried a var tag using java but it didn't work... it would work below <html><head> tags but not above it
Chris Blackwell - 31 Jul 2008 23:03 GMT
> I tried a var tag using java but it didn't work... it would work below <html><head> tags but not above it

you probably mean javascript, but whats that got to do with cfparam?
do you want to set the variable in cf, so that url.tr_id is available
on the server, or are you trying to set it on the clients browser?
eightcharacters - 31 Jul 2008 04:37 GMT
alternate between what?
fishidaho - 31 Jul 2008 18:26 GMT
I would like to use 344,356,359,411,369,376,396
Dan Bracuk - 31 Jul 2008 18:30 GMT
You have a list of 7 items.  There are 7 days in a week.

Can you think of any way that cold fusion's DayofWeek() function might be useful?
eightcharacters - 31 Jul 2008 23:15 GMT
<cfset optionsList = '344,356,359,411,369,376,396'>
<cfparam name='URL.TR_ID' default="#listGetAt(optionsList,dayOfWeek(now()))#">
fishidaho - 31 Jul 2008 23:37 GMT
thanks eightcharacters,,, it worked...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.