Solved

Display clock in Oracle APEX

Posted on 2011-02-14
12
2,798 Views
Last Modified: 2013-12-12
I have an application developed in Oracle Application Express 3.2.1.00.12.

I want to display a clock on the top of my application page.

0
Comment
Question by:pinkuray
  • 8
  • 4
12 Comments
 
LVL 20

Expert Comment

by:gatorvip
ID: 34896624
There are many Javascript clocks you can use ... what are you looking to do?

Here are a few examples of analog clocks:

http://www.nimblecoder.com/blog/archive/2009/12/30/animated-clocks-for-svg-and-silverlight.aspx
http://randomibis.com/coolclock/
http://anomaly.org/wade/projects/svgClocks/

In APEX, you will have two options:
1. Modify a template so that the clock appears on every page that uses that template
2. Modify a single page, where you want the clock to appear. Load the javascript for the clock in the page header and create a region for the clock.
0
 
LVL 4

Author Comment

by:pinkuray
ID: 34907177
I just wanted to add a clock at top left side of my application.

wanted to know how to modify the template to add a clock.

0
 
LVL 4

Author Comment

by:pinkuray
ID: 34915976
I got one website which allows me to develop a clock which can be implemented to my application on header part.

URL:
http://www.timeanddate.com/clocks/free.html

Now this works for me very well.

But one issue with this is: On the clock image a hyper-link is generated to the above URL, I dont want that, can you please guide me on this.
0
 
LVL 20

Expert Comment

by:gatorvip
ID: 34919613
I don't think you can remove that URL. When you generate the code, it simply points back to the original site via an iframe, so you can't modify the clock yourself. The links I posted in the first post are all to stuff that you can modify and use locally.
0
 
LVL 4

Author Comment

by:pinkuray
ID: 34923369
yes true,

I was checking the http://randomibis.com/coolclock/.

I uploaded them in my shared component.

But now How will I add or to display it in my application.

When I added these below lines in my page properties --> HTML Header section:

<script type="text/javascript" src="#WORKSPACE_IMAGES#coolclock.js"></script>
<script type="text/javascript" src="#WORKSPACE_IMAGES#moreskins.js"></script>


and in that page I have created a region and added this below lines :

<canvas id="clockid" class="CoolClock:chunkySwiss:30::+2"></canvas>

and then I have saved my application page and run it again.

Still I dont see anything that is displaying in my application.

Can you please guide me on this as I think I am missing something here.
0
 
LVL 20

Expert Comment

by:gatorvip
ID: 34925438
Are you testing it in Internet Explorer, or a different browser? IE does not currently support the <canvas> tag although that may change in IE9


http://en.wikipedia.org/wiki/Canvas_element
Support

The element is supported by the current versions of Mozilla Firefox, Google Chrome, Safari, and Opera. Current versions of Internet Explorer including IE 8 cannot natively display canvas content.[7] Google and Mozilla plugins are available[8] and support is under development for Internet Explorer 9.



Also, did you do this part:

<body onload="CoolClock.findAndCreateClocks()">
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 4

Author Comment

by:pinkuray
ID: 34928148
I wast such a clock which support everything like IE or corme or firefos everything....

Can you suggext me something what I am thinking ?
0
 
LVL 4

Author Comment

by:pinkuray
ID: 34928158
as I think also include older or higher version too.
0
 
LVL 4

Author Comment

by:pinkuray
ID: 34931534
is there anything on IE version6
0
 
LVL 4

Author Comment

by:pinkuray
ID: 34931539
anyway to display the clock in IE.
0
 
LVL 20

Accepted Solution

by:
gatorvip earned 500 total points
ID: 34943231
I think the question has turned into finding/developing an analog clock that works in all/most popular browsers. It has very little (if any) to do with APEX anymore. You can run a google search for "free javascript analog clock" and start going through the results to find something that works for you. Just be careful with the licensing terms if you're using the code on a production/commercial site,

For example, this one seems like it might work for you (I tested in FF, Chrome and IE 7 & 8, as I don't have IE6 available).

http://javascript.internet.com/time-date/ds-analogclock.html
again, check the licensing terms to see if there's any potential roadblocks.

I tried to use the clock mentioned above (http://randomibis.com/coolclock/ ) but it didn't work in either IE version, even when using the ExplorerCanvas module.

If you don't really need an analog clock, and a digital one would be enough (i.e., 8:00:00 AM), that would be significantly simpler to do.
0
 
LVL 4

Author Closing Comment

by:pinkuray
ID: 34948565
Thanks your idea really works for me :-)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now