Is it possible to use Design patterns in Javascript?

J

Just2Click

Hello, I'm trying to port some older OCX design into
JavaScript/HTML/VBScript.
Part of the code is alreay completed and consists of some custom
objects that have some hirarcy (I have a main field object that all
other field types inhert from).

My problem arises when I'm trying to use these objects within a Modal
window.
For some reason the objects that I try to use doesn't seem to work
properly (they keep on ignoring any instructions to draw themselves on
the dialog or to return values), hence, currently I'm forced to create
a local object on the modal dialog and replicate the data from the
calling module.
I could have lived with creating another object if I had a way of
having a factory that will give me the exact type of field that I
need. To make things even worse, If I need more than one object of a
type on the dialog I have to create as many new objects of the same
type as I need.
I currently use a huge switch ... case block to create these local
objects and I'm trying to eliminate both the switch and the multiple
creation.

Thanks in advance for every idea, sample, thought or sympathy :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top