Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXIT BUTTON

Status
Not open for further replies.

Hayton

Technical User
Oct 17, 2001
257
NZ
Hello Everyone,

I know nothing about HTML etc.

My company has asked me to burn all our customer reports (PDF Format) onto a CD, instead of printing hundreds of color reports each month and posting them to the respective customers. This is costly and time consuming.

I have created a Frontage app which auto loads when the cd is loaded and has buttons hyperlinking to the various reports.

The situation is this, I would like to include an EXIT button on the app so that when it is clicked it would close down the app and take them back to there desktop.

Any ideas would be appreciated.

Hayton McGregor

 
How about a javascript "close window" button? I'm not a js expert, but these scripts should close the current browser window...although a YES/NO prompt may pop up. Just plunk them into your HTML code where you want them to appear.
[blue]
<!-- Text Link -->
<p><a href=&quot;javascript:void(window.close())&quot;>Close Window</a></p>

<!-- Graphic Button -->
<p><a href=&quot;javascript:void(window.close())&quot;><img border=&quot;0&quot; src=&quot;Insert_your_graphic_here.gif&quot; width=&quot;93&quot; height=&quot;23&quot;></a></p>
[/blue]


algraff ::)
 
Hello Algraff

Thankyou for your reply.

I have this code which references a hover button that I would like to use for the exit event
<applet code=&quot;fphover.class&quot; codebase=&quot;./&quot; width=&quot;120&quot; height=&quot;24&quot;>
<param name=&quot;hovercolor&quot; value=&quot;#0000FF&quot;>
<param name=&quot;color&quot; value=&quot;#FFFF00&quot;>
<param name=&quot;effect&quot; value=&quot;reverseGlow&quot;>
<param name=&quot;font&quot; value=&quot;Arial Black&quot;>
<param name=&quot;fontstyle&quot; value=&quot;boldItalic&quot;>
<param name=&quot;fontsize&quot; value=&quot;14&quot;>
<param name=&quot;text&quot; value=&quot;EXIT&quot;>
<param name=&quot;textcolor&quot; value=&quot;#000000&quot;>


</applet>

I am not to sure where to insert you code.


Hayton McGregor

 
Your hover button code may include a url reference
ex:
<param name=&quot;url&quot; valuetype=&quot;ref&quot; value=&quot;../home.htm&quot;>

I'm not sure you can stick the js here.

You may be better to create your own rollover buttons and use the js as indicated below:
<a href=&quot;javascript:void(window.close())&quot; onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('close','','../images/button1b.gif',1)&quot;>
<img src=&quot;images/button1a.gif&quot; alt=&quot;Close&quot; name=&quot;close&quot; border=&quot;0&quot; width=&quot;100&quot; height=&quot;18&quot;></a>

The js for the rollover can be place before the </head> tag and would be:
<script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;>
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf(&quot;#&quot;)!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf(&quot;?&quot;))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>


Good luck!


 
Hello Algraf, thankyou for the code posted above. I will use it a little later down the line.

I have created an EXIT button in Photoshop and used it in the app. On clicking the EXIT button a YES/NO popup window initiates. On choosing YES to close the window, the window does not close, on choosing NO the browser screen goes blank.

The code behind the EXIT button is:
<p align=&quot;center&quot; style=&quot;line-height: 100%; margin-top: 0; margin-bottom: -2&quot;><a href=&quot;javascript:void(window.close())&quot;><img border=&quot;0&quot; src=&quot;Graphics/ExitButton.jpg&quot; width=&quot;57&quot; height=&quot;28&quot;></a></p>

Something can't be wright!!

Hayton McGregor

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top