Colour Chooser in Webclient

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

Colour Chooser in Webclient

Postby dpearce » Tue May 31, 2011 2:26 pm

Has anyone used or adapted a javascript/html colour chooser that can easily be used in webclient?

or is it a case of creating my own?!

David
dpearce
 
Posts: 469
Joined: Sun Dec 03, 2006 11:53 am

Re: Colour Chooser in Webclient

Postby ROCLASI » Tue May 31, 2011 2:33 pm

Like this one ? http://jscolor.com/
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Colour Chooser in Webclient

Postby dpearce » Tue May 31, 2011 2:56 pm

Yes!

That looks excellent.

Where I always get confused is how you get the value back into the DB in servoy. Would you need to use the webclient utilities plugin?

Have you used this or does anyone have any sample code of reading the result back to the DB?

Thanks

David
dpearce
 
Posts: 469
Joined: Sun Dec 03, 2006 11:53 am

Re: Colour Chooser in Webclient

Postby dpearce » Sat Jun 04, 2011 10:45 am

Forgive me, but I am not seeing how I can return the value to my database?

The Field I am clicking must have the html
Code: Select all
<html>
<head>
   <title>jscolor demo</title>
</head>
<body>

   <script type="text/javascript" src="jscolor.js"></script>

   Click here: <input class="color" value="66ff00">

</body>
</html>


What do I need to add to the '<input class' line to be able to then send the result back to the database. and does that need the web client utils pluin?

Thanks

David
dpearce
 
Posts: 469
Joined: Sun Dec 03, 2006 11:53 am

Re: Colour Chooser in Webclient

Postby ROCLASI » Sat Jun 04, 2011 12:12 pm

Hi David,

Here is a demo on how you could implement this jscolor picker using the Web Client Utils plugin.
Thanks to the plugin it's fairly simple :)
Attachments
DemoColorPicker.servoy
(4.55 KiB) Downloaded 325 times
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Colour Chooser in Webclient

Postby dpearce » Sat Jun 04, 2011 4:39 pm

Robert,

Thats Great, Many thanks, i am always lost when it comes to this type of integration.

Tell me, I find that this sometimes needs the browser to be refreshed in order to work. So i display it on a form with a tab panel. This is displayed in a dialogue. If I click to another tab and back the functionality dissappears until i click refresh browser.

I think I have seen this with other javascript stuff like this, for example when I was working with patrick to integrate a JS html editor, it sometimes didnt appear first time, but only after using the browser refresh.

Is there anyway to force the script to refresh this? or prevent this behaviour?

Thanks Again.
dpearce
 
Posts: 469
Joined: Sun Dec 03, 2006 11:53 am

Re: Colour Chooser in Webclient

Postby ROCLASI » Sat Jun 04, 2011 5:12 pm

Hi David,

Sounds like a browser issue to me. What OS/browser/version do you use ?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Colour Chooser in Webclient

Postby dpearce » Sat Jun 04, 2011 5:24 pm

This is safari 5.04. OS X 10.6.7

I will try it in firefox
dpearce
 
Posts: 469
Joined: Sun Dec 03, 2006 11:53 am


Return to Web Development

Who is online

Users browsing this forum: No registered users and 9 guests