|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Can any one tell me how to create an anchor from one table to another on one cfm page. I have a id that is the same for each table that I should be able to use as an anchor but can not figure out how to code it.
|
|
#2
|
|||
|
|||
|
Sorry man but nothing you wrote makes sense.
![]()
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
OK that edit is a bit better, but not a whole lot. If you have an ID to use as the anchor, just output it in front of the table...
<a href="###myAnchorID#"> (note the escaped pound sign to denote the anchor in front of the variable) <table>... </table> |
|
#4
|
|||
|
|||
|
Not Sure?
Here is the code I have that creates the tables on the Fly based on the URL string and Argments, My concern by your reply is where would I put it and how will it know which ID to go from to.
Chris </head> <cfinvoke component="AttributesMaster" method="getBIS" returnvariable="BIS"> <cfinvokeargument name="IN_OUT" value="#io#"/> <cfinvokeargument name="CASE_NAME" value="#casename#"/> <cfinvokeargument name="BISV" value="#version#"/> <cfinvokeargument name="METHODNAME" value="#methodname#"/> </cfinvoke> <div align="center"><font size="+3" face="Times New Roman, Times, serif"><strong><font size="+1" face="Times New Roman, Times, serif"><strong><font color="#0066CC"><strong><font size="+1" face="Times New Roman, Times, serif"><strong><font color="#0066CC"></font></strong></font><font color="#000000">BIS Name: </font></strong></font><strong><font size="+1" face="Times New Roman, Times, serif"><strong><font color="#0066CC"><font size="+1" face="Times New Roman, Times, serif"><strong><font color="#0066CC"><font color="#330099"><cfoutput>#version#</cfoutput></font></font></strong></font></font></strong></font><font color="#0066CC"> </font></strong></strong></font><font color="#0066CC" size="+1"><br> </font></strong></font> </div> <h1 align="center"><font size="+3" face="Times New Roman, Times, serif"><strong><font color="#000000" size="+1">Method:</font><font color="#330099" size="+1"> <cfoutput>#methodname#</cfoutput></font></strong></font><font size="+1" face="Times New Roman, Times, serif"><strong><font color="#0066CC"> <font color="#000000">Type:</font> <font color="#330099"><cfoutput>#io#</cfoutput></font> <font color="#000000">Case:</font> <font color="#330099"><cfoutput>#casename#</cfoutput></font></font></strong></font></h1> <SCRIPT LANGUAGE="JavaScript1.2"> </SCRIPT> <cfset col_heads = "Internal ID,Attribute Name,R/O/C,IDL Attribute Name,Attribute Type,Valid Values"> <cfset col_fields = "BIS.ID,BIS.ATTRIBUTE_NAME,BIS.ROC,BIS.IDL_ATTRIBUTE_NAME,BIS.TYPE,BIS.VALID_VALUES"> <cfset color_list = "Gainsboro,Snow"> <cfset color_cnt = 0> <table border> <cfoutput> <tr bgcolor="MidnightBlue"> <cfloop list="#col_heads#" index="i"> <th bordercolor="MidnightBlue" bgcolor="MidnightBlue"><strong><font color="##FFFFFF">#i#</font></strong></th> </cfloop> </tr> </cfoutput> <cfoutput query="BIS"> <cfset color_cnt=color_cnt+1> <cfset color = listgetat(color_list,color_cnt mod listlen(color_list)+1)> <tr valign="top" bgcolor="#color#"> <cfloop index="i" list="#col_fields#"> <td>#evaluate(i)# </td> </cfloop> </tr> </cfoutput> </table> <p> </p> <h3><strong><font color="#000000" size="+1" face="Arial, Helvetica, sans-serif">Additional Information:</font></strong></h3> <SCRIPT LANGUAGE="JavaScript1.2"> </SCRIPT> <cfset col_heads = "Internal ID,Business Name,Description"> <cfset col_fields = "BIS.ID,BIS.ATTRIBUTE_NAME,BIS.DESCRIPTION"> <cfset color_list = "Gainsboro,Snow"> <cfset color_cnt = 0> <table border> <cfoutput> <tr bgcolor="MidnightBlue"> <cfloop list="#col_heads#" index="i"> <th bordercolor="MidnightBlue" bgcolor="MidnightBlue"><strong><font color="##FFFFFF">#i#</font></strong></th> </cfloop> </tr> </cfoutput> <cfoutput query="BIS"> <cfset color_cnt=color_cnt+1> <cfset color = listgetat(color_list,color_cnt mod listlen(color_list)+1)> <tr valign="top" bgcolor="#color#"> <cfloop index="i" list="#col_fields#"> <td>#evaluate(i)# </td> </cfloop> </tr> </cfoutput> </table> </body> </html> Quote:
|
|
#5
|
|||
|
|||
|
Sorry but I don't have time to sift through all that code. If you can create a very simple example that just demonstrates the problem or your question then maybe I can help.
|
|
#6
|
|||
|
|||
|
Sorry, I have tables that are generated via a cfc but my tables do not build until the argments are passed from the url, I have a field in my Oracle that contians an ID, which I thought I could use on the fly as the table infromation is pulled to create anchors and Hyperlinks to the second table on the screen which is built using the same CFC but with a little differnt detail from the inner join. My problem is that I can not seem to create these anchors and hyperlinks either through the CFC or on the CFM page, I do not know if there is a way, I thought maybe a JavaScript might work since I do use a loop for coloring the tables and creating my headers but I am at a loss to figure out how to create the anchors and hyperlinks to a table that is not static.
Quote:
|
|
#7
|
|||
|
|||
|
There is absolutely a way to create dynamic anchors within a page; we do it all the time. If you know the ID of each table when you call the CFC why can't you just use that in the anchor?
<a href="###myID#"> <cfoutput>#tableCFCInstance.buildTable( myID )#</cfoutput> I mean, I know you are new but you really aren't explaining your problem very well. It also looks like you may be jumping in over your head by using and modifying code that someone else wrote that appears to be well beyond your current skill level. I know that sometimes one has no choice, but if possible I'd start "smaller" and work your way up to the more difficult things. |
|
#8
|
|||
|
|||
|
Well thank for your woods of wisdom, I did figure it out by modifing my JaveScript since that is what I am more used to using with html, you are right I'm not a coldfusion developer, learning, I may have used CF code above my head but I did understand how it would benifit me. And I'm not using someone elses code, I'm not some dumb blonde I can read and understand CF, I have been writting jave script for years, I just do not know all about CF yet.
Quote:
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > New to CFM have pitty |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|