Wayne Taylor (webtubbs)
asked on
Modify ClickOnce publish page
Hi Guys,
I'm attempting to recreate the deployment page for QuickEE - http://quickee.dabas.net.au/publish.htm
All is going well, but one thing has me stumped. How can I determine the latest available version number (currently 1.1.0.68)? Within the same directory, there are a number of folders and files. There are a number of files, with the naming format 'QuickEE_1_1_0_68.applicat ion'. Is there a way to check each of these files and return the latest version using JavaScript?
Cheers,
Wayne
I'm attempting to recreate the deployment page for QuickEE - http://quickee.dabas.net.au/publish.htm
All is going well, but one thing has me stumped. How can I determine the latest available version number (currently 1.1.0.68)? Within the same directory, there are a number of folders and files. There are a number of files, with the naming format 'QuickEE_1_1_0_68.applicat
Cheers,
Wayne
Cant you dump a
version.js
in there which just does a
document.write('1_1_0_68')
and which is updated by your deployment package?
version.js
in there which just does a
document.write('1_1_0_68')
and which is updated by your deployment package?
ASKER
Thanks, mplungjan.
Is it possible to read http://quickee.dabas.net.au/QuickEE.application with js? It contains this....
<assemblyIdentity name="QuickEE.application" version="1.1.0.68" publicKeyToken="ab611e03a9 5fb421" language="neutral" processorArchitecture="msi l" xmlns="urn:schemas-microso ft-com:asm .v1" />
Wayne
Is it possible to read http://quickee.dabas.net.au/QuickEE.application with js? It contains this....
<assemblyIdentity name="QuickEE.application"
Wayne
Absolutely
xmlhttp request to the resque...
Do you use prototype.js?
xmlhttp request to the resque...
Do you use prototype.js?
ASKER
No. There are no js files involved at all. All is contained in publish.htm.
<script>
var req;
function retrieveURL(url) {
if (window.XMLHttpRequest) { // Non-IE browsers
req = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
req = new ActiveXObject("Microsoft.X MLHTTP");
}
if (req) {
//Define "callback" function
req.onreadystatechange = processStateChange;
try {
req.open("GET", url, true);
req.send('');
} catch (e) {
alert(e);
}
} else {
document.getElementById("v ersion").i nnerHTML = "XMLHTTPRequest not supported";
}
}
function processStateChange() {
if (req.readyState==4) {
if (req.status == 200) { // OK response
var t = req.responseText;
version = t.substring(t.indexOf('ver sion="')+9 ,t.indexOf ('" publicKeyToken'))
document.getElementById("v ersion").i nnerHTML = version;
}
}
</script>
</head>
<body onLoad="retrieveURL('Quick EE.applica tion')">
Version: <span id="version"></span>
var req;
function retrieveURL(url) {
if (window.XMLHttpRequest) { // Non-IE browsers
req = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
req = new ActiveXObject("Microsoft.X
}
if (req) {
//Define "callback" function
req.onreadystatechange = processStateChange;
try {
req.open("GET", url, true);
req.send('');
} catch (e) {
alert(e);
}
} else {
document.getElementById("v
}
}
function processStateChange() {
if (req.readyState==4) {
if (req.status == 200) { // OK response
var t = req.responseText;
version = t.substring(t.indexOf('ver
document.getElementById("v
}
}
</script>
</head>
<body onLoad="retrieveURL('Quick
Version: <span id="version"></span>
ASKER
Thanks. It doesn't seem to be working. Can you take a look at http://quickee.dabas.net.au/test.htm
Missing } after function body
function processStateChange() {
if (req.readyState==4) {
if (req.status == 200) { // OK response
var t = req.responseText;
version = t.substring(t.indexOf('ver sion="')+9 ,t.indexOf ('" publicKeyToken'))
document.getElementById("v ersion").i nnerHTML = version;
}
}
has to be
function processStateChange() {
if (req.readyState==4) {
if (req.status == 200) { // OK response
var t = req.responseText;
version = t.substring(t.indexOf('ver sion="')+9 ,t.indexOf ('" publicKeyToken'))
document.getElementById("v ersion").i nnerHTML = version;
}
}
}
and you MUST call the retreive in the onLoad or after you define the span since it does not exist where you call it now
function processStateChange() {
if (req.readyState==4) {
if (req.status == 200) { // OK response
var t = req.responseText;
version = t.substring(t.indexOf('ver
document.getElementById("v
}
}
has to be
function processStateChange() {
if (req.readyState==4) {
if (req.status == 200) { // OK response
var t = req.responseText;
version = t.substring(t.indexOf('ver
document.getElementById("v
}
}
}
and you MUST call the retreive in the onLoad or after you define the span since it does not exist where you call it now
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Awesome! That works.
Many Thanks,
Wayne
Many Thanks,
Wayne
What it can do is read a (manifest ) file