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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

manipulating prompt() and alert boxes ?

Status
Not open for further replies.

Curisco

Programmer
Feb 6, 2002
90
0
0
SE


hi folks.
is there a way to change the bgcolor of an alert, prompt, pop up window something like:
alert bgcolor=ffffff('note the background colour of this box')

of course it's not essentiall but it would be nice

Ramsey

 
ok, well the alert box is called as part of a form validation script from Dreamweaver.
so therefore it is the content of the dialog box which is of importance. Opening a new window is not an option if i am to 'alert' the viewer to the error message onClick or onBlur.

aha.. the real question is how to make an alert box. am i talking visual basic or something

I don't know i'm lost... [:-(
 
You can open the pop-up window with your alert message:

onClick="validation()"
. . .

function validation() {

//validation process
//
popup = window.open('','','width=200,height=150,left=300,top=100');
popup.document.open();
popup.document.write('<p>Alert message</p>');
popup.document.write('<input type=button value=&quot; OK &quot; onclick=&quot;window.close()&quot;>');
popup.document.close();
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top