ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Show JavaScript Confirmation Message in Red ColorHi @amar,<br />Please try the following<br /><br /><a href = 'link(Threads/103165/Show-JavaScript-Alert-Message-when-using-AJAX-UpdatePanel-in-ASPNet/)'>Show JavaScript Alert Message when using AJAX UpdatePanel in ASP.Net</a><br /><br />It might help you.<br /><br />Cheers Andrea.https://www.aspforums.net:443/Threads/630946/Show-JavaScript-Confirmation-Message-in-Red-Color/https://www.aspforums.net:443/Threads/630946/Show-JavaScript-Confirmation-Message-in-Red-Color/Wed, 19 Dec 2018 01:00:47 GMTShow JavaScript Confirmation Message in Red Color<div class="post-text"> <pre class="default prettyprint prettyprinted"><code><span class="tag">You may try this code to solve your issue:<br /><br />&lt;html&gt;</span> <span class="tag">&lt;head&gt;</span> <span class="tag">&lt;meta</span> <span class="atn">charset</span><span class="pun">=</span><span class="atv">"utf-8"</span> <span class="tag">/&gt;</span> <span class="tag">&lt;title&gt;</span><span class="pln">JavaScript String fontcolor() Method</span><span class="tag">&lt;/title&gt;</span> <span class="tag">&lt;link</span> <span class="atn">rel</span><span class="pun">=</span><span class="atv">"stylesheet"</span> <span class="atn">href</span><span class="pun">=</span><span class="atv">"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery- ui.css"</span> <span class="tag">/&gt;</span> <span class="tag">&lt;script</span> <span class="atn">src</span><span class="pun">=</span><span class="atv">"http://code.jquery.com/jquery-1.9.1.js"</span><span class="tag">&gt;&lt;/script&gt;</span> <span class="tag">&lt;script</span> <span class="atn">src</span><span class="pun">=</span><span class="atv">"http://code.jquery.com/ui/1.10.3/jquery-ui.js"</span><span class="tag">&gt;&lt;/script&gt;</span> <span class="tag">&lt;link</span> <span class="atn">rel</span><span class="pun">=</span><span class="atv">"stylesheet"</span> <span class="atn">href</span><span class="pun">=</span><span class="atv">"/resources/demos/style.css"</span> <span class="tag">/&gt;</span> <span class="tag">&lt;script&gt;</span><span class="pln"> $</span><span class="pun">(</span><span class="kwd">function</span><span class="pun">()</span> <span class="pun">{</span><span class="pln"> $</span><span class="pun">(</span> <span class="str">"#dialog-message"</span> <span class="pun">).</span><span class="pln">dialog</span><span class="pun">({</span><span class="pln"> modal</span><span class="pun">:</span> <span class="kwd">true</span><span class="pun">,</span><span class="pln"> buttons</span><span class="pun">:</span> <span class="pun">{</span> <span class="typ">Ok</span><span class="pun">:</span> <span class="kwd">function</span><span class="pun">()</span> <span class="pun">{</span><span class="pln"> $</span><span class="pun">(</span> <span class="kwd">this</span> <span class="pun">).</span><span class="pln">dialog</span><span class="pun">(</span> <span class="str">"close"</span> <span class="pun">);</span> <span class="pun">}</span> <span class="pun">}});</span> <span class="pun">});</span> <span class="tag">&lt;/script&gt;</span> <span class="tag">&lt;/head&gt;</span> <span class="tag">&lt;body&gt;</span> <span class="tag">&lt;div</span> <span class="atn">id</span><span class="pun">=</span><span class="atv">"dialog-message"</span> <span class="atn">title</span><span class="pun">=</span><span class="atv">"My Dialog Alternative"</span><span class="tag">&gt;</span> <span class="tag">&lt;p</span> <span class="atn">style</span><span class="pun">=</span><span class="atv">'</span><span class="kwd">color</span><span class="pun">:</span><span class="pln">red</span><span class="atv">'</span><span class="tag">&gt;</span><span class="pln"> Hello world </span><span class="tag">&lt;/p&gt;</span> <span class="tag">&lt;/div&gt;</span> <span class="tag">&lt;/body&gt;</span> <span class="tag">&lt;/html&gt;</span></code></pre> </div>https://www.aspforums.net:443/Threads/630946/Show-JavaScript-Confirmation-Message-in-Red-Color/https://www.aspforums.net:443/Threads/630946/Show-JavaScript-Confirmation-Message-in-Red-Color/Wed, 19 Dec 2018 01:49:15 GMTShow JavaScript Confirmation Message in Red Color<p>Hey <a class="username" rel="amar"> amar</a>,</p> <p>You can't do anything with the alert/confirm boxes. If you need to style them then you need to use&nbsp;jQuery&nbsp;Modal dialog.</p> <p>Please refer below sample.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <div class="demo_block"> <pre class="brush: html">&lt;script type=&#34;text/javascript&#34; src=&#34;https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;script src=&#34;https://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js&#34; type=&#34;text/javascript&#34;&gt;&lt;/script&gt; &lt;link href=&#34;https://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css&#34; rel=&#34;stylesheet&#34; type=&#34;text/css&#34; /&gt; &lt;script type=&#34;text/javascript&#34;&gt; $(function () { $(&#34;#dialog&#34;).dialog({ buttons: { No: function () { $(&#34;[id*=Button1]&#34;).click(); }, Yes: function () { $(this).dialog(&#39;close&#39;); } } }); }); function Click() { alert(&#34;button is clicked.&#34;); } &lt;/script&gt; &lt;div id=&#34;dialog&#34; style=&#34;display: none; color: red&#34; title=&#34;Confirmation Message&#34;&gt; Did You want to close. &lt;/div&gt; &lt;input type=&#34;button&#34; id=&#34;Button1&#34; value=&#34;Button&#34; style=&#34;display: none&#34; onclick=&#34;Click();&#34; /&gt;</pre> </div> <p><a class="demo button orange btn btn-red">Demo</a></p>https://www.aspforums.net:443/Threads/630946/Show-JavaScript-Confirmation-Message-in-Red-Color/https://www.aspforums.net:443/Threads/630946/Show-JavaScript-Confirmation-Message-in-Red-Color/Wed, 19 Dec 2018 02:41:20 GMT