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

Calling an <iframe> within a cfm page. 2

Status
Not open for further replies.

theevilone

IS-IT--Management
Aug 19, 2001
52
GB
Can anyone please help.

From a menu, I call a cfm page containing my templates and header. Contained within this page, I want to insert an iframe page that contains the search results for the variable passed from the menu. Does that make sense to you ? If so, please help.
 
On the page where you want the resuls wiewed you use an

<ilayer src=&quot;results.cfm?search=#variable#&quot; width=&quot;100%&quot; style=&quot;height:47em&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot; name=&quot;rightframe&quot; left=&quot;512&quot; top=&quot;10&quot;>
<iframe src=&quot;results.cfm?search=#variable#&quot; width=&quot;100%&quot; style=&quot;height:47em&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot; name=&quot;rightframe&quot; >
</iframe>
</ilayer>

Not real sure about NN compatibility, hence the <ilayer>. Just starting to play with it but with the input from others, this should get you going.

The only dumb questions are the ones that are never asked
 
Thanks for that twcman. I had tried something similar. I will try and explain it better this time.

From a menu, I call up a page, call it mainpage.cfm, using the notation,

mainpage.cfm?category1id=2&category2id=49&category3id=94

The mainpage contains some templates and an <iframe>, which I want to return a page called

item.cfm?category1id=2&category2id=49&category3id=94

mainpage.cfm looks like this :-

header
templates

<iframe src=&quot;item.cfm?category1id=#category1id#&category2id=#category2id#&category3id=#category3id#>

The error message I get is &quot;Error resolving parameter CATEGORY2ID&quot;.

Can someone please help ?






 
I'd make a couple of suggestions:

1- It looks like it at least verified category1id, so it may be that there was nothing passed to category2id? Try fully scoping your variables -- change it to
item.cfm?category1id=#url.category1id#&category2id=#url.category2id#&category3id=#url.category3id#>

2. To make it easier, try using the cgi.query_string variable that will put all the variables on the line:

<iframe src=&quot;item.cfm?#cgi.query_string#&quot;>

So all the variables passed from the url to mainpage.cfm will be automatically passed.

Tim P.
 
Thanks CFDude.

Unfortunately, no dice. It comes back with &quot;Error resolving parameter CATEGORY2ID&quot; and &quot;Error resolving parameter CATEGORY1ID&quot;, respectively, for the two suggestions.

Any other ideas ? Anyone ?



 
Hmm, that's strange. Are you using cfinclude on the mainpage.cfm to include the headers and templates? Just wondering if something in one of those templates are overriding the variable.

Is the <iframe> tag inside a <cfoutput></cfoutput> tag?
 
Thanks CFDude.

Worked when I put the <iframe> tag inside <cfoutput></cfoutput> tags. My stupidity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top