Ask a Question related to Dreamweaver AppDev, Design and Development.
-
standal #1
CF linking with variables
I want to give some background information first:
I am making an online book selling/trading for a small group of people. They
can request a book or sell a book. On the form where they add their information
(addbook.cfm), I want it to only display certain fields depending on what they
want to do. So if they wish to sell a book, I do not want the book requesting
field to be viewable.
I have an index.cfm page that will send them to addbook.cfm, but I want to
have two links: "Selling a Book" and "Requesting a Book". Depending on which
they click, they will only see the fields pertaining to their choice.
On addbook.cfm I have <cfparam name=decidebk default="sell"> where decidebk is
my variable that holds the information. around the table rows I have
<cfif decidebk is "buy"> (table row with this field) <cfelse> (table rows with
selling information) </cfif>
I was thinking that on the index page I would have
<a href="addbook.cfm?ID=#decidebk#">Sell a Book</a>
I dont think this is right, though, because I'm not sure how to tell it to
show the information for "Requesting a Book".
I know this is extremely long and probably very confusing but I have tried so
much to no avail. Anything will help!!
standal Guest
-
#39833 [NEW]: Session variables overwritten by local variables (register_globals=off)
From: sup1382 at accedo dot es Operating system: OpenBSD 3.9 PHP version: 5.2.0 PHP Bug Type: Session related Bug... -
#39447 [NEW]: Want to optionally handle apc_upload_progress variables using session variables
From: krudtaa at yahoo dot com Operating system: All PHP version: 5.2.0 PHP Bug Type: Feature/Change Request Bug... -
Linking with dynamic variables problem..getUrl
I needed to create a flash scrollbar with dynamically generated thumbnails that would link to a page and send the ImageID as a URL parameter. Could... -
Global variables - application variables vs include file
What are the best methods for using global constants and variables? I've noticed that many people put all global constants in a file and include... -
Replacing code based on static variables to variable variables.
Can anyone give me some help or tips in converting this code to take 2 variables that will specify the number of Pack type lines and the number of... -
Paul Whitham TMM #2
Re: CF linking with variables
If you have the ability to create links to the page from another with the
options specified then you are partially on the right track.
On your index page have links like this
<a href="addbook.cfm?action=Sell">Sell a book</a>
<a href="addbook.cfm?action=Request">Request a book</a>
Then on your addbook page start with the following
<cfif is defined("URL.action")>
<cfset decidebk = URL.action>
<cfelse>
<cfset decidebk = "Sell">
</cfif>
Then you can use this variable to show or hide the fields.
--
Regards
Paul Whitham
Macromedia Certified Professional for Dreamweaver MX2004
Valleybiz Internet Design
[url]www.valleybiz.net[/url]
Team Macromedia Volunteer for Ultradev/Dreamweaver MX
[url]www.macromedia.com/support/forums/team_macromedia[/url]
"standal" <webforumsuser@macromedia.com> wrote in message
news:d3jg31$3oo$1@forums.macromedia.com...They> I want to give some background information first:
>
> I am making an online book selling/trading for a small group of people.information> can request a book or sell a book. On the form where they add theirthey> (addbook.cfm), I want it to only display certain fields depending on whatrequesting> want to do. So if they wish to sell a book, I do not want the bookto> field to be viewable.
>
> I have an index.cfm page that will send them to addbook.cfm, but I wantwhich> have two links: "Selling a Book" and "Requesting a Book". Depending ondecidebk is> they click, they will only see the fields pertaining to their choice.
>
> On addbook.cfm I have <cfparam name=decidebk default="sell"> wherewith> my variable that holds the information. around the table rows I have
> <cfif decidebk is "buy"> (table row with this field) <cfelse> (table rowsto> selling information) </cfif>
>
> I was thinking that on the index page I would have
> <a href="addbook.cfm?ID=#decidebk#">Sell a Book</a>
> I dont think this is right, though, because I'm not sure how to tell ittried so> show the information for "Requesting a Book".
>
> I know this is extremely long and probably very confusing but I have> much to no avail. Anything will help!!
>
Paul Whitham TMM Guest



Reply With Quote

