Solved

Need help with cfdiv

Posted on 2012-04-13
2
286 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
2 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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