Click here to Skip to main content
14,603,017 members

JavaScript

 
GeneralRe: Data from one page to another with a twist. Pin
Richard Deeming15-Jun-20 1:27
mveRichard Deeming15-Jun-20 1:27 
GeneralRe: Data from one page to another with a twist. Pin
and180y15-Jun-20 1:46
Memberand180y15-Jun-20 1:46 
GeneralRe: Data from one page to another with a twist. Pin
Richard Deeming15-Jun-20 4:59
mveRichard Deeming15-Jun-20 4:59 
GeneralRe: Data from one page to another with a twist. Pin
and180y15-Jun-20 8:56
Memberand180y15-Jun-20 8:56 
GeneralRe: Data from one page to another with a twist. Pin
Richard Deeming15-Jun-20 8:58
mveRichard Deeming15-Jun-20 8:58 
GeneralRe: Data from one page to another with a twist. Pin
and180y15-Jun-20 9:07
Memberand180y15-Jun-20 9:07 
GeneralRe: Data from one page to another with a twist. Pin
Richard Deeming15-Jun-20 9:16
mveRichard Deeming15-Jun-20 9:16 
QuestionJavascript function error. Pin
and180y9-Jun-20 13:55
Memberand180y9-Jun-20 13:55 
Can anyone point me in the right direction with this please?

I have these inputs and below a function to give me the hours open, except it doesn't. I've tried putting the function in online checkers and all is okay according to them but it doesn't calculate.
Thanks in advance.


<div class='col-sm-2 mb-2'>
<input type='text' id='opening-time' class='form-control' data-calc='openingTime' value='00.00' tabindex='-1'>
</div>
<div class='col-sm-2 mb-2'>
<input type='text' id='closing-time' class='form-control' data-calc='closingTime' value='00.00' tabindex='-1'>
</div>
<div class='col-sm-2 mb-2'>
<input type='text' id='hoursOpen' class='form-control form-output' data-calc='hoursOpen' value='00.00'readonly tabindex='-1'>
</div>
</div>


$(function(){ 
$("#closingTime").keyup(function(){
	var openingTime = $("#openingTime").val();
	var closingTime = $("#closingTime").val();
     $("hoursOpen").html(closingTime-openingTime);
 })
})

AnswerRe: Javascript function error. Pin
Richard MacCutchan9-Jun-20 21:03
mveRichard MacCutchan9-Jun-20 21:03 
GeneralRe: Javascript function error. Pin
and180y9-Jun-20 23:27
Memberand180y9-Jun-20 23:27 
GeneralRe: Javascript function error. Pin
Richard MacCutchan9-Jun-20 23:36
mveRichard MacCutchan9-Jun-20 23:36 
GeneralRe: Javascript function error. Pin
and180y10-Jun-20 0:21
Memberand180y10-Jun-20 0:21 
GeneralRe: Javascript function error. Pin
Estys10-Jun-20 0:31
MemberEstys10-Jun-20 0:31 
GeneralRe: Javascript function error. Pin
and180y10-Jun-20 0:59
Memberand180y10-Jun-20 0:59 
GeneralRe: Javascript function error. Pin
Richard MacCutchan10-Jun-20 0:37
mveRichard MacCutchan10-Jun-20 0:37 
GeneralRe: Javascript function error. Pin
and180y10-Jun-20 0:58
Memberand180y10-Jun-20 0:58 
GeneralRe: Javascript function error. Pin
Richard MacCutchan10-Jun-20 1:18
mveRichard MacCutchan10-Jun-20 1:18 
AnswerRe: Javascript function error. Pin
Richard Deeming9-Jun-20 23:13
mveRichard Deeming9-Jun-20 23:13 
GeneralRe: Javascript function error. Pin
and180y9-Jun-20 23:25
Memberand180y9-Jun-20 23:25 
GeneralRe: Javascript function error. Pin
Richard Deeming10-Jun-20 1:26
mveRichard Deeming10-Jun-20 1:26 
GeneralRe: Javascript function error. Pin
and180y10-Jun-20 1:55
Memberand180y10-Jun-20 1:55 
GeneralRe: Javascript function error. Pin
and180y10-Jun-20 23:06
Memberand180y10-Jun-20 23:06 
GeneralRe: Javascript function error. Pin
Richard Deeming10-Jun-20 23:30
mveRichard Deeming10-Jun-20 23:30 
GeneralRe: Javascript function error. Pin
and180y10-Jun-20 23:45
Memberand180y10-Jun-20 23:45 
JokeRe: Javascript function error. Pin
DerekT-P11-Jun-20 2:26
professionalDerekT-P11-Jun-20 2:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.