Quick background on the site... Index.cfm (Coldfusion, ugh) has 3 
DIV's that get populated with various AJAX calls.  The main content 
DIV gets populated based on an AJAX.Updater call from one of the other 
DIV's.  Inside the data that gets populated in the main content DIV 
has a DIV inside itself.  I would like to click on an item in my 
content DIV (which was placed there from an AJAX.Updater call) and 
populate a DIV.

Here is some code...
// AJAX.Updater call to populate the DIV inside the main content DIV
// This works fine but it puts plaintext in the DIV and not the 
rendered widget.
function getLrudetail(selected_value){
        var url = 'getlrudetail.cfm';
        var pars = 'id='+selected_value;
        var target = 'lruSpace';
        var myAjax = new Ajax.Updater(target, url, {method: 'get', 
parameters: pars, evalScripts: true});
}

//getlrudetail.cfm - The content I want to populate the DIV (rendered)
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
<html>
<!--
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
-->
<CFSETTING SHOWDEBUGOUTPUT="No">
<head>
<title>TabContainer Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</meta>
<script type="text/javascript" src="include/dojo.js"></script>
<script>
dojo.require("dojo.widget.TabContainer");
dojo.require("dojo.widget.LinkPane");
dojo.require("dojo.widget.ContentPane");
dojo.require("dojo.widget.LayoutContainer");
dojo.require("dojo.widget.Checkbox");
</script>
<style type="text/css">
body {
        font-family : sans-serif;
}
.dojoTabPaneWrapper {
  padding : 10px 10px 10px 10px;
}

</style>
</head>
<body>
<p>These tabs are made up of local and external content. Tab 1 and Tab 
2 are loading files tab1.html and tab2.html. Tab 3 and Another Tab are 
using content that is already part of this page.</p>
<div id="mainTabContainer" dojoType="TabContainer" style="width: 100%; 
height: 70%" selectedTab="tab1" >
  <div id="tab1" dojoType="ContentPane" label="Tab 1" >
    <h1>First Tab</h1>
    I'm the first tab and my content is local. Try clicking tab#2. 
It's loading remotely.
    <input type="checkbox" name="cb1" id="cb1" dojoType="Checkbox" />
    <label for="cb1">hello world</label>
  </div>
  <a dojoType="LinkPane" href="../../tests/widget/tab2.html" 
refreshOnShow="true" style="display: none">Tab 2</a>
  <div dojoType="ContentPane" label="Tab 3" style="display: none">
    <h1>I am tab 3</h1>
    <p>Did you know that the children of a TabContainer can be any 
widget, such as a SplitContainer or LayoutContainer? The next tab is 
itself a TabContainer...</p>
  </div>
  <div id="subTabContainer" dojoType="TabContainer" label="Sub 
TabContainer"> <a dojoType="LinkPane" href="../../tests/widget/
tab1.html" style="display: none">SubTab 1</a> <a dojoType="LinkPane" 
href="../../tests/widget/tab2.html" selected="true">SubTab 2</a> </
div>
</div>
</body>
</html>

getlrudetail.cfm viewed by itself works fine, the Dojo widget is 
rendered and it works great.  However, when I use it with AJAX.Updater 
all I get back is plaintext with no rendering.  I know evalScripts: 
true ignores inline JavaScript or something but I quite haven't 
figured out the hack to get it to work the way I want and have the 
Dojo widget render itself.

I'm guessing I have a scope issue somewhere since I'm essentially 
populating a div inside another div each populated by AJAX.Updater 
calls.

Not much of a JavaScript guru so any help would be appreciated.

This site is for internal use only so this is the best I can do for 
posting code.

Thanks!


On Jan 29, 9:37 am, Christophe Porteneuve <[EMAIL PROTECTED]> wrote:
> Hey Matthew,
>
> Matthew Williams a �crit :
>
> > I'm using AJAX.Updater to make calls which in turn populate various
> > DIV's with data.  However, none of the JavaScript gets executed
> > (despite evalScripts being true).Can you either put a minimalistic 
> > reproduction online for us to tinker
> with (that would be best), or failing that, post the *exact code* you're
> using for the request (with details about what values you're using that
> the code alone doesn't show, such as form values, etc.) and the *exact
> dump* of the AJAX response?
>
> --
> Christophe Porteneuve aka TDD
> [EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to