Close Window button

Close Window button

av Simon Reynolds -
Antall svar: 1

When I create a new resource using 'Compose a Web Page', I would like the user to have the option to press a button to close the page. When I use the 'Open in new window' option,  I would like to add the java script:

<input type=button value="Close Window" onClick="javascript:self.close();">

I assume it goes into one of the resource/type/html folder files but not sure which one or where. My skills don't extent to this yet smiler 

Can anyone help me? I think this would be a useful item to have on the page.

TIA

Simon

Gjennomsnittlig vurdering: -
Som svar til Simon Reynolds

Re: Close Window button

av Dave Cuttriss -

Hi Simon: just drop the code (<input type=button value="Close Window" XonClick="javascript:self.close();">) into the HTML code of your new web page resource. (Use the <> button in the HTML editor menu bar to see the code)

Hope I'm not teaching granny to suck eggs.......

Cheers

Dave

(p.s. just realised how old this post was....doubt it's relevant anymore)