Showing posts with label Microsoft Web Browser. Show all posts
Showing posts with label Microsoft Web Browser. Show all posts

Wednesday, September 10, 2008

Fun with the WebBrowserControl - DemoApp release

I think I've cleaned up the demo-app good enough now.

I added another demo, showing the browser on the onHelp event in Notes/offline Mootools accordion.

Apart from that, I've changed the way I store JS. I now store it in a page, and use the NotesNoteCollection of the db to fetch it (look in the code). This makes it easier to implement in a Template-context.

If you test the app on something else than Notes 8, I'd appreciate feedback (preferably in the comments) on the stability of the demoapp.

To test out making friends, edit a document in the DiscworldCharacters-view (make sure the HTTP-task is running). If you're running the demo on a server, edit the Add friend-button, so that the domain is correct.

The other demos are in the BrowserDemo-form.

>> The WebBrowserControl demoapp

The flash-demos are here

Update: Martin tested the app in N6.53. That makes it at least compatible with N6.5 to N8.02.

Tuesday, September 9, 2008

Fun with the WebBrowser Control - Finishing up

I'm more or less satisfied with what I've accomplished with my experiments.

I'm now able to "bootstrap" (in lack of a better term) a JS-library/HTML to a WebBrowser control. This enables you to write truly offline widgets (no HTTP-task involved) for your notes-apps.

I'm also able to bind LS-functions to the events available in the WebBrowser-control using environment variables and Execute.

I won't be able to clean up the demo-app today. Hopefully I'll be done tomorrow if nothing else comes up.

Until then, I've made another flash showing a youtube-movie inside Notes (for instruction videos/etc.), and logging of navigation (for tracking of online wizards inside Notes/etc.) in the webbrowser using the BeforeNavigate2-event.

If you want me to do make another example of integration with the WebBrowser-control, leave a comment, and I'll see what I can do.

All the flash-demos:
Demo 1 - simple usage
Demo 2 - Web autocomplete to Notes
Demo 3 - Offline Mootools-demo
Demo 4 - Web Autocomplete - Add friends
Demo 5 - Loading Youtube-movies/logging navigation

Monday, September 8, 2008

Fun with the WebBrowser Control - Making friends

The demoapp has gone through serious a serious rewrite to make the code more reusable/flexible. I've also worked a little bit on dynamically binding events through environment variables and execute. Sadly I haven't found a way of truly dynamically binding events (On Event..).

Some of the methods for the browser-class I use are now also chainable. E.g.
Dim browser As New Browser
Call browser.setSize(300, 400).openUrl("http://google.com")


Todays flash shows a little friend-making:



The document being edited has a hidden multi-value field that holds ID's to other "Discworld Characters". When a character is selected in the lookup, the id of that document is put inside a hidden field in the browser document.

When the browser is closed, the values is picked out of the browser document and added to the "friends-list". Then the document is refreshed/a lookup is run to update the list of friends (a computed for display field). This is achieved by binding a function-call to the windowclosing-event of the control.

I'm still not ready to release the demoapp. If I do that, I'm probably going to stop experimenting on the WebBrowser, and start mucking with XPages..

Friday, August 22, 2008

Fun with the WebBrowser Control pt 3

I've come a little farther in my experimentation.

Today's flash show offline DHTML. The flash doesn't do the FX justice btw. When I'm done tinkering, you'll get to see the real deal.




I put the mootools framework JS inside a RichText-item on a document. Fetch the js as a string. Write the string and some HTML to the WebBrowser-control. Hey Presto! Offline DHTML.

My brain is fried right now, so no more programming today.. :)

Wednesday, August 20, 2008

Fun with the WebBrowser Control pt 2

Getting to know the object more and more.

Today's flash shows capturing events from the browser-control, and picking values from the document inside the control.



This resource from Microsoft has helped me along somewhat. Only a fraction of the methods/events/properties documented is available in Notes though.

The demoapp is still not ready, as I'm still not finished investigating possibilities.. :)

Friday, August 8, 2008

Fun with the WebBrowser control

I'm messing around with the WebBrowser Control again.. :)

I planned on getting a demoapp together today, but I had to find a workaround for showing/hiding the layer holding the webbrowser, and that took most of my time. Hide-when doesn't work properly with the WebBrowser-object.

At least I want to show some fruits of my labor. A small flash animation showing scripting between Notes and the control/putting the WebBrowser control inside a layer.




The promt/messagebox in the demo are Notes'. You can tell from how they look, compared to the browser's alert/prompt.

I'll probably post a demoapp/more info when I have something more useful..

Sunday, August 12, 2007

Fun stuff with the FieldListener class

BIIG flash.. Sorry, but don't know how to get it smaller.







In the demo above, I have a form with a "Microsoft Web Browser" object. If the "search" field contains the words wiki, amazon or amazonuk, I use the searchengine at the site to search for the rest of the parameters.

The search-sub:

Sub search
Dim ws As New NotesUIWorkspace
Dim arrAction As Variant
Dim sstr As String, baseURL As String

arrAction = Split(ws.CurrentDocument.FieldGetText( "search" ), " ")


Dim browser As Variant
Set browser = ws.CurrentDocument.GetObject("Microsoft Web Browser")
If browser.width <> 950 Then
browser.width = 950
browser.height = 700
End If

sstr = Replace( Implode(arrAction, "+"), arrAction(0)+"+", "")
Select Case Lcase( arrAction(0) )
Case "wiki"
baseURL = "http://en.wikipedia.org/wiki/Special:Search?search="

Case "amazonuk"
baseURL = "http://www.amazon.co.uk/s/026-5318277-1707602?&field-keywords="

Case "amazon"
baseURL = "http://www.amazon.com/s/026-5318277-1707602?&field-keywords="

Case Else
baseURL = arrAction(0)
sstr = ""
End Select

Call browser.navigate( baseurl + sstr )
End Sub