We help IT Professionals succeed at work.

Is it possible to have a <frameset> under a <cflayoutarea> tab in coldfusion code?

jslaught
jslaught asked
on
389 Views
Last Modified: 2012-05-11
I attempted to do this but the webpage came up blank under the tab. Below is part of my code. Thanks in advance.
<cflayout title="<span style='color:black'>Service</span>" name="tab1">

	<frameset cols="400,*" framespacing="0" frameborder="0" border="0">
		<frame name="ifn" src="login.cfm" marginwidth="100" marginheight="0" scrolling="auto" frameborder="1" noresize>
		<frame name="main" src="ifn.cfm" marginwidth="100" scrolling="yes" framebroder="1">

	</frameset>


</cflayoutarea>

Open in new window

Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2015

Commented:
(not for points ...)

Avoiding the question for a minute, is there a reason you need to use frames? Traditionally they have a lot of usability issues (not to mention they're .. outdated).
http://stackoverflow.com/questions/1203068/why-should-i-not-use-html-frames
http://www.html-faq.com/htmlframes/?framesareevil

Author

Commented:
if not frames what is the alternative? I need a good way to put a search box and a bunch of links on a webpage and make is usable to the user. Thanks.
CERTIFIED EXPERT
Most Valuable Expert 2015

Commented:
None of that needs frames. It can be displayed on single page. If you wish to load/re-load portions of a page dynamically, you can use ajax.  CF8+CF9 have a lot of ajax features built in like <cfdiv> , etc..

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7a27.html

Or if you're comfortable w/javascript you can also use jquery
http://api.jquery.com/html/
CERTIFIED EXPERT

Commented:

Since you're already using CFLAYOUT, just keep going with it...

You can dynamically change the content of the tabs


 (I mention tabs because you called the cflayout area  TAB1 )
<cflayout type="tab" name="thelayout" tabheight="175" style="background-color:##CCffFF;
        color:red; height:200">
    <cflayoutarea title="Tab 1" style="background-color:##FFAAFF;" closable="true">
        This is text in layout area 1
    </cflayoutarea>
    <cflayoutarea name="area2" title="Tab 2" inithide="true" 
            style="background-color:##FFCCFF" >
        This is text in layout area 2
    </cflayoutarea>
    <cflayoutarea title="Tab 3" style="background-color:##FF99FF;">
        This is text in layout area 3
    </cflayoutarea>
</cflayout>

Open in new window

CERTIFIED EXPERT
Most Valuable Expert 2015

Commented:
I'm still wondering if the goal is something more complex ... But if you don't actually need dynamic content reloading then what gdemaria showed should work fine.  
CERTIFIED EXPERT

Commented:

...and there are variations that will dynamically load the content as well... depending, as you say, on what the asker is after...

  ColdFusion.navigate
  Auto-refresh the tab
  etc...

Author

Commented:
I'm not trying to dynamically load content for this coldfusion webpage i'm creating. Just trying to add a search box, a header and a image at the top of the webpage aligned together.

1. I was going to use the <frameset> for the search box but I see that's not a good idea based on previous comments above.
2. I already have the header text for the webpage and the image.
CERTIFIED EXPERT

Commented:

If you don't need dynamic content then what was the purpose of suggesting the frameset?  Frameset subdivides a page so the content can be updated seperately.  

If you don't need any dynamic content, simply place the text and images in the file where you want it to appear; per usual.  Just like my example..


Author

Commented:
The code you provided above is not quite what I was looking to do. Purpose of asking about <frameset> was because it seemed to be a good idea at the time to place under one of my tabs on the home page. Under the tab one side of the <frameset> would have a search box and the other side would have just links for users to click on. I'll just stick with getting a search box, text header and an image to all align together under the tab I need it under. Thanks again for you help.
CERTIFIED EXPERT

Commented:
> The code you provided above is not quite what I was looking to do

Are you having trouble with the syntax for an image tag?   Why don't you post the code you're trying so we can see what the specific trouble is you're having.  It's better than us just guessing, right?

Author

Commented:
Below is the code of a coldfusion webpage where I have a search area, title, an image and links. I would like to align the search area with the title to the page and image if possible. Thanks in advance.
<!-- Service Requests Tab code starts here -->

<cflayoutarea title="<span style='color:black'>Service</span>" name="tab2" selected="#t2selected#"> 


   <br>

<div>
      <form action="searchsrs.cfm" method="post" name="search">
      <b>Ticket#:</b> <input type="text" name="tn" value=""><BR>
      <b>Customer<br>LN:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b> <input type="text" name="ln" value=""><BR>
      <b>Customer<br>FN:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b> <input type="text" name="fn" value=""><BR>
      <br>
      <input type="submit" name="searchb" value="Search"><BR>
      </form>
</div>

<div align="center">
      <font size=6 font face="Castellar"><center><b><i>Service Requests</i></b></font>
      <br>
      <img src="http://127.0.0.1:8500/TicketTracking/pics/srs.bmp" width=125 height=125 alt="service request image.jpg" />
      </center>
</div>


<body>
      <div id="bullet" align="center"><img src="http://127.0.0.1:8500/TicketTracking/pics/blackbullet.gif" alt="bullet.gif">
      <font size=4><left><b><a href="http://127.0.0.1:8500/TicketTracking/myopensrs.cfm?user_name=<cfoutput>#url.user_name#</cfoutput>">My Open Service Requests</b></a></font><br><font size=2>All Open Service Requests assigned to me</font>
      </div>
</body>

<br>

<body>
      <div id="bullet" align="center"><img src="http://127.0.0.1:8500/TicketTracking/pics/blackbullet.gif" alt="bullet.gif">
      <font size=4><left><b><a href="http://127.0.0.1:8500/TicketTracking/closedsrs.cfm?user_name=<cfoutput>#url.user_name#</cfoutput>">My Resolved Service Requests</b></a></font><br><font size=2>All Resolved Service Requests assigned to me</font>
      </div>
</body>

<br>

<body>
      <div id="bullet" align="center"><img src="http://127.0.0.1:8500/TicketTracking/pics/blackbullet.gif" alt="bullet.gif">
      <font size=4><left><b><a href="http://127.0.0.1:8500/TicketTracking/teamsrs.cfm?user_name=<cfoutput>#url.user_name#</cfoutput>">My Team's Open Service Requests</b></a></font><br><font size=2>All Open Service Requests assigned to my team</font>
      </div>
</body>

 </cflayoutarea>

Open in new window

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT

Commented:
It's not appropriatea to put header, html, body tags inside a div, they only belong enclosing the page

Author

Commented:
Solutions provided did not give me the best result as I had to research and figure it out on my own.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.