473,836 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fancy time picker javascript problem...

Hello Javascript Experts (of which I am not ! ) --

I'm trying to utilize a javascript I found on the web that allows a
user to select a time of day from a simple control. The script works
just fine in Internet Explorer (7) but doesn't work in Firefox when I
use it in my form. Firefox gives me an error (using firebug) that
says: "variablena me" is not defined) where variablename is the

The odd thing about this is that the example that comes with the
script I downloaded works fine, it's only when I put it into my form
that it stops working. Even in Firefox...

Here is the code download page: http://www.java2s.com/Code/JavaScrip...TimePicker.htm

(there is a link to download a zip file of all the stuff with the
example htm page included at the bottom of the screen)

Any ideas?

Thanks!!

Megan
Aug 8 '08 #1
5 2745
Oops I didn't finish this line

where variablename is the name of the input text field where the
script is supposed to be loaded onclick

onclick="select Time(this,timep icker1)"

the error firefox gives is 'timepicker1 is not defined'

while IE loads the script without complaint

On Aug 8, 10:56*am, mkhines <megan.hi...@gm ail.comwrote:
Hello Javascript Experts (of which I am not ! ) --

I'm trying to utilize a javascript I found on the web that allows a
user to select a time of day from a simple control. *The script works
just fine in Internet Explorer (7) but doesn't work in Firefox when I
use it in my form. *Firefox gives me an error (using firebug) that
says: "variablena me" is not defined) where variablename is the

The odd thing about this is that the example that comes with the
script I downloaded works fine, it's only when I put it into my form
that it stops working. *Even in Firefox...

Here is the code download page: *http://www.java2s.com/Code/JavaScrip...TimePicker.htm

(there is a link to download a zip file of all the stuff with the
example htm page included at the bottom of the screen)

Any ideas?

Thanks!!

Megan
Aug 8 '08 #2
On Aug 8, 12:00*pm, mkhines <megan.hi...@gm ail.comwrote:
Oops I didn't finish this line

where variablename is the name of the input text field where the
script is supposed to be loaded onclick

onclick="select Time(this,timep icker1)"

the error firefox gives is 'timepicker1 is not defined'

while IE loads the script without complaint

On Aug 8, 10:56*am, mkhines <megan.hi...@gm ail.comwrote:
Hello Javascript Experts (of which I am not ! ) --
I'm trying to utilize a javascript I found on the web that allows a
user to select a time of day from a simple control. *The script works
just fine in Internet Explorer (7) but doesn't work in Firefox when I
use it in my form. *Firefox gives me an error (using firebug) that
says: "variablena me" is not defined) where variablename is the
The odd thing about this is that the example that comes with the
script I downloaded works fine, it's only when I put it into my form
that it stops working. *Even in Firefox...
Here is the code download page: *http://www.java2s.com/Code/JavaScrip...TimePicker.htm
(there is a link to download a zip file of all the stuff with the
example htm page included at the bottom of the screen)
Any ideas?
Thanks!!
Megan- Hide quoted text -

- Show quoted text -
Is timepicker1 the name or id of an element? if so you should be
enclosing it in single quotes:

onclick="select Time(this, 'timepicker1'); "

If timepicker1 is an actual variable that has been assigned reference
to an object, then I think you'll need to post more code so we can see
this assignment plus the related HTML.
Aug 8 '08 #3
On Aug 8, 11:56*am, mkhines <megan.hi...@gm ail.comwrote:
Hello Javascript Experts (of which I am not ! ) --

I'm trying to utilize a javascript I found on the web that allows a
user to select a time of day from a simple control. *The script works
just fine in Internet Explorer (7) but doesn't work in Firefox when I
use it in my form. *Firefox gives me an error (using firebug) that
says: "variablena me" is not defined) where variablename is the

The odd thing about this is that the example that comes with the
script I downloaded works fine, it's only when I put it into my form
that it stops working. *Even in Firefox...

Here is the code download page: *http://www.java2s.com/Code/JavaScrip...TimePicker.htm

(there is a link to download a zip file of all the stuff with the
example htm page included at the bottom of the screen)

Any ideas?
Yes, don't use that script. The second line indicates it is from the
JS dark ages:

var ie=document.all ;

It goes downhill after that:

var dom=document.ge tElementById;
var ns4=document.la yers;

There's no need to read any further. This is clearly from the late
90's and would have been considered incompetent then. Throw it away.
The only reaaon the page exists today is to host advertising.
Aug 9 '08 #4
On Aug 9, 8:53*am, David Mark <dmark.cins...@ gmail.comwrote:
On Aug 8, 11:56*am, mkhines <megan.hi...@gm ail.comwrote:
Hello Javascript Experts (of which I am not ! ) --
I'm trying to utilize a javascript I found on the web that allows a
user to select a time of day from a simple control. *The script works
just fine in Internet Explorer (7) but doesn't work in Firefox when I
use it in my form. *Firefox gives me an error (using firebug) that
says: "variablena me" is not defined) where variablename is the
The odd thing about this is that the example that comes with the
script I downloaded works fine, it's only when I put it into my form
that it stops working. *Even in Firefox...
Here is the code download page: *http://www.java2s.com/Code/JavaScrip...TimePicker.htm
(there is a link to download a zip file of all the stuff with the
example htm page included at the bottom of the screen)
Any ideas?
OK. So I need some kind of similar form function that is a user-
friendly way (and error preventing way) for users to pick a start and
end time for a task. I haven't seen anything that is as intuitive
that a bunch of volunteers would be able to grasp without too much
training or fumbling.

