Page 1 of 1

Servoy + HTML: great!

PostPosted: Thu May 13, 2004 7:02 pm
by Stef
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)

PostPosted: Thu May 13, 2004 8:14 pm
by Harjo
Great technique Stef!

Is this based on calculations?
Could you give us a peak?
:wink:

PostPosted: Thu May 13, 2004 8:18 pm
by swingman
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 :-)

PostPosted: Thu May 13, 2004 8:31 pm
by maarten
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)

PostPosted: Thu May 13, 2004 8:32 pm
by Stef
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

PostPosted: Fri May 14, 2004 12:26 pm
by Harry Catharell
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

PostPosted: Fri May 14, 2004 2:30 pm
by swingman
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 :-)

PostPosted: Fri May 14, 2004 2:43 pm
by swingman
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.

PostPosted: Sat May 15, 2004 12:26 am
by maarten
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)

PostPosted: Sat May 15, 2004 9:29 am
by Stef
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