?
Solved

Need help with cfdiv

Posted on 2012-04-13
2
Medium Priority
?
299 Views
Last Modified: 2012-04-20
Hi,

I have the following code example from Adobe's online Resource Center regarding the use of cfdiv.  Is there a way to refresh the content of divsource.cfm by clicking a button on cfdivtag.cfm without refreshing the entire main page "cfdivtag.cfm"???

NOTE: I'm using ColdFusion 8.

The cfdivtag.cfm file, the main application file, has the following contents:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>cfdiv Example</title>
</head>

<body>
<cfform>
    <cfinput name="tinput1" type="text">
</cfform>

<h3> using a div</h3>
<cfdiv bind="url:divsource.cfm?InputText={tinput1}" ID="theDiv"
        style="background-color:##CCffFF; color:red; height:350"/>
</body>
</html>

The divsource.cfm file that defines the contents of the div region has the following code:
<h3>Echoing main page input:</h3>
<cfoutput>
    <cfif isdefined("url.InputText") AND url.InputText NEQ "">
        #url.InputText#
    <cfelse>
        No input
    </cfif>
</cfoutput>

Many thanks in advance.
0
Comment
Question by:WebAppDeveloper
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 2000 total points
ID: 37871137
Yes - not sure if you require the bind attribute or not, but my applications typically are more complex than that, so I use  ColdFusion.navigate() function.

This is a javascript function that will call a URL and put the contents into the container you specify (in this case your cfdiv)

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=JavaScriptFcns_24.html
0
 

Author Comment

by:WebAppDeveloper
ID: 37874240
Thank you.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question