User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 361,899 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,379 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 8224 | Replies: 2
Reply
Join Date: Jul 2005
Posts: 3
Reputation: nitinmenon is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nitinmenon nitinmenon is offline Offline
Newbie Poster

hash symbol in a tag

  #1  
Jul 31st, 2005
im not quite sure what this means, ive got this sample code that im trying to figure out:
<FORM ACTION ="QUIZ_RESULTS.CFM" METHOD="POST">
<P><HR><B> QUESTION ###CURRENTROW# IS:</B>
<BR><I> #QUESTION#>

the second line is really what i dont understand. I understand that it is the value of the variable between the hash symbols that is really the o/p, but whats with the three hash symbols.
thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2003
Location: Malaysia
Posts: 313
Reputation: red_evolve is on a distinguished road 
Rep Power: 6
Solved Threads: 0
red_evolve's Avatar
red_evolve red_evolve is offline Offline
Posting Whiz

Re: hash symbol in a tag

  #2  
Aug 1st, 2005
Originally Posted by nitinmenon
im not quite sure what this means, ive got this sample code that im trying to figure out:
<FORM ACTION ="QUIZ_RESULTS.CFM" METHOD="POST">
<P><HR><B> QUESTION ###CURRENTROW# IS:</B>
<BR><I> #QUESTION#>

the second line is really what i dont understand. I understand that it is the value of the variable between the hash symbols that is really the o/p, but whats with the three hash symbols.
thanks

Ok, when you try to load the cfm file, you'll see:-
Question #1 is: bla bla bla
If it's in a loop, you might see:-
Question #1 is: abc
Question #2 is: def
Question #3 is: ghi
and so on...

There are 3 hash signs because firstly, you'd want to display a hash sign on your webpage, but because CF uses hash sign to distinguish its variables, you have to escape it. You can tell coldfusion not to evaluate the hash sign by escaping it with a hash sign. So ## actually means display a # on my webpage. The 3rd # continued with currentrow# is telling CF to return the variable currentrow.

Hth.
"Study the past if you would define the future" - Confucius
Reply With Quote  
Join Date: Aug 2005
Posts: 17
Reputation: ProFreelance is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
ProFreelance ProFreelance is offline Offline
Newbie Poster

Re: hash symbol in a tag

  #3  
Aug 4th, 2005
Originally Posted by nitinmenon
im not quite sure what this means, ive got this sample code that im trying to figure out:
<FORM ACTION ="QUIZ_RESULTS.CFM" METHOD="POST">
<P><HR><B> QUESTION ###CURRENTROW# IS:</B>
<BR><I> #QUESTION#>

the second line is really what i dont understand. I understand that it is the value of the variable between the hash symbols that is really the o/p, but whats with the three hash symbols.
thanks

It makes a little more sense if you look at it like this:
<P><HR><B> QUESTION ###CURRENTROW# IS:</B>

The ##, is a # that has been escaped with another #, and eventually outputs simply one #.

The #CURRENTROW# is a variable that is encapsulated in #s to denote that it is a variable.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ColdFusion Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ColdFusion Forum

All times are GMT -4. The time now is 8:45 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC