Calling a function within a returned js search result

Permalink
Trying to condense a web design using js / ajax, but I am running into trouble when I do this - not sure if it is possible:

If you activate a search from inside a packageElement using the ccm-search.js (such as "search_form_advanced.php" in the "dashboard/users/search" page) it uses the form action (via bindings in jQuery) to launch a tool script (such as "tools/search_results") which will then place its output inside the "dashboard/users/search" page within a bound div).

My question: Will I be able to perform a ajaxForm form submission from within that div? Because right now I am unable to do it. Why?

Ricalsin
 
jordanlev replied on at Permalink Reply
jordanlev
What exactly are you trying to do? When you say you're trying to use the c5 search, do you mean the sitemap or the file manager? Or something else?
With only a vague understanding of what exactly you mean, I would guess if you look to the internal libraries and functions that are being called by C5's tools file, you could build your own tools file that mimiced that but returned the data to you in the proper way you want it (like JSON data that you could then use javascript in your front-end to place in any way you wish in the DOM).
Ricalsin replied on at Permalink Reply
Ricalsin
Hi Jordan,

I programmed around a design that caused failure, but it does pose an interesting question I would like to have answered if possible.

I was manipulating the c5 ccm-search.js functionality but described my use in terms of the c5 user search functionality (for familiarity). I re-read my first post and it is an accurate description of it in that context.

What puzzled me was that it appears the newly injected tool script "search_results" back into the main "single_page/user/search page seems to no longer have recognition of it's parent. No collection recognition, no url recognition. For example, from within either the user/search page or the element "search_form_advanced" form (both of which are not 'returned results' but hard coded into the page) you can make a call to another tool script and load another (different) "result" based on changes you make in the pass. But NOT SO if you call the same code from within the tool-script injected element "search_results" section.

Sorry if that sounds a little "wicked" - but I've read it a few times and it is accurate. :)

Rick