views:

303

answers:

0

Ok, so thanks to a lot of the users here at stack, I've successfully created a dialog that dynamically adds/removes buttons. Now I have a problem. I'll tell you my goal and what I'm attempting so you'll know why I'm doing, what I'm doing.

I'm using Microsoft UIP in an application and on the web-side of things, it dynamically creates pages with navigation on them to perform certain functions (back/forward/next/cancel/finish/new). I need to pull these navigation buttons from the web page, and into the jQuery Dialog Button Bar AND when one of the buttons is clicked, simulate that click event on the page (_postback).

I have done the first part of this successfully. I have the UIP page loading in an IFRAME and then using js, when the page loads, I "scrape" the buttons off the IFRAME page and create these same buttons on the button bar of the jquery dialog. BUT, when specifying the function on the click event, I have no way of telling which button was clicked. Any suggestions? I can't specify and ID for the buttons and what I've done so far is created a global array of the buttons with [Text][Id] of the buttons in the IFRAME. But I don't know how to tell which of the jquery dialog buttons was clicked to be able to look up it's ID. I was manually using a switch to generate the click event function and manually putting the id in to test the rest of what I need to accomplish and that works but I can't have it working manually. It all has to be dynamic.

Any suggestions?

Thanks, Keith