+ 11
Simply put, you can't do it.
This is probably how it was done in SoloLearn code playground (to display the title "Code Playground")
https://stackoverflow.com/questions/38053779/android-webview-how-to-change-javascript-alert-title-text-in-android-webview
It is done as part of implementing the webview that runs the web codes in SL and cannot be changed from the client code (the JS in the playground)
and on a sidenote, alert/confirm/prompt blocks the single thread javascript runs on so it basically stops your code until the user closes the box.
it also looks bad.
there are plenty of modals/popups libraries out there that you can use.
or even better, practice on making one yourself ;)
+ 3
😎🤘
+ 1
use pop-ups in your projects rarely and responsibly, when absolutely necessary, as it irritates users
+ 1
برو به درسنامه یدسولو لرن
0
You might be looking for the prompt and confirm functions: https://www.w3schools.com/jsref/met_win_prompt.asp
https://www.w3schools.com/jsref/met_win_confirm.asp
0
Robert it's probably not possible to remove the "The page at ... says:" heading because this is automatically displayed by most browsers. The browser Sololearn used maybe didn't show this message or they just edited the screenshot (which I guess is what happened).
- 1
When you type @ symbol wait a little. Then you can see window whith our names 😉
- 1
You can show us your code? Put it on jsbin.com, codepen.io or jsfiddle.net and get from there link
- 1
sorry, but in your code POPs up a window with text and at the top, where it is impossible to change anything written "confirm the action" (I have in Russian)
- 1
I see no other inscription. maybe you have another code and it uses a modified or some other modal window?
- 1
you cant change title in alert boxes as a security feature in browsers...but you can make custom alerts using divs tags or dialog tags and js to open and close windows...but dialog tags are not implemented in all browsers last time i checked
- 1
alert() is a warning for users....confirm() confirm choice....ok or cancel....prompt gets info to store in variable for later....you can use if else statements to control if ok or cancel is clicked...you if have text or not for prompt you can use if else and loops for those too..just for fun to get used to the programming process