php_developer Posted February 9, 2013 Share Posted February 9, 2013 Is it possible to change the window title in a javascript prompt box..? Link to comment Share on other sites More sharing options...
callumacrae Posted February 9, 2013 Share Posted February 9, 2013 Yeah, you can modify document.title to change the title of the page: document.title = prompt('Modify the title', document.title); However, you shouldn't use the prompt function. It's ugly and invasive, and your users will hate you. You should use an input box on your page instead. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 11, 2013 Share Posted February 11, 2013 If you're asking how to change the text in the title bar of the alert or popup dialog box, you're not able to style or otherwise alter those dialog boxes. There are plenty of Javascript popup window libraries though that will let you show a popup in the style and with the text that you want to show. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now