Solved

Display clock in Oracle APEX

Posted on 2011-02-14
12
2,861 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
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
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
 
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle - SQL Query with Function 3 53
PL/SQL Two changes 7 34
Error querying database link from Oracle 10g to Postgresql 7 65
Help with Oracle IF statment 5 26
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

829 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