Jump to content

ruegen

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by ruegen

  1. I now looks like this:

    var currentVersion = "1.0";function checkForUpdate(){		var updateRequest = new XMLHttpRequest();    updateRequest.open("GET", "http://site/updaters/update_v.txt", false);   updateRequest.send(null);			var updateRequestText = updateRequest.responseText;		if(updateRequestText == (currentVersion)){ 	 document.getElementById('newUpdate').style.display = 'none'; }}function openLink(url){	if(window.widget){    widget.openURL(url);	}	else{  window.location = url;	}}

  2. This thread is going to go forever unless you show us the whole page( or at least all of the javascript )..Not being rude, it's just not possible to help you properly without the code :) Thanks,

    Hey the link works, always the simplest things.Now I just have to work out how to make the link disappear and only appear when my app needs updating.
  3. currently I have in the javascript file (file.js)

    {var currentVersion = "1.0";}{function checkForUpdate(){		var updateRequest = new XMLHttpRequest();  updateRequest.onreadystatechange = nullFunction;  updateRequest.open("GET", "http://site/updaters/update_v.txt", false);   updateRequest.send(null);			var updateRequestText = updateRequest.responseText;		if(updateRequestText == (currentVersion)){ 	 document.getElementById('newUpdate').style.display = 'none'; }

  4. In the HTML file I have

    <a id="updateLink" href="javascript:openLink('WEBPAGE');" style="text-decoration: none; display: block;">	<div id="newUpdate">  New Update<br />Available!	</div></a>

    What I need in the javascript file is when a downloaded txt file (which has the new version number) is not the same as on the javascript file then it displays the above code.When that is displayed you can then click on "new update available" and it "openlink" to a webpage".Does anyone know of a chat room where I can discuss this with someone?NOTE: I removed the real web link with WEBPAGE just for this post.

×
×
  • Create New...