ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2018 www.aspforums.com. All rights reserved.Zoom and center on a Location in Google Maps using JavaScript<p>i want the map to be zoomed on the city which i select from the dropdownlist. how should i do that?</p>https://www.aspforums.net:443/Threads/175235/Zoom-and-center-on-a-Location-in-Google-Maps-using-JavaScript/https://www.aspforums.net:443/Threads/175235/Zoom-and-center-on-a-Location-in-Google-Maps-using-JavaScript/Wed, 08 Apr 2015 01:41:05 GMTYes No Confirmation Box using JavaScript in ASP.Net<p>&nbsp;</p> <pre class="brush: html">&lt;%@ Page Language=&#34;VB&#34; AutoEventWireup=&#34;false&#34; CodeFile=&#34;Post.aspx.vb&#34; Inherits=&#34;Forms_Post&#34; %&gt; &lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&gt; &lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&gt; &lt;head runat=&#34;server&#34;&gt; &lt;title&gt;POST BOOKS &lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&#34;form1&#34; runat=&#34;server&#34;&gt; &lt;div&gt; &lt;script type = &#34;text/javascript&#34;&gt; function Confirm() { var confirm_value = document.createElement(&#34;INPUT&#34;); confirm_value.type = &#34;hidden&#34;; confirm_value.name = &#34;confirm_value&#34;; if (confirm(&#34;ARE SURE YOU WANT TO POST THESE BOOKS NOW?&#34;)) { confirm_value.value = &#34;Yes&#34;; } else { confirm_value.value = &#34;No&#34;; } document.forms[0].appendChild(confirm_value); } &lt;/script&gt; &lt;script type = &#34;text/javascript&#34;&gt; function askConfirm(msg) { alert(msg) } &lt;/script&gt; &lt;/div&gt; &lt;asp:Button ID=&#34;Button1&#34; runat=&#34;server&#34; OnClick=&#34;OnConfirm&#34; Text=&#34;PostBooks&#34; OnClientClick=&#34;Confirm()&#34; style=&#34;top: 83px; left: 475px; position: absolute; width: 87px; height: 32px&#34; /&gt; &lt;asp:Label ID=&#34;Label1&#34; runat=&#34;server&#34; style=&#34;font-weight: 700; font-family: &#39;MS Gothic&#39;&#34; Text=&#34;N.B Posting this information will update the books you have in stock and it will help you to have up to date library reports.eg Total number of books,Total of lost books etc&#34;&gt;&lt;/asp:Label&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/109010/Yes-No-Confirmation-Box-using-JavaScript-in-ASPNet/https://www.aspforums.net:443/Threads/109010/Yes-No-Confirmation-Box-using-JavaScript-in-ASPNet/Thu, 15 Mar 2018 04:12:41 GMTXSLTProcessor is undefined error in IE11 browser<p><span id="ContentPlaceHolder1_lblDescription" class="v11" style="color: darkblue;"><span style="color: black; font-family: Verdana,Arial,Helvetica,sans-serif;">I face a problem with XML in IE11 Browser. When I generate dynamically XML it show me following error:<br /><br />Reference error:'XSLTProcessor is undefind'</span></span></p> <p>This is my code:</p> <pre class="brush: csharp">if (window.ActiveXObject || window.ActiveXObject !== undefined) return xmlData.transformNode(xsltData); else if(document.implementation &amp;&amp; document.implementation.createDocument) { var xsltProcessor = new XSLTProcessor(); xsltProcessor.importStylesheet(xsltData); return xsltProcessor.transformToFragment(xmlData, document); } } catch(e) { alert(e); } return null;</pre> <p>Please try to solve my problem.</p> <p>Thanks &amp; Regards</p> <p>Lakhbir chandel</p>https://www.aspforums.net:443/Threads/154844/XSLTProcessor-is-undefined-error-in-IE11-browser/https://www.aspforums.net:443/Threads/154844/XSLTProcessor-is-undefined-error-in-IE11-browser/Sat, 15 Feb 2014 00:54:59 GMTValidate TextBox on FocusOut (Blur) without using Buttons using JavaScript or jQuery<p>hi i want validate my registration page ...without onclick or onsubmit function i validate each textbox...i am using external js.how to i call that function?&nbsp;instead of onclick or onsubmit&nbsp;?</p>https://www.aspforums.net:443/Threads/134205/Validate-TextBox-on-FocusOut-Blur-without-using-Buttons-using-JavaScript-or-jQuery/https://www.aspforums.net:443/Threads/134205/Validate-TextBox-on-FocusOut-Blur-without-using-Buttons-using-JavaScript-or-jQuery/Thu, 25 Feb 2016 23:17:04 GMTValidate TextBox inside EditItemTemplate of DetailsView using JavaScript in ASP.Net<p>How can we pass or find an ID when using getElementById in a detailsView and Edit-ItemTemplate</p> <p>&nbsp;</p> <p>I am trying to find the elements</p> <p>ie textboxes and labels. I am trying to do a character count on the textboxes using getElementById..Is there another way</p>https://www.aspforums.net:443/Threads/117986/Validate-TextBox-inside-EditItemTemplate-of-DetailsView-using-JavaScript-in-ASPNet/https://www.aspforums.net:443/Threads/117986/Validate-TextBox-inside-EditItemTemplate-of-DetailsView-using-JavaScript-in-ASPNet/Tue, 07 Apr 2015 06:42:05 GMTWhy the Jquery doesnt work when I move the code into a separate .js file<p>Hello, I have follow this post and the code works well if i put it under the same page in the script section.</p> <p><a href="http://www.aspsnippets.com/Articles/Create-dynamic-textbox-using-JavaScript-in-ASP.Net.aspx">http://www.aspsnippets.com/Articles/Create-dynamic-textbox-using-JavaScript-in-ASP.Net.aspx</a><br /><br /><br />However, if i move to a separate js file call admin-btn.js and then it gives me error when it comes to this part of code:<br />&nbsp;</p> <p><em>&nbsp;function RecreateDynamicTextboxes() {</em><br /><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var values = eval('&lt;%=Values%&gt;');</em><br /><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (values != null) {</em><br /><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var html = "";</em><br /><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (var i = 0; i &lt; values.length; i++) {</em><br /><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; html += "&lt;div&gt;" + GetDynamicTextBox(values[i]) + "&lt;/div&gt;";</em><br /><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</em><br /><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.getElementById("TextBoxContainer").innerHTML = html;</em><br /><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</em><br /><em>&nbsp;&nbsp;&nbsp; }</em></p> <p>The message is about sytax error in runtime (sorry it was in chinese..)</p> <p>Microsoft JScript 執行階段錯誤: 語法錯誤</p> <p>&nbsp;</p> <p>i have put all the code inside here in admin-btn.js<br />$(document).ready(function () {</p> <p>//All codes</p> <p>});</p> <p>&nbsp;</p> <p>Can anyone help me on this? THanks!</p>https://www.aspforums.net:443/Threads/182392/Why-the-Jquery-doesnt-work-when-I-move-the-code-into-a-separate-js-file/https://www.aspforums.net:443/Threads/182392/Why-the-Jquery-doesnt-work-when-I-move-the-code-into-a-separate-js-file/Sun, 11 Mar 2012 11:18:31 GMTWhen Item Clicked in Marquee Page should move to that section<p>hi</p> <p>I am making a webpage on which there is product List if client click on any image of product it should redirect to product.aspx page</p> <p>My question is if he click to 1st image of product it should highlight to that product details.</p> <p>and vice versa</p> <p>.</p>https://www.aspforums.net:443/Threads/108060/When-Item-Clicked-in-Marquee-Page-should-move-to-that-section/https://www.aspforums.net:443/Threads/108060/When-Item-Clicked-in-Marquee-Page-should-move-to-that-section/Sat, 08 Dec 2012 06:35:47 GMTWhen Anchor link goto button of page<p>hi every one</p> <p>i have button in my page i want when user click on button it go to other part of page EX:button is on top of page i want when user click on button it go to bottom of page.</p> <p>how i can do it</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/182248/When-Anchor-link-goto-button-of-page/https://www.aspforums.net:443/Threads/182248/When-Anchor-link-goto-button-of-page/Wed, 28 Mar 2012 22:29:20 GMTWebsite to Learn JavaScript<p>Hi Sir,</p> <p>I don't know thw javascript. suggest some link to learn javascript for reqular expression,required field and etc.</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/181640/Website-to-Learn-JavaScript/https://www.aspforums.net:443/Threads/181640/Website-to-Learn-JavaScript/Sat, 21 Jul 2012 10:33:37 GMTWatermark ASP.Net TextBox Control using JavaScript<p>I want to display default text in gray in ASP.Net TextBox. It should clear on focus.</p>https://www.aspforums.net:443/Threads/398840/Watermark-ASPNet-TextBox-Control-using-JavaScript/https://www.aspforums.net:443/Threads/398840/Watermark-ASPNet-TextBox-Control-using-JavaScript/Sat, 03 Dec 2011 03:18:18 GMTView more or Read more Link using jQuery and JavaScript in ASP.Net<p>view more data link and when click that link view all detail what is javascript or jqueary?</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/104196/View-more-or-Read-more-Link-using-jQuery-and-JavaScript-in-ASPNet/https://www.aspforums.net:443/Threads/104196/View-more-or-Read-more-Link-using-jQuery-and-JavaScript-in-ASPNet/Fri, 27 Apr 2012 04:59:10 GMTValidation to Allow only Alphabets and Space using Regular Expression and JavaScript<p>how to put validation for city or state text box using mvc razor or jquery</p> <p>ex: city text box has to accept only strings and it has to allow space like "andhra pradesh"&nbsp;</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/248414/Validation-to-Allow-only-Alphabets-and-Space-using-Regular-Expression-and-JavaScript/https://www.aspforums.net:443/Threads/248414/Validation-to-Allow-only-Alphabets-and-Space-using-Regular-Expression-and-JavaScript/Thu, 02 May 2013 05:36:08 GMTValidation to accept only numbers in TextBox using JavaScript or jQuery<p>sir i want to apply validation using jquery and java script like-</p> <p>1. only int value allow.</p> <p>2. decimal value should take only two digits after decimal point.</p> <p>3.only char value</p> <p>....................etc.</p> <p>&nbsp;</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/156848/Validation-to-accept-only-numbers-in-TextBox-using-JavaScript-or-jQuery/https://www.aspforums.net:443/Threads/156848/Validation-to-accept-only-numbers-in-TextBox-using-JavaScript-or-jQuery/Mon, 07 Jul 2014 03:46:24 GMTValidate Multiple Select DropDownList using JavaScript on single Button Click<p>&nbsp;there more than 1 dropdown controls&nbsp;used</p>https://www.aspforums.net:443/Threads/795700/Validate-Multiple-Select-DropDownList-using-JavaScript-on-single-Button-Click/https://www.aspforums.net:443/Threads/795700/Validate-Multiple-Select-DropDownList-using-JavaScript-on-single-Button-Click/Tue, 25 Dec 2012 22:57:21 GMTValidate Time format with AM PM using JavaScript and Regular Expressions<p>I am trying to add a validation to dynamically added textboxes. The textbox should allow input of type (e.g)11:30 AM/PM No strings other than that should be entered. How can I achieve that? Below is the code for length validation of the input field.</p> <p>&nbsp;</p> <pre class="brush: js">function ValidateAddTime(txt, keyCode) { var val = txt.value; var lblmesg = document.getElementById(&#34;&lt;%=lblMesg.ClientID%&gt;&#34;); if (val.length &lt; 8 || val.length &gt; 8) { lblmesg.style.color = &#34;red&#34;; lblmesg.innerHTML = &#34;Required Format: hh:mm AM|PM&#34;; } else { lblmesg.innerHTML = &#34;&#34;; } //Add text box function function GetDynamicTextBox(value) { return &#39;&lt;input name = &#34;DynamicTextBox&#34; type=&#34;text&#34; value = &#34;&#39; + value + &#39;&#34; onkeyup = &#34;ValidateAddTime(this, event.keycode)&#34; /&gt;&#39; + &#39;&lt;input type=&#34;button&#34; value=&#34;Remove&#34; onclick = &#34;RemoveTextBox(this)&#34; /&gt;&#39; }</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/139509/Validate-Time-format-with-AM-PM-using-JavaScript-and-Regular-Expressions/https://www.aspforums.net:443/Threads/139509/Validate-Time-format-with-AM-PM-using-JavaScript-and-Regular-Expressions/Wed, 22 Jan 2014 22:17:52 GMTValidate multiple ASP.Net TextBoxes using JavaScript and List the empty TextBoxes in alert box<p>Would like to know the concept behind the working of the URL below:<br /> &nbsp;<br /> www.tradeshows.tradeindia.com/musician-expo2013/register.html<br /> &nbsp;<br /> If any user clicks on the submit button without filling any information then a javascript pop up appears and all the important fields that has to displayed is shown one by one, I am aware about alert function of javascript but not aware to validate multiple textbox's using javascript.How to achieve this?</p> <p>In the above mentioned URL directly click on the the submit button, you will understand what exactly I want.</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/847354/Validate-multiple-ASPNet-TextBoxes-using-JavaScript-and-List-the-empty-TextBoxes-in-alert-box/https://www.aspforums.net:443/Threads/847354/Validate-multiple-ASPNet-TextBoxes-using-JavaScript-and-List-the-empty-TextBoxes-in-alert-box/Mon, 12 Nov 2012 10:14:56 GMTValidate File Size and Extension of File to be uploaded using jQuery or JavaScript<p>w to find the file size and file extension of th uploded file in javascript or jquery</p>https://www.aspforums.net:443/Threads/205666/Validate-File-Size-and-Extension-of-File-to-be-uploaded-using-jQuery-or-JavaScript/https://www.aspforums.net:443/Threads/205666/Validate-File-Size-and-Extension-of-File-to-be-uploaded-using-jQuery-or-JavaScript/Tue, 10 Jun 2014 02:18:02 GMTValidate DropDownList and display error message in JavaScript Alert Box<p><span style="color: #000080;">I need help figuring out how to make alert () window not&nbsp; prompt when required field is filled out. EX: When ddlFinalAction selectedIndex == 1 and TextBox5 value length &gt; 0&nbsp; then the alert () won't pop-up and user can submit data on btn_click &nbsp; Thank you so much in advance!</span></p> <pre class="brush: js">function Validate() { if (document.getElementById(&#34;&lt;%=ddlFinalAction.ClientID%&gt;&#34;).selectedIndex == &#34;&#34;) { alert(&#39;Must Enter Final Action Taken&#39;); return false; } <span style=&#34;background-color: #ffff99;&#34;>if (document.getElementById(&#34;&lt;%=ddlFinalAction.ClientID%&gt;&#34;).selectedIndex == &#34;1&#34; || document.getElementByID&#34;&lt;%TextBox5.ClientID%&gt;&#34;. value &gt; 0) { alert(&#39;Must Enter Comment&#39;); return false; }</span> return true; }//end validate() </pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/146738/Validate-DropDownList-and-display-error-message-in-JavaScript-Alert-Box/https://www.aspforums.net:443/Threads/146738/Validate-DropDownList-and-display-error-message-in-JavaScript-Alert-Box/Mon, 30 Mar 2015 05:41:31 GMTValidate Cascading DropDownList (One dependent on another) using JavaScript<p>Needing help to validate multiple dropdown lists. I am needing to figure out how I can create a C# code that allows this function.</p> <p>Ex:</p> <p>DropDownList1 select 'option1'&nbsp; then DropDownList2, DropDownList4, DropDownList7 will be required to be filled out.</p> <p>Using Button click will make a pop up alert window to tell users that they need to fill out a certain dropdownlist if that dropdown list is blank.</p> <p>&nbsp;</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/919006/Validate-Cascading-DropDownList-One-dependent-on-another-using-JavaScript/https://www.aspforums.net:443/Threads/919006/Validate-Cascading-DropDownList-One-dependent-on-another-using-JavaScript/Sat, 28 Mar 2015 00:38:22 GMTValidate three dropdown lists control conditionally using JavaScript and ASP.Net Custom Validator<div style="background-color: #dddddd; border-left: 5px solid #999999; margin: 15px 15px 15px 30px; width: 95%;"> <div style="border: 10px solid #dddddd;"> <p>Hi I want to validate three dropdown lists the value of dropdown list fetched from sql database . The&nbsp; folowing code i am using , it does not give any error&nbsp; but not working ,please help</p> </div> </div> <pre class="brush: csharp">aspx code: &lt;head&gt; <br />&lt;script type=&#34;text/javascript&#34; &gt;<br />&nbsp;function CustomValidateBatch(sender, args) {<br />var yr1 = document.getElementById(&#34;ddlBYear1&#34;); <br />var yr2 = document.getElementById(&#34;ddlBYear2&#34;); <br />var brnch = document.getElementById(&#34;ddlbranch&#34;); <br />branch1=brnch[e.selectedIndex].value; if ( branch1 = &#34;MCA&#34;) { <br />( (document.getElementById(&#39;ddlBYear2&#39;).selectedIndex) - (document.getElementById(&#39;ddlBYear1&#39;).selectedIndex) == 3); {<br />} args.IsValid = true; } else args.IsValid = false; <br />} &lt;/script&gt; <br />&lt;/head&gt; <br />&lt;body&gt; <br />&lt;form id=&#34;form1&#34; runat=&#34;server&#34;&gt; <br />&lt;div&gt; &lt;tr&gt; &lt;td&gt; Branch : &lt;/td&gt; <br />&lt;td&gt; &lt;asp:DropDownList ID=&#34;ddlbranch&#34; runat=&#34;server&#34; OnSelectedIndexChanged=&#34;ddlbranch_SelectedIndexChanged&#34; AutoPostBack=&#34;true&#34;&gt; <br />&lt;/asp:DropDownList&gt; &lt;/td&gt; &lt;td&gt; <br />&lt;asp:CustomValidator ID=&#34;CustomValidator5&#34; runat=&#34;server&#34; ErrorMessage=&#34;please select branch&#34; ClientValidationFunction=&#34;ValidateBranch&#34; ValidationGroup=&#34;one&#34;&gt;<br />&lt;/asp:CustomValidator&gt; &lt;/td&gt; &lt;/tr&gt; <br />&lt;tr&gt; &lt;td&gt; Batch : &lt;/td&gt; <br />&lt;td&gt; &lt;asp:DropDownList ID=&#34;ddlBYear1&#34; runat=&#34;server&#34; AutoPostBack=&#34;true&#34; OnSelectedIndexChanged=&#34;ddlBYear1_SelectedIndexChanged&#34;&gt; &lt;/asp:DropDownList&gt; &lt;/td&gt; <br />&lt;td&gt; &lt;asp:DropDownList ID=&#34;ddlBYear2&#34; runat=&#34;server&#34; AutoPostBack=&#34;true&#34; OnSelectedIndexChanged=&#34;ddlBYear2_SelectedIndexChanged&#34;&gt; &lt;/asp:DropDownList&gt;<br />&nbsp;&lt;td&gt; &lt;/td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;td&gt;<br />&nbsp;&lt;asp:CustomValidator ID=&#34;CustomValidator6&#34; runat=&#34;server&#34; ErrorMessage=&#34;please select start year !&#34; ClientValidationFunction=&#34;ValidateBYear1&#34; ValidationGroup=&#34;one&#34;&gt;&lt;/asp:CustomValidator&gt; &lt;/td&gt;<br />&nbsp;&lt;td&gt; &lt;asp:CustomValidator ID=&#34;CustomValidator7&#34; runat=&#34;server&#34; ErrorMessage=&#34;please select end year&#34; ClientValidationFunction=&#34;ValidateBYear2&#34; ValidationGroup=&#34;one&#34;&gt;&lt;/asp:CustomValidator&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;<br />&lt;td&gt;&lt;/td&gt; &lt;td&gt; &lt;asp:CustomValidator ID=&#34;CustomValidator8&#34; runat=&#34;server&#34; ErrorMessage=&#34;Start year must be less from End year&#34; ControlToValidate=&#34;ddlBYear1&#34; ValidationGroup=&#34;one&#34; ClientValidationFunction=&#34;CustomValidate&#34;&gt;<br />&lt;/asp:CustomValidator&gt; &lt;/td&gt;&lt;td&gt; <br />&lt;%-- &lt;asp:CustomValidator ID=&#34;CustomValidator9&#34; runat=&#34;server&#34; ClientValidationFunction=&#34;CustomValidateBatch&#34; ControlToValidate=&#34;ddlBYear2&#34; ValidateEmptyText=&#34;true&#34; ErrorMessage=&#34;Batch Not valid&#34; &gt;&lt;/asp:CustomValidator&gt;--%&gt; <br />&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;asp:Button ID=&#34;but_Submit&#34; runat=&#34;server&#34; OnClick=&#34;but_Submit_Click&#34; Text=&#34;Continue&#34; <br />ValidationGroup=&#34;one&#34; /&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt;</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/882302/Validate-three-dropdown-lists-control-conditionally-using-JavaScript-and-ASPNet-Custom-Validator/https://www.aspforums.net:443/Threads/882302/Validate-three-dropdown-lists-control-conditionally-using-JavaScript-and-ASPNet-Custom-Validator/Wed, 16 May 2012 23:11:36 GMT