• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 469
  • Last Modified:

Changing button appearance

With a standard Javascript 'Close Window' form code, how  can I change the appearance of the button it produces
1 Solution
Sorry, this answer is relatively unclear. I assume that what you mean is a normal button. Let's face it:

To close a window from inside html go like that:

 <input type=button value="Close Window" onclick="self.close()">

If you want the button to look different, you should make use of CSS, so for example - go like that:

<input type=button value="Close Window" onclick="self.close()" style="border: 1px solid #cdcdcd; background: #eaeaea; color: #345434; font-family: Verdana, Arial; font-size: 11px;">

This gives your button some nice style. However, about your script thing, you should note that if you call it from a parent window (meaning that the window you have the button inside is the first one opened and was not popped up by some script), at least internet explorer will ASK THE USER if it may close the window.

Sorry if all of that does not match your question, does not represent an answer for it, but i really dont get your question.

Cheers & kind regards.
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now