Any ideas?

Is it too horrible to re-work?

Thanks,
Megan
me*********@gma il.com
>
Yes, don't use that script. *The second line indicates it is from the
JS dark ages:

var ie=document.all ;

It goes downhill after that:

var dom=document.ge tElementById;
var ns4=document.la yers;

There's no need to read any further. *This is clearly from the late
90's and would have been considered incompetent then. *Throw it away.
The only reaaon the page exists today is to host advertising.
Aug 11 '08 #5
In comp.lang.javas cript message <35cf4d9b-7592-457c-9341-5fe1e29cb796@w7
g2000hsa.google groups.com>, Mon, 11 Aug 2008 06:58:23, mkhines
<me*********@gm ail.composted:
>OK. So I need some kind of similar form function that is a user-
friendly way (and error preventing way) for users to pick a start and
end time for a task. I haven't seen anything that is as intuitive
that a bunch of volunteers would be able to grasp without too much
training or fumbling.
For people of normal capability, and assuming that they should be
allowed in the first instance to choose any time, the easiest and
quickest way for all concerned is to get them to type it in numerically
into an "input type-text", using the 24-hour clock. Allow arbitrary
separators, so that the time will match /(\d+)\D+(\d+)/ and check the
bracketed fields for value arithmetically.

If serving chronologically-retarded locations, you might add a set of
three radio buttons, 24-h clock / a.m. / p.m. or allow entry matching
/(\d+)\D+(\d+).* (p)/i .

--
(c) John Stockton, nr London, UK. ?@merlyn.demon. co.uk Turnpike v6.05.
Web <URL:http://www.merlyn.demo n.co.uk/- w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demo n.co.uk/programs/- see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Aug 11 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
25708
by: timmy_dale12 | last post by:
I have a time field in an application. I am looking for some kind of pop up function that lets me insert a time. So its like a calendar pop up but you can choose a valid time instead of a date Has anybody here made such a function or know a link to any exampels Thanks
13
3871
by: Hussein Patwa | last post by:
Hi there. I'm new to this group. I'm also partially sighted so navigating the web is sometimes quite difficult. I'm looking for a javascript date picker, you know the ones that travel sites use for selecting the departure and arrival dates. I've had a look at some sites, but mostly found calendars. I want to make mys tie accessible, so I really want the three scroll boxes for the day, month and year.
1
2206
by: zeeshan359 | last post by:
Hi, I need free script that is "date and time" picker in javascript without popup, It should be in iframe or div or layers. I shall be thankful to you, if you provide me some details of it. Regards Zeeshan
4
2674
by: Michael Turner | last post by:
Hi Guys I have two DateTime pickers one shows the Date and the other the time, this is a requirement of the solution. The problem I have is that when the time is saved to the sql database into a datetime field it uses the default date which is a problem when I try to sort, what I wanted to know is there a way for me to set the date in the time picker to the date in the date picker? Any help greatly appreciated.
4
4882
by: Michel Posseth [MCP] | last post by:
I have a problem with the date time picker validate event wich i believe is a bug How to reproduce : throw on a form a date time picker control and a textbox control select the validating event of the control and add this code
2
2338
by: Alfred | last post by:
I need a calendar + time picker tool that is: * public domain * non-AJAX (at this time) * javascript * works in IE 6 and Firefox 1.5 and up * div-based * uses CSS too * permits not just picking a date from the calendar and switching months, years backwards and forwards, but also pick the time
0
2847
by: fredloh | last post by:
i have a tab control on my form. i then have several microsoft date and time picker control on the tab control. when i select a date on any of the date and time picker control, the result of the control's value is always 12:00:00 am instead of the date i selected even though the date displays correctly on the date and time picker control. the controls are unbound. why is this? i also have another identical form where the date and...
2
2167
by: pradeeplnarayan | last post by:
Hi Peers, I like to have a simple time picker in javascript, similar to the one that is in our windows OS (Double click the time in your windows sytem tray). It should allow users to set only time in hh:mm:ss Am/Pm format. It should not hav any popups. Any help on components/resources on this would be greatly appreciated. Regards, Pradeep.
4
1985
by: Arun | last post by:
I came across a message sometime back in 2002. Here's a link: http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/f10e3748f6f260c5/b0b1ac5840e445e5?lnk=gst&q=color+picker#b0b1ac5840e445e5. The author tries to build a colour picker from scratch but his overuse of <tdtags puts me off the solution. Here is something I just created. It uses prototype, just because it makes life easier for me. .... <head> <script...
0
9810
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9656
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10526
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10237
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7771
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6972
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5641
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4437
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3100
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.