Two Laptop Bag*
The moose likes Struts and the fly likes struts generated javascript (title bar contents changing) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts generated javascript (title bar contents changing)" Watch "struts generated javascript (title bar contents changing)" New topic
Author

struts generated javascript (title bar contents changing)

hassan mahmood
Greenhorn

Joined: Jan 15, 2003
Posts: 17
Hi all,

i have used html:javascript on jsp pages to validate data on client side. i just wanna change the title bar content on javascript alert (message box). since it is generated by struts , is there a way to change the title of alert??
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
No, there isn't a way to change the title bar on an alert. An alert box is controlled by the browser, and you really can't change it.

Microsoft IE has a showModalDialog JavaScript method that will allow you to pop up a Modal window similar to an alert() or confirm(), but format it any way you want with HTML. I don't know if this feature is available for other browsers, though. If cross-browser compatibility is important to you, you should probably not use it.


Merrill
Consultant, Sima Solutions
hassan mahmood
Greenhorn

Joined: Jan 15, 2003
Posts: 17
Thanx, for the reply, ya i actually our testing team pointed out that title bar message on alert should be changed as it doesnt look good on firefox, it appears as http://localhost:8080/... blah blah on title bar. but thats true that browser basically handles alert and since struts automatically generates javascript so v have no control over it.
 
GeeCON Prague 2014
 
subject: struts generated javascript (title bar contents changing)