views:

330

answers:

3

Anyone have a sample of doing a jQuery notification/popup/calendar in Intraweb ?

A simple example would be great..

Even better... dojo version would be great.

+1  A: 

Here's a popup message

http://jsbin.com/otinu3/edit

In case you have difficulty using jsbin (great sandbox for testing these things), the markup is:

<!DOCTYPE html>
<html>
<head>
<link class="jsbin" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"></link>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt;
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"&gt;&lt;/script&gt;
<meta charset=utf-8 />
<title>Popup example</title>
</head>
<body>
  <div id="popupMessage">This is the popup message</div>
</body>
</html>​

and the JavaScript is as simple as

$('#popupMessage').dialog({title:'Here we go'});​
Bernhard Hofmann
Whats the recommended way of calling/using these from Delphi Intraweb ? Is it via IWJQuery ? Constructor ? Any samples of integrating with Intraweb would be great...
+1  A: 

Dojo has the toaster widget for notifications:

demo : http://docs.dojocampus.org/dojox/widget/Toaster

api : http://api.dojotoolkit.org/jsdoc/1.2/dojox.widget.Toaster

Works like a charm and is very configurable.

For popups use dojo's dialog widget.

For calendar use dojo's datepicker widget.

If you like you can have a notification with a link to lauch a popup that contains a calendar...

Andy
Whats the recommended way of calling/using these from Delphi Intraweb ? Is it via IWJQuery ? Constructor ? Any samples of integrating with Intraweb would be great...
the latter two widgets are dijit.Dialog and dijit.Calendar. You'll find documentation and examples for both at the docs.dojocampus.org site.
peller
Thanks.. But I'm after an example of calling/using the jQuery stuff from Intraweb.
A: 

In the Intraweb newsgroups I've posted a very basic example for using jQuery in Intraweb.

See atozedsoftware.intraweb.attachments (on nntp://news.atozed.com). Thread "JQuery sample project for André Aigneren", date November 23rd, 2009. Written in D2010 and IW 10. It is using the datepicker control.

The example is based on this blog: http://www.hadihariri.com/Blogs/Delphi/20080117.aspx.

Gert

Gert de Boom
Thanks.. After reading Hadi Hariri blog and some c# examples I got the code working.Thanks. (Also thanks to everyone for their feedback).