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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you help me with menu?

Status
Not open for further replies.

auriga69

Technical User
Feb 11, 2001
9
0
0
CL
The matter is this:

index.cfm

<a href=&quot;master.cfm?url_ID=1&quot;><img src=a.gif></a>
<a href=&quot;master.cfm?url_ID=2&quot;><img src=a.gif></a>
etc....


master.cfm

<cfif IsDefined ('url_ID')>

<cfquery datasource=&quot;cyber&quot; name=&quot;GetLink&quot;>
SELECT url_link
FROM Links
WHERE url_ID=#url_ID#
</cfquery>
<cfoutput query=&quot;GetLink&quot;>#url_link#</cfoutput>
</cfif>


BUT THE ONLY THING THAT HAPPENS IS THAT MASTER.CFM DISPLAYED THIS TEXT &quot; (this thing is the url associated to an url-ID, it's right but don´t carry to the address) and never display the page called cae.cfm as I WANT to do it.

CAN ANYONE HELP ME PLEASE

:-(
 
I'm not sure I understand what you're trying to do. Do you want to display the page that the url points to? If so, I would just make the links on index.cfm point to the actual pages and not master.cfm. If you need it to work this way for another reason, you could use <cfhttp> to download the page and then display it with #cfhttp.filecontent#.

Hope this helps,
GJ
 
your problem is that <cfoutput query=&quot;GetLink&quot;>#url_link#</cfoutput> doesn't display the PAGE ???? it's 100% normal !!! you're displaying he VALUE with cfoutput !
use <cflocation=<cfoutput query=&quot;GetLink&quot;>&quot;#url_link#&quot;</cfoutput>> to move to the page - but becareful that if your getlink query retruns more than 1 row your app might crash
 
iza

Thanks I tried your help but nothing happens. Let me see if I'm in the right way. As I understand, I replace this line of code:
<cfoutput query=&quot;GetLink&quot;>#url_link#</cfoutput>
and use this line of code:
<cflocation=<cfoutput query=&quot;GetLink&quot;>&quot;#url_link#&quot;</cfoutput>>
it's that right or not.

I must told you that url_link field is an hyperlink field of Access with complete url as is just like that.

The page b.cfm can be html or cfm is that right ok?

Help me please
 
everything depends on how many rows your request is returning
say it's only one
then this
<cfoutput>
<cflocation=&quot;#GetLink.url_link#&quot;>
</cfoutput>
or this
<cfoutput query=&quot;GetLink&quot;>
<cflocation=&quot;#url_link#&quot;>
</cfoutput>
should work
if it doesn't, view the source of your page and check if it looks like
<cfoutput [query=&quot;GetLink&quot;]>
<cflocation=&quot;somepage.cfm&quot;>
</cfoutput>
if it doesn't then check your query

and yes it's the same for cfm and htm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top