You could do that using jQuery live function with custom event binding. Everytime you make a call to Page B, you would have to trigger your custom event, so that the new dialog element can be binded in the event handler. The initiation code would have to be still in Page A if you follow this method.
Technowise
2010-01-18 09:06:37