homepage Welcome to WebmasterWorld Guest from 54.237.184.242
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Problem with a function called as part of Ajax.Updater response
el_roboto




msg:3434158
 10:24 am on Aug 28, 2007 (gmt 0)

I'm giving my user the ability to set up usergroups - the groups data is stored in MYSQL and is passed there using PHP.

Before users can be added to the group, the group must be named and submitted to the DB and validated (ie: alphanumeric only, no existing entries with the name)

To keep a good flow to this procedure, I'm using Ajax.Updater - this returns a success or failure message to the user based on the validation mentioned above.

if the group is successfully created, I want to call a javascript function which reveals the member list - members can then be added to the group.

The problem I'm having is the function isn't being triggered - if successful Ajax.Updater returns

<div class="success"> GROUPNAME SUCCESSFULLY CREATED - YOU CAN NOW ADD USERS TO THIS GROUP</div>
<script type="text/javascript">
// <![CDATA[
new ShowUsers()
// ]]>
</script>

I know the function works ok as it runs if I hardcode this script into the page containing the form.

Can anyone advise why this is? Is there a different way I can trigger this function?

bearing in mind that I can't do onComplete:ShowUsers - as I need a response from the DB before deciding if the function should be called

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved