I have the following code :
var answer = prompt('ENTER YOUR TEXT);
When javascript executes it puts up the prompt box but gives it a title on top of the box of the html file that this code is part of.
Any way to get rid of that?
I have the following code :
var answer = prompt('ENTER YOUR TEXT);
When javascript executes it puts up the prompt box but gives it a title on top of the box of the html file that this code is part of.
Any way to get rid of that?
No, this isn't possible. Try something like apprise instead
Apprise('Name:', {input:true});
http://labs.bigroomstudios.com/libraries/Apprise-v2
Edit below
This solves the issue in a neat way!
window.prompt = function(text, callback) {
var options = {
buttons: {
confirm: {
text: 'Send',
action: function(e) {
callback(e.input);
Apprise('close');
}
},
},
input: true
};
Apprise(text, options);
};
prompt("Say something", function(returnValue) {
console.log(returnValue);
});