Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

asked on

Help with automating javascript, modal popup, wiring up buttons

I have a main page that has a list of records.  On the page are Add, Edit and View buttons which when clicked, invoke javascript and display modal popups that allow for adding new record, editing an existing record, or viewing an existing record.  The Add and Edit modal popups have Save and Cancel buttons.  The View popup just has a Close button.  For the Save and Cancel buttons I also have javascript that passes back a value via window.returnValue.

I do this for each app/set pf pages I create.  I want to somehow try to automate this process.  I have to copy and paste all the javascript, wiring up the buttons, etc.   The only thing that is different each time is the name of all the pages, i.e., the main page, the add page, the edit page and the view page, and these names in the corresponding javascript.

Any thoughts on how to automate this?
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HLRosenberger

ASKER

ok, I'm looking at the write-up.   So, it will generate any text?   can I somehow pass it the names of the forms and buttons that I have to create and wire-up?
Thanks