• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3086
  • Last Modified:

Display clock in Oracle APEX

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
pinkuray
Asked:
pinkuray
  • 8
  • 4
1 Solution
 
gatorvipCommented:
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
 
pinkurayAuthor Commented:
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
 
pinkurayAuthor Commented:
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
The Lifecycle Approach to Managing Security Policy

Managing application connectivity and security policies can be achieved more effectively when following a framework that automates repeatable processes and ensures that the right activities are performed in the right order.

 
gatorvipCommented:
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
 
pinkurayAuthor Commented:
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
 
gatorvipCommented:
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
 
pinkurayAuthor Commented:
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
 
pinkurayAuthor Commented:
as I think also include older or higher version too.
0
 
pinkurayAuthor Commented:
is there anything on IE version6
0
 
pinkurayAuthor Commented:
anyway to display the clock in IE.
0
 
gatorvipCommented:
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
 
pinkurayAuthor Commented:
Thanks your idea really works for me :-)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 8
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now