Servoy + HTML: great!

Share business templates, ideas, experiences, etc with fellow Servoy developers here

Servoy + HTML: great!

Postby Stef » Thu May 13, 2004 7:02 pm

Amazing the things you can do with Servoy + HTML!
We're working on a resources planning system and are amazed by the possibilities!

Have a look:

http://www.willcom.be/timelinedemo.htm

(looks slow because of the flash)
Stef
 
Posts: 208
Joined: Wed May 28, 2003 2:19 pm
Location: Kasterlee, Belgium

Postby Harjo » Thu May 13, 2004 8:14 pm

Great technique Stef!

Is this based on calculations?
Could you give us a peak?
:wink:
User avatar
Harjo
 
Posts: 4273
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby swingman » Thu May 13, 2004 8:18 pm

I will have to do something similar at some point, so what you have done looks very encouraging!

Just a couple of suggestions:

- get the datepicker to close when you select a day. Saves the click OK.
- why not allow users to click in the timeline and open the event-editor with the date you clicked input automatically :-)
User avatar
swingman
 
Posts: 1177
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Postby maarten » Thu May 13, 2004 8:31 pm

Hi Stef,

Thanks for sharing!
I can see you're definitely getting the hang of it :)

Please also read these post:
http://forum.servoy.com/viewtopic.php?p=8635&highlight=#8635
It's an example of how you can separate the design (HTML) from your queries. The benefit is that you can re use your HTML (global script)
with different form scripts. (might come in handy)
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Postby Stef » Thu May 13, 2004 8:32 pm

Dear Swingman,

-datepicker: didn't know you don't have to click on OK! Thanks!
-click in the timeline: how to do this without having to make hundreds of buttons? Can we capture the screenposition on mouseclick? (did it with a plugin in FM before...)

Thanks for the input!

to HJK: is rather hard to explain in words... I don't know a lot of HTML, did it the "stupid" way: I made tables in frontpage and looked at the HTML code, split the code and put it in formulas.

HTH
Stef
Stef
 
Posts: 208
Joined: Wed May 28, 2003 2:19 pm
Location: Kasterlee, Belgium

Postby Harry Catharell » Fri May 14, 2004 12:26 pm

I am fascinated - but I must admit to being mystified - by this whole use of HTML within Servoy.

I have heard wonderful tales of using it as Stef did and also in order to generate reports.

Is there any tutorial detail or other source of examples (or even part of a training seminar !) which would outline its implementation and benefits.

Harry
Harry Catharell
 
Posts: 812
Joined: Fri Sep 26, 2003 10:23 am
Location: Milton Keynes, England

Postby swingman » Fri May 14, 2004 2:30 pm

Stef wrote:-click in the timeline: how to do this without having to make hundreds of buttons? Can we capture the screenposition on mouseclick? (did it with a plugin in FM before...)


Hi Stef,

You could define the buttons in your HTML.
This is a snippet of code I use to insert a single button with an icon in my HTML:
s is my HTML string

Code: Select all
s += '<a href="javascript:yourfunction(' + yourcurrentdategoeshere + ')"><img src = "media:///yourgraphic.gif" border="0" ></a><br>';


replace yourfunction, yourcurrentdategoeshere, yourgraphic.gif and put it inside your loop

yourfunction will now know which date you clicked :-)
Last edited by swingman on Sat May 15, 2004 8:21 am, edited 1 time in total.
User avatar
swingman
 
Posts: 1177
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Postby swingman » Fri May 14, 2004 2:43 pm

Stef wrote:I don't know a lot of HTML, did it the "stupid" way: I made tables in frontpage and looked at the HTML code, split the code and put it in formulas.


That is not stupid at all! Doing this can save a lot of time.
We do the same with GoLive.
User avatar
swingman
 
Posts: 1177
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Postby maarten » Sat May 15, 2004 12:26 am

Here's a time saver if you're using an HTML editor and want to transport the code into a Servoy script.

1) Select the HTML code in your editor
2) do CTRL+C (copy to Clipbaord)
3) run this script (modifies the clipboard content by concatenating it into a string syntax for use in a servoy script)
4) do CTRL +V (paste into a servoy script)
Code: Select all
var clipBoardString = application.getClipboardString()
var clipBoardStringModified = "";
var clipBoardArray = clipBoardString.split("\n")

for(var i=0 ; i<clipBoardArray.length ; i++)
{
   clipBoardStringModified += "\n'"+clipBoardArray[i]+"'+"
}
application.setClipboardContent(clipBoardStringModified)
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Postby Stef » Sat May 15, 2004 9:29 am

Thanks for the input Maarten & Swingman!
This looks like great teamwork here, it's getting better and better.

About using frontpage: let's call it "lazy" instead of "stupid" :lol:

Thanks a lot,
Stef
Stef
 
Posts: 208
Joined: Wed May 28, 2003 2:19 pm
Location: Kasterlee, Belgium


Return to Sharing Central

Who is online

Users browsing this forum: No registered users and 3 guests