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

php web app issue/question/request for advise

  • 20-09-2006 12:42pm
    #1
    Registered Users, Registered Users 2 Posts: 648 ✭✭✭


    Hi

    im developing a web app in php.
    this has two functions (job listings and user listings).

    in the job add screen there is a dropdown to select the user allocated.
    however next to this i also have a button to create a new user.
    at the moment this opens up a new screen (add user screen) so the user can input the details. however when this is saved and the popup closed that new user does not yet exist in the drodown.

    my question is - is there a way i can set allocated user of the job to the newly created user???

    two possible solutions (please advise if possible)

    > after saving the user with javascript can i hide the userallocated field dropdown on the original form, and then perhaps update a hidden field with the userid of the new user??
    > use ajax in some way... ive looked on teh web and cant find any tutorial that comes near this


    any advise appreciated!


Comments

  • Closed Accounts Posts: 4,655 ✭✭✭Ph3n0m


    after you add a new user, why not just refresh the page?


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    Or just dont use the pop up and have the add new user button take you off the page and then back again once the new user is created and presumably your new data will then be contained?

    I think for such a small problem you're looking for the most complicated solution.


  • Registered Users, Registered Users 2 Posts: 648 ✭✭✭ChicoMendez


    I think for such a small problem you're looking for the most complicated solution.

    YES im 100% agreed you there..however im doign this for someone and they want it like that .... so i need to find a solution.


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    Ok well this is just the stuff Ajax is made for so I would say thats the way to go, however I'm not sure how to go about taking an onEvent from a different window to update the original window, or if its even possible.


  • Closed Accounts Posts: 119 ✭✭frodo_dcu


    i imagin it would be something like

    on window.close send http request to refresh parent

    or something very similar
    not sure of exact syntax but if you know your ajax you'll figure it out


  • Advertisement
  • Closed Accounts Posts: 70 ✭✭vito


    Or just use a psuedo-window: a hidden div that appears onClick of add user.

    If your going with AJAX then it would be foolish to open a new window. Kinda defeats the purpose of setting up an AJAX call??

    I would try and keep it all on the one page. KISS


Advertisement