I've been working on this issue for a while now and I'm hoping someone
can help find an easy solution to this problem.

I need to create a new div on the click of an ajax link and then
update that newly created div with the results of the ajax call using
the update option.

In simple terms:

User clicks on ajax link and passes an id to action.  Action returns
parsed data and we create a new div with that data inserted into it.
User can click on ajax link infinite times and new divs keep being
created.

My link looks something like this right now:

<?php foreach ($widgets as $widget): ?>
<?php echo $ajax->link('widget', "/widgets/ajaxAddNewWidget/
$widget['id']", array('before' => "creatediv('".$newWidgetInfo."');",
'update'=> $newWidgetInfo)); ?>
<?php endforeach; ?>
----------------------------------
ajaxAddNewWidget() returns a bunch of information parsed & formatted
back for the update.
----------------------------------
JS creatediv() looks like this:
function creatediv(id) {
   var newdiv = document.createElement('div');
   var updatediv = document.getElementById("newDivs");
   newdiv.setAttribute('id', id);
   updatediv.appendChild(newdiv);
}
-----------------------------------


Funny thing is.. it works pretty well in Firefox.... but in both IE6 &
IE7... it's a total no-go.

I'd appreciate any help!
Dustin Weber


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to