Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide/Change javascript prompt title

I am using the following code to show a prompt to get the user's name:

var name = prompt('Enter your name', 'name');

The problem is that the prompt is showing the title as index.html which is the name of the html file that invokes the prompt. Either I need to change the title or I need to remove the title entirely since showing the file name as header is totally weird. What can I do about it?

EDIT

My index.html has a title tag that looks like following:

<title>My Page</title>
like image 459
Harikrishnan Avatar asked Oct 26 '25 07:10

Harikrishnan


1 Answers

For security reasons this is impossible. You can use some custom prompt other than the basic one like $.dialog of jQueryUI

like image 92
webNeat Avatar answered Oct 28 '25 19:10

webNeat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!