This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Is it possible to have a custom window open from a form?

Nick - Tuesday, March 15, 2011 2:27 PM:

So I'm fairly new to Innovator, I've only been using it for a little over a month now, since a co-worker heard I was taking Computer Science in college and asked me to write some programs for it. I've got an intermediate knowledge of Java, and have some knowledge of C, C# , python and very little VBasic. Anyway...

I've been asked to program a simple window that helps the user with complicated naming conventions by doing most of it for them, only asking for normal input and translating it to short form itself. The big thing though is the fact that the window adds controls dynamically depending on which part the user has selected. I would have done it in a java applet, but I noticed Innovator doesn't seem to support java, so I was wondering if I would be able to do this in a Visual C# windows forms application, or is there another way I would have to do something like this?

Also, what does the client side error "Object Expected" mean? It's kinda of confusing and annoying not being able to use a debugger to look at what's going on.



Brian - Sunday, March 20, 2011 5:43 AM:

Hi Nick,

Client side programing is done in Javascript while c# and VB are used on the server side only.

So if you want to do things with windows etc you need to be using Javascript and building a custom HTML form to display based on the users input.

You could also do this using a fairly standard Innovator form and just show/hide the controls that are not required at the appropriate time. It really depends what you are trying to do and where the form will be called from or if it is part of a larger form etc.

Javascript and c# are syntactically quite similar so the learning curve on that side is not too bad.

Also you should be able to use a debugger on the client side code. Check your "advanced" tab under internet options for "disable script debugging" and "display a notification for every script error" (names might not be exactly right). The Just in Time debugger should allow you to see what is going on.

Object expected means just that. Javascript works with objects and the call is expecting an object at that point and it isn't operating on one. Same as C# really.

Hope this helps,

Brian.



Nick - Monday, March 21, 2011 2:59 PM:

Hey Brian, thanks for the response.

Yea I figured I'd have to do it in javascript in the end, and already started working on it, for now I'm just doing exactly what you said, showing/hiding fields. And like you said it is pretty similar to languages I already know, so I'm not having too much trouble, just have to learn the innovator commands. Do you know if there's an easy way to get innovator to use jquery? I tried adding it to the javascript include files but it never seemed to work, I ended up having to dynamically add it into the header on form load, which feels kinda hacky but it works for now at least.

As far as the debugger goes I've been using the one built into chrome, trying to use code that works in IE, might as well just try the one that's built into IE. I'm just generally the type of person that always looks for an alternative free/open source program to use (yay linux). 

Also, the reason I brought up the object expected error was just because it almost seemed like it was the only error I'd get. I had it in a simple two line method that just took input and capitalized it, and the fix was just adding in a bracket I missed >_<. That's why I was getting annoyed at the error.

Thanks again for the response! Was starting to think the forums weren't that active or I asked a stupid question >_>.



Brian - Tuesday, March 22, 2011 5:22 AM:

Hi Nick,

Glad you are making progress.

As far as jquery is concerned I've never used it. You should be able to just include the file in the "JSNamespaceConfig.xml" in the InnovatorClientJavascript directory. Although I have had trouble getting that to work all the time myself.

I'm sure you realise that Innovator is supposed to work only in IE. I expect you are asking for some issues if you use Chrome but if you are up for the challenge then have fun.

As far as jQuery is concerned I would be interested in seeing the code you are using to get it working even just in the header on load. As I said I haven't used it before and I'm interested in how easy it is to interact with inside the Innovator framework.

Cheers,

Brian.



Nick - Tuesday, March 22, 2011 9:40 AM:

Hey Brian,

this http://www.hunlock.com/blogs/Howto_Dynamically_Insert_Javascript_And_CSS article sums it up pretty easily. I just put that in an onLoad Form Event and it worked fine. Pretty happy I got that to work actually, jquery makes quite a few things easier, although I still need to learn more about it.

Also, I know Innovator only works with IE, I was just using Chromes debugger, while keeping the code generic. 



rootkiter - Tuesday, March 22, 2011 10:39 PM:

You can write a server form by C# or VB. From client, you call that one. It's very nice and u can do everything u want



Brian - Tuesday, March 22, 2011 10:53 PM:

I'd be really interested to see an implementation like that.

Any chance you could post a simple example?

Calling code and server code?

Cheers,

Brian.



rootkiter - Tuesday, March 22, 2011 11:55 PM:

Hi Brian,

Have you ever read topic "CallingCustom.NET_fromJavaScript". It's very interesting topic.

It's help you write and call .Net project from client

Cheers,