Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

returning and running a js function from ajax

  • 19-02-2007 10:36am
    #1
    Registered Users, Registered Users 2 Posts: 648 ✭✭✭


    Hi

    im using this script to toggle div's :
    http://simplejs.bleebot.com/

    the blind up and down effect is cool

    however im actually using ajax to save a form (this form is in a div which gets displayed with the toggle/blinddown function)

    after the ajax functionality is executed what i want to do is return js so as i can blindup/toggle that div

    at the moment i return

    <script type="text/javascript">
    $toggle('addrule');
    </script>


    but the problem is a page load would be required for this to take effect

    how can i return a js function from ajax and then call it ?


    tnx


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Post or attach the code for the entire page. It shouldn't be too difficult to implement.


  • Registered Users, Registered Users 2 Posts: 3,890 ✭✭✭cgarvey


    What is the response of the AJAX request? XML, text? You could write out plain text and do
    eval( myAJAXresponse.content() );
    
    adjusting for whatever AJAX library/code you're using. Throw in some exception handling for good measure.


Advertisement