Changing the "<URL name> says:" header to confirm dialog box [duplicate] - javascript

This question already has answers here:
How to edit a JavaScript alert box title?
(10 answers)
Closed 6 years ago.
When using the confirm dialog box in Javascript, the first line is "<URL name> says:" then it is followed by the string specified in the js call.
Is there a way to change that first line?

The confirm box, just like the alert box, is a system object, and not subject to CSS. To do this style of thing you would need to create an HTML element and mimic the confirm() functionality.

What you want is not possible, the url in the confirm window is not customizable. As a solution you could create your own modal box and style it as desired.

Related

In Javascript How can I customize alert window? [duplicate]

This question already has answers here:
Custom alert using Javascript
(6 answers)
Closed 7 years ago.
In a static html page i want to do following actions:
as the url is entered first I want to display the terms and conditions using window.alert("TERMS AND CONDITIONS").
In the dialogue box I want two buttons "agree" and "dont agree". If agree is pressed I want to use window.location.assign("next page url") .And if dis agree is pressed I want to use window.close("","_self")
I'm a total beginner and have minimum knowledge of Javascript.
Thank you in advance.
You can not modifiy the default alert dialog.
But instead, you can use one of the many Dialogs made for jquery and other libraries.
http://www.sitepoint.com/14-jquery-modal-dialog-boxes/
The alert box is a system object, and not subject to CSS. The jQuery UI Modal box does a lot of the work for you Link.
if you want a basic browser graphic u can use
window.confirm("TERM AND CONDITIONS");
that return true or false based on action. For more advaced usage check jquery dialogs boxes (docs https://jqueryui.com/dialog/ ) or bootstrap (docs http://nakupanda.github.io/bootstrap3-dialog/)

In-place text editing component for Bootstrap 3 [duplicate]

This question already has answers here:
How do I make a div element editable (like a textarea when I click it)?
(8 answers)
Closed 8 years ago.
Is there any good in-place editing component that makes use of the new Twitter Bootstrap 3 style guideline?
I'm looking for any jQuery [..] plugin that does something like:
There is a line (or block) of text
when hovered by the mouse, a small symbol appears, saying 'you can edit me!'
on click, the text field (or block) vanishes, making place for an appropriately sized text input or textfield
saves on enter (or ctrl+enter)
As said, this component should conform the Bootstrap 3 style, preferably making use of bootstrap's less support.
x-editable is the dam good solution for inplace editing. Yeah it does support bootstrap3.
http://vitalets.github.io/x-editable/demo-bs3.html?c=popup
For "you can edit me!" you can write custom callback like following:
$(".editable").on "hover", ->
alert "you can edit me!"

How to apply watermark in file upload control [duplicate]

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
Putting placeholder attribute on file type input field
i want to show something like this..
I have one file-upload control and need to show some value in default file-upload control text box. how it is possible.
Can you try using
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/TextBoxWatermark/TextBoxWatermark.aspx
because it works for sure with textbox but i have not tried with file upload control.

Changing title and options in javascript confirm dialog [duplicate]

This question already has answers here:
Changing the default title of confirm() in JavaScript?
(8 answers)
Closed 9 years ago.
I want to add my project title to a javascript confirm dialog, and want to change "Ok" and "Cancel" to "Yes" and "No". How can I do this?
We can't override the functionality of the JS . But you can show your project name on top by using the trick "nextline(/n)" as i did in my project :)
This is just an trail solution for your satisfaction . :)
confirm("ProjectName \n\n\n\n\ some question goes here ");
If you're talking about confirm function in javascript, well, you can't change its properties. I suggest look into using a custom confirm dialog box e.g. jQuery UI's modal confirmation. You have many options out there and by using custom ones you have a lot of things you can do, you can even change colors of the box if you want. Just an idea :)

How can I change the title message of an alert box in JavaScript? [duplicate]

This question already has answers here:
How to edit a JavaScript alert box title?
(10 answers)
Closed 3 years ago.
How can I change the title message of an alert box in JavaScript?
This can not be done using javascript. But this can be done using jQuery. May be this url can help u.
http://labs.abeautifulsite.net/projects/js/jquery/alerts/demo/
This cannot be done. The title is browser dependent and you have no control over it. On the other hand you could implement your own alert box using divs and customize it as you like. Here's an example using the jquery dialog plugin.
I am pretty sure this is outside of your control and can not be changed
This earlier question has some good suggestions in the answers : how-to-edit-a-javascript-alert-box-title

Categories