Jump to content

stockton

Members
  • Content Count

    42
  • Joined

  • Last visited

Community Reputation

2 Neutral

About stockton

  • Rank
    Newbie
  • Birthday 05/13/1939

Profile Information

  • Location
    South Africa Midrand
  1. Using alert() has helped resolve this issue. Thanks for your input.
  2. I have javascript as follows function newDoc() { window.location.href = "http://192.168.0.8/devit/logon.html"; } If I call this function from my javascript as follows newDoc();[/code]it fails but if called from HTML[code]<input type="button" nanme="SelectButton" id="SelectButton" value="Login" onclick="newDoc()" height="50" /> it works.Please tell me what I am getting wrong.
  3. I have heard a rumour that it is possible to create apps for smart phones using only HTML5, CSS3 & JavaScript.Up till now I have used PhoneGap to make my programs cross platform compatible, but I have been given to understand that with only HTML5, CSS3 and Javascript one can create crossplatform applications(Cross platform = Android, IOS and Blackberry).Can someone please point me in the correct direction?
  4. I have followed the procedure at http://community.lin...torial/view/486 to install LAMP on my Mint 13 laptop with a view to developing locally & once working emigrate to my server but ...... the following simple HTML only displays the title(No image). The image does exist in the images folder & it makes no difference if I refer to it with ./images/prince.jpg or images/prince.jpg.Please tell me how I got the install wrong.<!DOCTYPE html><html><title>Jim Beam</title><meta name="author" content="Alf C Stockton"><meta http-equiv="Content-Type" content="text
  5. Sorry guys but now I have another issue.My code now looks like A1 = setInterval(function() {SlideNumbers(Previous, Current)}, 10);function SlideNumbers(PreviousOne, Next) { if (PreviousOne == Next) { clearInterval(A1); } UnitXpos -= 1; PreviousOne += 1; if (UnitXpos < -999) UnitXpos = 0; document.getElementById("Debugger").innerHTML = "PreviousOne = " + PreviousOne + " Next = " + Next; document.getElementById("Unit").style.top = UnitXpos+"px"; if (UnitXpos%10 == 0) ScrollTens(); } and I find that the variable PreviousOne never increments.Both Uni
  6. Thank you all. It is now working the way I want and I suspect that I now understand what is going on.
  7. The Old Man From Scene 24, sorry my mistake and I have now got your suggestion working for me.
  8. Duotone Fox please explain why the loop is a problem.The Old Man From Scene 24 if I implement your suggestion my script no longer works?
  9. I have implemented the following code, hopefully correctly using your suggestion but I still get no scroll from the reel unless I uncomment the alert(). If I uncomment the alert() the code works exactly as expected. A1 = setInterval(SlideNumbers(Hoogte, xpos), 2000); function SlideNumbers(Proposed, Current) { if (Proposed > 0) Proposed *= -1; if (Current > 0) Current *= -1; while (Proposed != Current) { Current -= 1; if (Current < -999) Current = -1;// alert("Proposed = "+Proposed+" Current = "+Current); document.getElementById("Unit").styl
  10. I hear what you are saying and what I am attempting is to smoothly scroll from the currently displayed number to the currently correct number and that is why the setTimeout.Sometimes the distance between the two numbers will be large . ie Let us say from 9 thru 0 to 8 and other times less so, let us say from 8 to 9.How would you suggest I achieve this?
  11. In an attempt to build my own vertical scrolling display I have created the following function which works perfectly if I uncomment the alert() but fails to scroll vertically without that alert. function ScrollNumbers(Current) { var xpos = findPosY(document.getElementById("Unit")); if (xpos > 0) xpos *= -1;// alert("ScrollNumbers with "+" "+Current+" " + xpos); var CurrentUnit = parseInt(Current[Current.length - 2]); var Hoogte = 0; var a = 0; var c = 0; Hoogte = ((CurrentUnit)*94); // CurrentUnit can be anything from 0 to 9 Hoogte *= -1;// alert("Entering loop
  12. Thank you. Unfortunately there is no documentation and the variable names mean nothing......typical........:-(I am going to attempt to do my own version of http://www.devit.co.za/odo/odo.html and see how far I get.What is wrong with http://www.devit.co.za/odo/odo.html is that I have found no way that I can control what the start number is and it also need a method of getting the latest value of that number from the server which I have already coded with Ajax as can be seen at http://www.k9t.za.net/epj/epj.html.If and when I need help I will start a new thread here.Thank you again.
  13. More likely the following code has something to do with it? zxcOdometer.prototype.Count=function(){ var z0=0,ary=this.ary,cnt=1; for (;z0<ary.length;z0++){ if (this.nu%cnt==0||z0==0){ ary[z0].cnt++; if (ary[z0].cnt==11){ ary[z0].cnt=1; ary[z0].now=0; } clearTimeout(ary[z0].dly); ary[z0].animate('top',ary[z0].now,-this.mve*ary[z0].cnt,new Date()); } cnt*=10; } document.getElementById("VoucherNumber").innerHTML = this.nu + " " + cnt + " "; this.nu++; } and if so why the prototype?
  14. Thank you but now does that mean that M1.Count to the 'nth time M1 was executed? or to put it another way please tell me what is the relevance of Count?
  15. Could someone please explain what the following means. M1=new zxcOdometer({ ID:'tst', // the unique ID name of the parent DIV element. (string) CommonClass:'digit', // the common class name of the images. (string) SlideDuration:200 //(optional) the slide duration in milli seconds. (number, default = 500)});setInterval(function(){ M1.Count(); },600); I believe that setInterval(f,t) will execute function f in t milliseconds but what does function(){ M1.Count(); } do?
×
×
  • Create New...