[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

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

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

0
jslaught
Asked:
jslaught
  • 6
  • 5
  • 3
1 Solution
 
_agx_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
0
 
jslaughtAuthor 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.
0
 
_agx_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/
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
gdemariaCommented:

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

0
 
_agx_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.  
0
 
gdemariaCommented:

...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...
0
 
jslaughtAuthor 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.
0
 
gdemariaCommented:

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..


0
 
jslaughtAuthor 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.
0
 
gdemariaCommented:
> 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?

0
 
jslaughtAuthor 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

0
 
jslaughtAuthor Commented:
i figured out that putting the header, image and a <form action> within <table> tags displays everything the way I wanted.  

code below:

<!--- The Tab code starts here -->

<cflayoutarea title="<span style='color:Green'>Service</span>" name="tab2" selected="#t2selected#" style="background-color:##B2B3A3;">

<br>

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


<table align="left">

<html>
<body>
<font size=5><i><u>Search for a Service Request</u></i></font><br><br>

<form action="searchsrstn.cfm?user_name=<cfoutput>#url.user_name#</cfoutput>" method="post" name="search">
<tr>
<td><b>Ticket#:</b></td>
<td><input type="text" name="tn" size="20" value=""></td>
<td><input type="submit" name="searchb" value="Search"></td>
</tr>
</form>



<form action="searchsrsln.cfm?user_name=<cfoutput>#url.user_name#</cfoutput>" method="post" name="search">
<tr>
<td><b>Customer Last Name:</b></td>
<td><input type="text" name="ln" size="20" value=""></td>
<td><input type="submit" name="searchb" value="Search"></td>
</tr>
</form>


<form action="searchsrsfn.cfm?user_name=<cfoutput>#url.user_name#</cfoutput>" method="post" name="search">
<tr>
<td><b>Customer First Name:</b></td>
<td><input type="text" name="fn" size="20" value=""></td>
<td><input type="submit" name="searchb" value="Search"></td>
</tr>
</form>
    
</body>
</html>
</table>

<table align="right">
<font size=5 align="center"><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>Links</u></i></font>

<br>
<br>

<img src="http://127.0.0.1:8500/TicketTracking/pics/blackbullet.gif" alt="bullet.gif" align="left">
<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>

<br>
<br>

<img src="http://127.0.0.1:8500/TicketTracking/pics/blackbullet.gif" alt="bullet.gif" align="left">
<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>

<br>
<br>

<img src="http://127.0.0.1:8500/TicketTracking/pics/blackbullet.gif" alt="bullet.gif" align="left">
<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>
</table> 


 </cflayoutarea>

<br>
</body>
</html>
</td>

</tr>
</table>

 </cflayoutarea>

<br>

</cflayout>

Open in new window

0
 
gdemariaCommented:
It's not appropriatea to put header, html, body tags inside a div, they only belong enclosing the page
0
 
jslaughtAuthor Commented:
Solutions provided did not give me the best result as I had to research and figure it out on my own.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 6
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now