Forum  General Visual ...  How do I...?  scripts in htmlbox
Previous Previous
 
Next Next
New Post 6/8/2009 5:32 PM
  palli
11824 posts
1st Level Poster




Re: scripts in htmlbox 

Hi,

These three HTML files are meant to show how to execute a javascript function in the parent container, from an HTML containted in an IFrame, similar to how the HTMLBox works in VWG.

Open 1.html in your browser, and see how it works.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 6/9/2009 5:01 PM
  SplitMerge
76 posts
www.hrtms.com
No Ranking


Re: scripts in htmlbox 

Did you get this working? Or is there some type of work-around? I am trying to do a similar thing, but can't seem to get it to work.

Basically, I need a simple example of how to link from an HTMLbox back to the VWG application.

Ideally, i would like to call a method in the parent form and pass a parameter... that would let my application take control. This seems like it should be a simple task.

I tried to get the HtmlBoxFrameCommTest sample working (6feec144-40fc-4350-9c04-d8ad5d1b3ef4) - this is the one where you update a value in the htmlbox. That doesn't seem to work anymore.

Does anyone have a solution for this?

To visualize this, here is what I would like the HTML to look like:

 "<a href='#' onclick='window.frames.top.CallMyVWGFORM("parm") >Call VWG Function</a><br>"

Thanks

Mitch

 
New Post 6/11/2009 6:39 AM
  ori.cohen
4390 posts
1st Level Poster




Re: scripts in htmlbox 
Modified By ori.cohen  on 6/15/2009 7:35:48 AM)

Hello Mitch,

If you are loading the Resource of the HtmlBox control from a file or web-application served from a different virtual directory, there is a security issue. The browser will not let the JavaScript of the hosting VWG application to communicate with the JavaScript in the HtmlBox. This is a stantrdized security constraint and there is nothing we can do about it.

If that is not the case, the example HTML application I provided earlier in this thread should be enough to allow you to communicate between the HtmlBox client-side and the VWG application client-side.
Please be aware of the information presented in this issue here.

Regards,

Ori Cohen
Support Manager, the Visual WebGui team

 
New Post 6/11/2009 8:19 AM
  SplitMerge
76 posts
www.hrtms.com
No Ranking


Re: scripts in htmlbox 
Modified By SplitMerge  on 6/11/2009 11:22:41 AM)

Ori,

I my case i am actually loading html from the code - eg,

htmlbox1.html  = "<html><body> <a href='dosomething'>myLink</a> </html>";

I hope the new script library helps the situation. I don't mind replacing URLs with calls to Javascript code.

Basically, the HTMLBox and ASPPageBox controls are really frustrating to use because there is no easy way to trigger an event back to the VWG application from a hyperlink.

On a positive note, I was able to use the href="post.VWGFORM.wgx?parmname=parm" syntax to sucessfully bring up registered VWG form from an HTMLBox link, and then use the VWGContext.Current.Arguments["parmname"]  to get the parms. :-)   The use of the 'post' prefix was not obvious!

However, It would be really nice to have some kind of javascript function that you could call from an HTMLBox that would pass a command to the parent VWG form. That way, you could begin to use traditional hyperlinks in html to trigger actions.

I am surprised this hasn't been an issue other people have encountered?

 

Mitch Stephens

Actmate

 

 
New Post 6/15/2009 4:40 AM
  ori.cohen
4390 posts
1st Level Poster




Re: scripts in htmlbox 

Hello Mitch,

This new library will give you access from external code (code of contained applications), to VWG client-side internals.
You will be able to call the Events_CreateEvent and the Events_RaiseEvents JS functions that will allow you to create a client side event and send it to server side, having server side code handle it and fire the relevant server-side event/s.

This will be very easy to use.

Regards,

Ori Cohen
Support Manager, the Visual WebGui team

 
Previous Previous
 
Next Next
  Forum  General Visual ...  How do I...?  scripts in htmlbox
CompanionKit Bottom
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS