Last post Oct 25, 2007 01:56 PM by bmains
Oct 23, 2007 11:35 AM|Beezgetz|LINK
I have an (install C# app) button on my web site, and I want it to do couple of things when pressed.
One of them is to open site www.install_site.com/setup.exe , in order to install. I have:
this works on local computer, but as soon I put it on web, and press button,
it takes me to (my) error page.
What is the right code?
Oct 23, 2007 01:12 PM|bmains|LINK
Why not just redirect them to the EXE, such as:
Response.Redirect(" www.install_site.com/setup.exe ")
It should recognize that its an EXE and prompt for download. By the way, remove the spaces around the link, the automatic link recognizion was removing the " characters around it.
Oct 23, 2007 01:13 PM|kishorevj|LINK
<input type="button" id="InstallButton" onclick='window.location.href = "http://www.install_site.com/setup.exe"'>
This will prompt the user to download this installer. Hope this helps.
Oct 23, 2007 02:30 PM|Beezgetz|LINK
Thanks for quickly reply!
I know nothing about Java, only c#, and even at beginner stage. I use VWD to maintain web site. Nothing much...
I need people to install C# app by clicking a button on web page. Now, Response.Redirect("
www.install_site.com/setup.exe ") works fine, but it caused another problem. Before someone can click install button, he/she must select check box first. When the button is clicked the check box should be
set to not selected. Now it does not that. It leaves check box checked. Any ideas?
Also, I'll have to look if install button sends email.
Edit: email works, fine! But check box is still a bit of a problem...
Thanks a lot!
Oct 23, 2007 03:57 PM|bmains|LINK
Oct 25, 2007 06:14 AM|Beezgetz|LINK
well, I try putting redirection at the end of the button_click event, and it still does not do the job.
I tried as kishorevj suggested, but I got some errors. Is there another example of java?
Even like this is ok, but if I could do uncheck box it would be graeter.
Oct 25, 2007 08:07 AM|kishorevj|LINK
Hi Beezgetz, let me try to understand what you are trying here..
You have a button and on click of that you want to install something and also the check box must be unchecked if the button is clicked, Am i right?
If so, you can do the following
write the following code inside the <head> tags in your HTML
if (document.getElementById("Your Checkbox id shud come here") != null)
document.getElementById("Your Checkbox id shud come here").checked = false;
window.location.href = "http://www.install_site.com/setup.exe";
Now you need to put the checkbox id in this code.
Hope this helps
Oct 25, 2007 11:07 AM|Beezgetz|LINK
Well, to be honest, it did not work. But my strong guess is that I did it wrong.
I will keep on trying to get it in the right format, or give up and leave it like it is... (probably not)
Thanks for your help!
Oct 25, 2007 01:56 PM|bmains|LINK
Do you want to do it server-side or client-side? That is what you need to decide first... If server-side, use the Response.Redirect(), if client, then you can use window.location.href. Or, you could use a link that pops up a new window with your EXE link
(target of blank opens a new window):
<a href = "http://www.install_site.com/setup.exe"' target="_blank">Install</a>
I guess I don't understand the purpose of the checkbox, and the reason for checking it initially, and the reason for unchecking it (to reset it?)