Unnamed: 0
int64
302
6.03M
Id
int64
303
6.03M
Title
stringlengths
12
149
input
stringlengths
25
3.08k
output
stringclasses
181 values
Tag_Number
stringclasses
181 values
4,735,097
4,735,098
How to format the time in javascript/jquery
<p>i want to know how to convert the time into "08:14PM 05 Jan 2013" format using javascript/jquery. Thanks in advance.</p>
javascript jquery
[3, 5]
3,875,350
3,875,351
Ideas on how to make multiple selectable resizeable boxes in jQuery?
<p>I am trying to develop a web application that can take an image and draw multiple, resizeable boxes on the image. I have been looking into a lot of cropping plugins, but i cant seem to find what I am looking for. I just need to be able to draw multiple boxes on an image and return coordinates. I am looking for a ...
javascript jquery
[3, 5]
2,840,440
2,840,441
reset the form on back button
<p>I have searched on the web but couldn't find any solution. When I click on the 'Submit' button on 'samplepage.php', I redirect the page to the 'newpage.php' page. I would like to reset 'samplepage.php' form values when user clicks on back button of the browser. Right now it keeps all the textbox values, radio button...
php javascript jquery
[2, 3, 5]
3,539,946
3,539,947
How to access object name for their value using jquery
<p>I have on object and I want to print their name and property name. How can I do that. I can access their properties value. Like I want print object name like 'first' and 'second' and their properties like 'value' and 'text' dont want to print value</p> <pre><code>&lt;head&gt; &lt;meta http-equiv="Content-Type" ...
javascript jquery
[3, 5]
3,671,003
3,671,004
How to handle touch or press down events in Android?
<p>Alright so i have 4 image views..</p> <p>How can i control what happens when they are pressed down and up</p> <p>So say like:</p> <p>one of the images is press down a textview gets changed to 1 but when they let go of that one the text will change back to 0?</p>
java android
[1, 4]
3,857,251
3,857,252
Update existing notification
<p>Now that the <a href="http://developer.android.com/reference/android/app/Notification.html#describeContents%28%29" rel="nofollow"><code>setLatestEventInfo</code></a> method is deprecated in the latest Android SDK, is there a way that we're supposed to update the content of an existing notification? I am skeptical th...
java android
[1, 4]
4,456,540
4,456,541
jquery change color using css not working
<p>Forgive me if this is a bad question. What is wrong with my code ?</p> <pre><code>$(document).ready(function(){ $('#user').css(color:red); }); </code></pre> <p>I am very new to jquery. Thank you in advance!</p>
javascript jquery
[3, 5]
2,161,133
2,161,134
jQuery / Javascript Element height alway returns 0
<p>I'm trying to split some paragraphs into their respective line at each line break. My code seems to break when trying to recover the height of the element, it always returns '0'.</p> <p>My function:</p> <pre><code>function getLines(element){ words = element.text().split(''); width = element.width(); li...
javascript jquery
[3, 5]
5,594,349
5,594,350
jquery not working on server controls in content page
<p>i am having a TextBox txt on a content page. when i try this</p> <pre><code>$(function(){ $("#txt").focus(function(){alert("abcd"); }); }); </code></pre> <p>it doesn't work. It's working if i am using it on simple .aspx page with no master page.</p>
jquery asp.net
[5, 9]
77,619
77,620
JQuery List Events
<p>At the moment I'm building a list using the following code:</p> <pre><code>$('&lt;li id="li' + jJob.Id + '"&gt;&lt;div style="width: 98%; background-color: #9E7BFF; colour: #000000"&gt;&lt;a href="javascript:void(0);"&gt;' + jJob.Type + ' ' + jJob.AddressClean + ' (' + jJob.Status + ')' + '&lt;/a&gt;&lt;/div&gt;&lt...
javascript jquery
[3, 5]
3,670,559
3,670,560
How do I fake AJAX start / end events in JQuery?
<p>I'm listening to ajaxStart() and ajaxStop() to show/hide a spinner, and I'm doing some mock AJAX stuff in JS while servers are being written. It just calls a function to generate mock data with a setTimeout(). For now I'm just manually calling hide() and show() on the spinner, but I'd really like to just tell JQuery...
javascript jquery
[3, 5]
3,874,456
3,874,457
Is there an easy way to embed a Javascript interpreter in a C# application?
<blockquote> <p><strong>Possible Duplicate:</strong><br /> <a href="http://stackoverflow.com/questions/172753/embedding-javascript-engine-into-net-c">Embedding JavaScript engine into .NET (C#)</a> </p> </blockquote> <p>Is there an easy way to embed Javascript in a C# application? </p> <p>I want to make my C# ap...
c# javascript
[0, 3]
3,385,416
3,385,417
Mobile (Smart phone application) architecture
<p>I am into iPhone development, and would like to know more about Smart phone application architectures in general. Is there are any reusuable architectures which would be applicable for both iPhone and Driod platforms?</p> <p>Would appreciate if you can point me to any ebooks or URL.</p> <p>Thanks for your time,</p...
iphone android
[8, 4]
2,893,854
2,893,855
How to preload a div combobox in jquery
<p>I have code as follows:</p> <pre><code>$("#item_select").change(function() { var params = $("#item_select option:selected").val(); $.post('/account/ar_form.php', {idata: params}, function(data){ $("#message_display" ).html(data); }); }); </code></pre> <p>This is a dropdown that uses /accoun...
php jquery
[2, 5]
654,435
654,436
Global mouseMove
<p>I have made the following javascript to be used in my jQuery based website. What it does, is to move a slider up/down, and scale the item above higher/smaller.</p> <p>Everything works fine, but since the slider is only a few pixels in height, and the move event is a bit slow (it does not trigger for every pixel) so...
javascript jquery
[3, 5]
3,806,142
3,806,143
how in singleton instance call interface
<p>This is my class </p> <pre><code>public class MyReceiver implements TolEnabled </code></pre> <p>and here i want to call</p> <pre><code>MyManager.getInstance(context, this, Properties.SDSMT, localText.toString(), Integer.valueOf(repetitions), false); </code></pre> <p>and in <code>MyManager</code> class I have sin...
java android
[1, 4]
2,263,038
2,263,039
Iphone equivalent to Android <include> and <merge> tag?
<p>I'm going to port an Android application over to the iPhone platform. I need header-footer like functionality so I'm looking for Android-style layouts merging for iPhone.</p> <p>Does iPhone support this? If so, how?</p> <p>[EDIT]</p> <p>May be above header-footer description creating confusion.I am trying to desc...
android iphone
[4, 8]
242,483
242,484
How do I write .level+1 as a selector in JQuery or JavaScript?
<p>A quick question. I have a series of DIVs with the following classes <code>.level1</code> <code>.level2</code> <code>.level3</code></p> <p>This is what I want to happen...When I hover over <code>.level1</code> I would like the selector to select <code>.level2</code>. In other words <code>.level</code>+1 whatever I ...
javascript jquery
[3, 5]
70,297
70,298
link click event not firing button click event on the first try (IE only). Works on second click.
<p>This is driving me mad. I've got a div on my page that opens up in colorbox. When the user clicks one of the links in the div, it fires an event to the code (below) which should in turn populate the hidden field and then click a server button to run some code behind.</p> <p>Problem is, in IE(9) it won't click the ...
c# javascript jquery asp.net
[0, 3, 5, 9]
2,015,214
2,015,215
JQuery/Javascript Reordering rows
<p>I have a aspx page that looks something like this:</p> <pre><code>&lt;tr id="Row1"&gt; &lt;td&gt;Some label&lt;/td&gt; &lt;td&gt;Some complex control&lt;/td&gt; &lt;/tr&gt; &lt;tr id="Row2"&gt; &lt;td&gt;Some label&lt;/td&gt; &lt;td&gt;Some complex control&lt;/td&gt; &lt;/tr&gt; &lt;tr id="Row3"&gt; &lt;t...
javascript jquery
[3, 5]
1,594,258
1,594,259
Making a treeview mimic required field validator functionality
<p>I am in need of validating a TreeView to make sure that users have selected something. What I need is something that mimics a RequiredFieldValidator and stops a page from posting back with any data until something is selected.</p> <p>I am using C# and ASP.NET 3.5</p> <p>I have tried this and it did not work for m...
c# asp.net
[0, 9]
5,872,902
5,872,903
Android Activities and sub-Activities
<p><br> I am new in Java and Android and now I have a follow problem. I want to pass String[] str variabe from one activity to another and show list of my string.<br> I have read <a href="http://developer.android.com/resources/tutorials/views/hello-listview.html" rel="nofollow">http://developer.android.com/resources/tu...
java android
[1, 4]
1,101,794
1,101,795
How to show validation errors after a postback
<p>I am having some textboxes and dropdownlist controls but if i select the ddl value the validation errors are disappearing and after the button click they are reappearing but i want to show the errors even after a postback how can i do this?? </p>
c# asp.net
[0, 9]
3,768,941
3,768,942
jQuery, multiple inputs and onBlur
<p>So I have 2 inputs. Both are for an "autocomplete". I also have 2 functions that do pretty much the same thing... Each input calls a different function onBlur. The problem is that the second upon selecting a "suggestion" for the second input, it populates the first. What can I do to make the second one populate the ...
javascript jquery
[3, 5]
260,032
260,033
How to disable click with jQuery/JavaScript?
<p>I have a link that I would like to present with a confirmation. I am using the javascript <code>confirm()</code> method. But the only way for me to get the link to not work when the user clicks 'cancel' is to use <code>return false;</code>. Is that the correct way to do it (cross-browser)?</p> <pre><code>$('a.confi...
javascript jquery
[3, 5]
892,060
892,061
How to set the year of a date based on value from drop down
<p>I have a drop down that has the years basically 2011,2010,2009 etc... and there is a date that i need to append the year selected to, basically I want to check todays date</p> <pre><code>DateTime dt = DateTime.Today; </code></pre> <p>and then change the year of dt to the value selected of my drop down</p> <p><cod...
c# asp.net
[0, 9]
2,643,279
2,643,280
KeyPress is not calling in jquery
<p>i am capturing an event on enter through a selector. but it is not capturing. </p> <pre><code>var trID; row.click(function() { var tr = $(watchRow).find('tr'); $('tr').not(this).removeClass('highlight'); $(this).toggleClass('highlight'); trID = $(this).attr('id'); ...
javascript jquery
[3, 5]
575,717
575,718
jQuery selector
<pre><code>var obj = document.getElementById("&lt;%= tbUpdate.ClientID %&gt;"); var colorid = obj.value; $('.shade[colorId=colorid]').addClass('active'); </code></pre> <p>the problem is with the colorId=colorid. I think jQuery thinks that its string. How can I pass value from var colorid into selector?</p>
jquery asp.net
[5, 9]
297,100
297,101
how to add new product ( hidden list ) forr smartcart jquery pluguin?
<p>i am using smartcart 2 jquery pluguin on my application to handle session cart. the user can create new product and add it to his cart. i use ajax call to save the product in my list .and then i need to refresh the list ( intial hidden products ). the ajax responce is the saved id of the new product. the problem is ...
javascript jquery
[3, 5]
5,175,140
5,175,141
Div onload function and embedding server code c#
<p>I am trying to call c# properties in .aspx page, where myfunc is jquery function. this function take parameters which i am passing through c# public properties. and I want to call this function as soon as div is rendered.previously i have done this on prerender event in ascx control. wha is exact ssyntax for bel...
c# javascript asp.net
[0, 3, 9]
4,251,637
4,251,638
check alphanumeric characters in string in c#
<p>i have used the following code but it is returning false but it should return true </p> <pre><code>string check,zipcode; zipcode="10001 New York, NY"; check=isalphanumeric(zipcode) public static Boolean isAlphaNumeric(string strToCheck) { Regex rg = new Regex("[^a-zA-Z0-9]"); ...
c# asp.net
[0, 9]
3,971,215
3,971,216
relpace textarea in jquery
<p>I'm trying to Replace a %%%VERSION%%% text, the text is coming from an tinyMCE editor. </p> <p>looks like this. </p> <pre><code>$("#description textarea").val($("#description textarea").val().replace(/%%%VERSION%%%/g, STAT_VERSION_INFO)); </code></pre> <p>The value of the textearea is:</p> <pre><code>&lt;textare...
javascript jquery
[3, 5]
5,556,649
5,556,650
Using the cache android
<p>I implemented an application that are fed from an XML stream. The XML feed changes every once daily.</p> <p>I want to know if I can meter the xml file caching for one day for each round has not questioned the service that provided the xml But every day at midnight I want it retrieves the new version of XML</p> <p>...
java android
[1, 4]
5,803,451
5,803,452
Loading ASP.NET user control at run time
<p>I have an ASP.NET user control with a button, and I want to add it to the page when the user clicks a button from another user control. I have created an event handler to the first user control to handle it from the page and add the second user control to a page. Everything is working normally, but the button on the...
c# asp.net
[0, 9]
6,001,263
6,001,264
Using a custom image as a form
<p>I've made my own custom log-in form in cs6 and I'd like to use that as my log-in form for my android application. What are some common ways about doing this? I'm fairly new to the Android world, so this is all new to me. </p> <p>I would think to use the image as a ImageView tag and then add a my text field on top o...
java android
[1, 4]
757,753
757,754
Javascript: Interpolating variables inside strings
<p>I have the following jquery code which loads the <code>#content</code> div from <em>another</em> page, into the <code>#result</code> div on the <em>current</em> page:</p> <pre><code>$('a').click(function(event){ $('#result').load('abother_page.html #content'); }); </code></pre> <p>As you can see, I'm hard-coding...
javascript jquery
[3, 5]
2,911,038
2,911,039
Super simple JQuery Question - refresh static html
<p>I have the following two functions that work great:</p> <pre><code>$(function(){ $('.trash_can a.delete').live('click', function(event) { event.preventDefault(); var link = $(this); $.post(link.attr('data-href'), { promo_id: link.attr('data-promo_id') }, function(data) { ...
javascript jquery
[3, 5]
1,766,797
1,766,798
Jquery replace character and apply classes
<p>I have several string in the following format</p> <pre><code>&lt;span class="label"&gt;20€&lt;/span&gt; </code></pre> <p>And want to convert it all to something like this:</p> <pre><code>&lt;span class="label"&gt;20&lt;small&gt;€&lt;/small&gt;&lt;/span&gt; </code></pre> <p>How could I achieve this in Jquery?</p>...
javascript jquery
[3, 5]
5,090,165
5,090,166
foreach through div
<p>I have got some trouble about doing an loop through the following construct:</p> <pre><code>&lt;div id="items"&gt; &lt;p id="test1"&gt; &lt;select name="1" id="1"&gt;&lt;option&gt;A&lt;/option&gt;&lt;option selected&gt;B&lt;/option&gt;&lt;/select&gt; &lt;input type="text" name="to" id="to"&gt; ...
javascript jquery
[3, 5]
4,437,269
4,437,270
Asp.Net(C#) Jquery Ajax with WebMethod In Public Method Call
<p><strong>Aspx Page:</strong></p> <pre><code>$(document).ready(function() { $("#btnn").click(function() { $.ajax({ type: "POST", url: "TestPage.aspx/emp", data: "{}", contentType: "application/json; charset=ut...
asp.net jquery
[9, 5]
87,575
87,576
Encode and Decode in c# asp.net?
<p>i am using Encoding and decoding :</p> <p>For Encoding:</p> <pre><code>private string EncodeServerName(string ServerName) { byte[] NameEncodein = new byte[ServerName.Length]; NameEncodein = System.Text.Encoding.UTF8.GetBytes(ServerName); string EcodedName = Convert.ToBase64String(NameEncodein...
c# asp.net
[0, 9]
2,864,714
2,864,715
jQuery addClass onClick
<p>The setting is easy; I want to be able to add a class to (in this case) a button when onClick-event is fired. My problem is that I haven't found a way to pass the button itself as the parameter to the function. I'd like to do something like:</p> <pre><code>&lt;asp:Button ID="Button" runat="server" onclick="addClass...
javascript asp.net jquery
[3, 9, 5]
2,510,593
2,510,594
Accessing a variable passed by jquery using php
<p>How does php access a variable passed by JQuery?</p> <p>I have the following code:</p> <pre><code>$.post("getLatLong.php", { latitude: 500000}, function(data){ alert("Data Loaded: " + data); }); </code></pre> <p>but I don't understand how to access this value using php.</p> <p>I've tried </p> <pre><c...
php jquery
[2, 5]
126,169
126,170
How to load javascript function on page load ?
<p>I have used javascript to generate 2D bar-graphs in a HTML page. When i am trying to load this HTML page containing bar-graph in to a div tag of some other HTML page using jQuery <code>.load()</code> function bar-graph (i.e, scripts) are not loading.</p> <p>Please help on this issue.</p> <p>For example i have bar-...
javascript jquery
[3, 5]
5,104,952
5,104,953
Better way than setInterval?
<p>I have the current function below, but feel like there is a much better way to write the same thing. I am looking for some insight on the most optimized way to write the same function below and why.</p> <p>Note this is all inside of <code>$(function(){});</code></p> <pre><code>m = function(){ $("#id").animate({...
javascript jquery
[3, 5]
2,093,211
2,093,212
make radio button selected based on an event
<p>I have several divs of class OuterDiv that contain divs of class InnerDiv that contain radio buttons.</p> <pre><code>&lt;div class="OuterDiv"&gt; &lt;div class="InnerDiv"&gt; &lt;input type="radio" name="TheOptions" /&gt;option 1 &lt;/div&gt; &lt;/div&gt; &lt;div class="OuterDiv"&gt; &lt;div class="Inner...
javascript jquery
[3, 5]
903,919
903,920
Simple Redirect Page With Click Button To Continue
<p>I need to create a dynamic redirector page that I can put ads banner and a call button that appears after 5 seconds. When I click the button, it will redirect to any URL after ?</p> <p>For example :</p> <p>1 - user click a link in website : - <a href="http://www.mydomain.com/go.php?http://www.google.com" rel="n...
php javascript
[2, 3]
1,960,477
1,960,478
Redirect to the link in parent window
<p>In parent page I'm using:</p> <pre><code>function popitup(url) { newwindow = window.open("child.aspx", 'name', 'height=700,width=800,scrollbars=yes, resizable=no '); if (window.focus) { newwindow.focus() } return false; } </code></pre> <p...
javascript asp.net
[3, 9]
3,542,365
3,542,366
How to get SelectedValue of DropdownList without postback or updatepanel
<p>I have a <code>DropDownList</code> which i am binding on page load. i dont have any buttons or anything. as soon as user selects the value in dropdown i need to show that value in label. i am not sure why this is not working. please help.</p> <pre><code>public string SelectedStore { get; set; } protected void Page_...
c# asp.net
[0, 9]
3,064,432
3,064,433
Change "value" of a <input> while clicking on query result, while more than one record
<p>I have a script that would change the value of a input field: </p> <pre class="lang-php prettyprint-override"><code> &lt;script language="javascript"&gt; function klientid() { var getid = document.getElementById("getidfromsearch");//results var klid = document.getElementById("idklienta"); //input fie...
php javascript
[2, 3]
528,950
528,951
jQuery not behaving as expected in reference to clicks
<p>I have an element that I grab the content of and swap for an input, I then want to user to be able to click on the input (to enter text as normal), but if they click anywhere else to swap it back to the text.</p> <p>However the click event seems to fire even the very first time the user clicks anywhere on the page....
javascript jquery
[3, 5]
3,471,793
3,471,794
can jquery and javascript co-exist in a file?
<p>can i use javascript and jquery both in a page?</p> <p>like:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ //some jquery }); function xyz(){ //javascript statements //some jquery statements } &lt;/script&gt; </code></pre>
javascript jquery
[3, 5]
1,046,370
1,046,371
how to get 1 hidden field among several within div
<p>i have 3 hidden fields in 1 div. when I have reference to this div, how to get 1 of the hidden fields in this div.</p>
javascript jquery
[3, 5]
920,768
920,769
Menu icons won't appear
<p>I'm trying to add some menu items with icons to a menu. The items appear but without the icon on the left side of them, it's just the text...</p> <p>By the way, I'm using the Holo Light theme...</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;menu xmlns:android="http://schemas.android.com/apk/res/a...
java android
[1, 4]
5,366,728
5,366,729
fire a function after triggering a click event
<p>How can fix this :</p> <pre><code>function Navigation(sender) { var senderID = sender.id; var answer = confirm("do you want to save your current layout ?"); if (answer) { $("#loadingImg").css("display", "block"); $("#&lt;%=Button1.ClientID %&gt;").click(); //the next line is n...
javascript jquery
[3, 5]
3,001,667
3,001,668
Javascript comfirmation popup not showing
<p>I am trying to validate some fields in DIV and if theres no validation error, I would show a comfirmation popup, below is my code, apparently the popup doesn't appear, if I remove the Page_ClientValidate(); and the popup will show. Please kindly advice. Thanks. </p> <pre><code>&lt;asp:Button ID="uibtnVoucherIssuanc...
javascript asp.net
[3, 9]
3,442,462
3,442,463
Any JavaScript or jQuery Method to Load JS files synchronously?
<p>I'm loading user control through jQuery in my asp.net page. </p> <p>User control contains JavaScript files, while loading the user control all my js load at one time which are dependent on each other and they tend to give error while all file load at one time. So I want that my JavaScript file to load synchronousl...
javascript asp.net jquery
[3, 9, 5]
3,747,617
3,747,618
recursive function calling itself even condition is satisfied
<p>i have a very simple code here which uses recursion to iterate the queue class i need to simple print 6 on screen but it print 1 ,please tell me where i am wrong.</p> <pre><code>protected void Button1_Click(object sender, EventArgs e) { q.Enqueue(1); q.Enqueue(2); q.Enqueue(3); q.Enqueue(4); q.E...
c# asp.net
[0, 9]
4,642,730
4,642,731
what is the difference between the below two syntaxes?
<p>1.</p> <pre><code> $(function () { function foo() { return true; } log(bar()); // getting error var bar = function() { return true; }; }); </code></pre> <p>2.</p> <pre><code>$(function () { function foo() { return true; } log(bar()); ...
javascript jquery
[3, 5]
4,657,507
4,657,508
Detect redirect in iFrame
<p>I may be asking the wrong question here so I will provide a small amount of detail about what I am trying to accomplish. </p> <p>I use a third party web app to track support tickets. They provide the code for a form that my users fill out and it submits to their domain. I want to use this form on two different doma...
javascript jquery
[3, 5]
930,451
930,452
Android - Detect app moving to background and foreground
<p>If application is gone to background and come back after 5 minutes, I need to restart the app. We can leave the restart part, how will we detect the app moving to background and to foreground? Please help. </p> <p>If there is a link on details of its official impossibility or possibility, please share.</p>
java android
[1, 4]
3,657,671
3,657,672
hovering of tds
<p>I have a table in my application. I need to start hovering effect on a td when that cell is clicked and then stop hovering till the next click. Also mouseover to the next row of td that (hovering a range of tds). I am new to jquery. Please help.</p> <pre><code>jQuery('td').hover(function(){ jQuery(this).css("back...
javascript jquery
[3, 5]
573,789
573,790
JavaScript's strange behavior
<p>If uncomment <code>body.children().each(calc_deep(1));</code> then i get <code>TypeError: Object [object Window] has no method 'attr'</code> on the <code>parseInt(deepest.attr('deep'))</code> string, but without uncomment you can check in console that you can call <code>deepest.attr('deep')</code>. What is that?</p>...
javascript jquery
[3, 5]
3,009,216
3,009,217
jquery error on appending html content to div tag
<p>Here is the code I am having:</p> <pre><code>&lt;div id="removequestions"&gt;&lt;/div&gt; var html += '&lt;input type=radio name=questions /&gt;'; $.('#removequestions').append(html); </code></pre> <p>The javascript error I am getting on executng the above code is:</p> <pre><code>XML filter is applied to non-XML...
javascript jquery
[3, 5]
5,979,680
5,979,681
Change the color of strings affected by regex on (document).ready
<p>So I what I'm trying to accomplish here, is to change the color of words affected by some regex.</p> <pre><code>$(document).ready(function(){ container = $("#modal_container section").text(); hashtags = /\#\w+/g; var container_hash = container.match(hashtags); $(container_hash).css({'color':'red'}); //W...
javascript jquery
[3, 5]
572,044
572,045
JQuery Dropdown Menu <li> Links Do Not Work In Internet Explorer
<p>I recently implemented a jQuery dropdown from this developer's site: <a href="http://tympanus.net/codrops/2012/10/04/custom-drop-down-list-styling/" rel="nofollow">http://tympanus.net/codrops/2012/10/04/custom-drop-down-list-styling/</a>, and it looks and works fine on my site in Chrome and Firefox (my site is: <a h...
javascript jquery
[3, 5]
113,077
113,078
Best way to refer to javascript in UserControl(ascx)
<p>I usually create usercontrol which is referring javascript file/block. For example, I have a cascading Nation/City selection which is based on AJAX in my Register.ascx(a usercontrol), certainly I need add the javascript file into page. I have 3 ways at present:</p> <p>1.Writing <code>&lt;Script&gt;</code> element i...
javascript asp.net
[3, 9]
2,829,315
2,829,316
android Service to detect that home screen is on
<p>Can I write an service in android which detects that we are on home screen and Toast a message. I want to detect that control is currently on home screen.</p> <p>Let me know if possible.</p> <p>Thanks, Pravin</p>
java android
[1, 4]
122,062
122,063
Iframes not loading in Firefox
<p>I have a web page with multiple iframes. These ifrmaes trying to load some web forms. My problem is, these forms are not loading in Firefox but working fine in IE8 and chrome.</p> <p>Any idea abut this problem ?</p> <p>Following is the fragment of code. What it does is, creating multiple iframes dynamically.</p> ...
php javascript
[2, 3]
1,535,069
1,535,070
.click doesn't seem to be firing...why?
<p>I am attempting to get a link to fire JQuery's .click() function so that I can call another script behind the scenes. All of the JQuery is generated dynamically by PHP. </p> <p>The code looks correct, but the .click is not firing.</p> <p>This is the code that generates the jquery:</p> <pre><code> $jscr...
php jquery
[2, 5]
566,122
566,123
Why can't I throw an exception while using the ternary operator
<p>This doesn't compile and gives the following error : <code>Illegal start of expression</code>. Why?</p> <pre><code>public static AppConfig getInstance() { return mConfig != null ? mConfig : (throw new RuntimeException("error")); } </code></pre>
java android
[1, 4]
5,361,421
5,361,422
Determining target TD when TR is clicked
<p>Given some click event for a table row:</p> <pre><code>$("tr.somerow").click(function(){ //do some stuff //can I determine the TD under the cursor at the time of clicking? }) </code></pre> <p>Can I determine which TD (or any child elements) was under the cursor at the time of clicking?</p>
javascript jquery
[3, 5]
4,597,802
4,597,803
Android 1.5/1.6 issue with style and autogenerated R.java file
<p>I'm having strange issue with R.java file and styles defined in my resources.</p> <p>Here's some code:</p> <p>In res/values/strings.xml:</p> <pre><code>&lt;style parent="android:Theme.Dialog" name="PopupWindowStyle"&gt; &lt;item name="android:windowBackground"&gt;@drawable/bg1&lt;/item&gt; &lt;item name="android:...
java android
[1, 4]
5,501,547
5,501,548
jquery display + delay strategy
<p>The following javascript displays the final result (instead of updating every second). How can I iterate through the result of the getJSON call, display that result, and delay until I display the next element?</p> <pre><code>function display(state) { for (var i=0; i &lt; state.length; i++) { $('#someDiv' + i...
javascript jquery
[3, 5]
3,550,564
3,550,565
jQuery: Detect element's height when window is resized
<p>I need help with the following issue.</p> <p>I'm creating a responsive site. Its structure is quite basic: header, nav bar, body and footer.</p> <p>In the header I have several elements and all these elements use percentages for their dimensions, so the <em>height</em> of the header is determined by the height of ...
javascript jquery
[3, 5]
5,622,696
5,622,697
make a div with jquery dialog scroll to bottom when loaded
<p>this is the code :</p> <pre><code>$(document).ready(function(){ $("#Dialog").dialog({ title: "dialog", width: 360, height: 365, modal: false, resizable: false, focus: function (event, ui) { $("#ToClientID").val(ToClient); }, open...
javascript jquery
[3, 5]
5,667,060
5,667,061
jquery weekcalendar resize/drop variables current div
<p>I am customizing the jquery weekcalendar to use json to read/write data to a mysql database.</p> <p>What works so far, loading the cal from db, creating and storing new events on cal and deleting events on the calendar.</p> <p>I run into problems trying to get the time/date variables when you resize an event on th...
javascript jquery
[3, 5]
4,331,211
4,331,212
How to clear TextBox text and AJAX CalendarExtender value using Javascript?
<p>I have an ASP.NET user control that contains a textbox which has an AJAX CalendarExtender control which allows users to select a date which then populates the textbox.</p> <p>I can clear the textbox value using a submit button and setting the value to null in the code behind, but I need to set the value to "" in th...
c# javascript asp.net
[0, 3, 9]
4,674,547
4,674,548
Find City,Country from IPaddress
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/372591/how-to-get-city-country-and-country-code-for-a-particular-ip-address-in-asp-net">How to get City, Country, and Country Code for a particular IP Address in ASP.NET?</a> </p> </blockquote> <p>I want to find...
c# asp.net
[0, 9]
3,835,147
3,835,148
How to get list of files from directory FTP?
<p>I have made Android application and I have a problem: I use org.apache ftp client and i have following code:</p> <pre><code> client.connect(InetAddress.getByName(...)); boolean result=client.login(..., ...); client.enterLocalPassiveMode(); for (String s:client.listNames("Power Serve")) {...
java android
[1, 4]
884,713
884,714
.val() is not working in jquery?
<p>Can we also pass string values to some variable and call through below code</p> <pre><code>$(document).ready(function() { var i = "1, 2, 3"; $('#textvalue').val(i); }); </code></pre> <p>does it work?</p> <p>Its not working don't know how :(</p> <p>There is one more post related to this</p> <p>Link: <a h...
javascript jquery
[3, 5]
2,886,063
2,886,064
what does jQuery(function) do
<p>I am reading <code>javascript</code> web application and the author is using following code:</p> <pre><code>mod.load = function(func){ $($.proxy(func, this)); }; </code></pre> <p>Can someone help me to understand why returning function from <code>jQuery.proxy</code> is inside <code>jQuery</code> wrapper. </p> ...
javascript jquery
[3, 5]
370,082
370,083
JQuery function not found
<pre><code>// also tried function getDeletedDates() var getDeletedDates = function() { var s = new Array(); $(".deleted").each(function(i, e) { s.push($(e).attr("data-day")); }); }; $(function() { $("#delete_send").click(function() { alert("drin"); $.ajax({ ...
javascript jquery
[3, 5]
130,572
130,573
How to put a \n(new line) inside a list box?
<p>How to put the newline(\n) in list box .selected item? Here I have code it generates the all links but I want to have all those link in listbox, these code is working but the links are not coming in the new line all comes in single line and my code is:</p> <pre><code>var links = TextBox1.Text.Split(new string[] { ...
c# asp.net
[0, 9]
2,386,360
2,386,361
jQuery Back-to-Top + StickyFloat + Fade-In on Scroll
<p>I'm currently using <a href="https://gist.github.com/728487" rel="nofollow">jQuery Stickyfloat</a> for a "back to top" button on a page that has alot of content. It works perfectly, however, the link is visible at the top when the user goes to the page. I would like it to be hidden on page load and when the user scr...
javascript jquery
[3, 5]
5,857,716
5,857,717
Why won't my SelectedIndexChanged event fire in Button_Click?
<pre><code>protected void Button1_Click(object sender, EventArgs e) { TableRow tb = new TableRow(); TableCell tc = new TableCell(); DropDownList db = new DropDownList(); db.Items.Add("Bangalore"); db.Items.Add("Mandya"); db.Items.Add( "Hassan"); tc.Controls.Add(db); tb.Controls.Add(tc)...
c# asp.net
[0, 9]
5,642,776
5,642,777
How do you convert PHP arrays in ASP.NET?
<p>I have the following code in PHP that uses arrays of arrays. How do I extract the email using ASP.NET? Unfortunately I cannot debug and see what's the caller is sending. Thanks.</p> <pre><code>$data= $POST['data'] $email = $data['email'] </code></pre> <p>Basically I'd need to extract the email from a POST (here's ...
php asp.net
[2, 9]
5,204,194
5,204,195
Grab two randomly generated divs and wrap within custom div
<p>I am trying to get the two randomly generated div ID's shown below and wrap them within my custom div that I can control. Was searching around on jQuery API for solution but still no ideas.</p> <p>Here's a preview of example: <img src="http://i.stack.imgur.com/4puMl.png" alt="2 Randomly Generated ID's + Custom Clas...
javascript jquery
[3, 5]
3,232,291
3,232,292
Nullable (int?) keep throwing non-nullable exception
<p>This is a first that I've encountered this - of course that does't sais a lot, but never the less I need to consult with the collective as my searches while showed that it can be done, I'm not able to work it out.</p> <p>The issue is that if user leaves the text box empty C# automagically enters zero on the postbac...
c# asp.net
[0, 9]
1,419,598
1,419,599
search and suggest with keywords with drop down in java script
<p>I am using php and I have written the code for search and suggest. Like if i enter 're' in text box , it will give all the result start with re in drop down.</p> <p>Now what i want to display all the result with key words math and highlight them in search. Like if i enter 're' then it should display reliance, rel...
php javascript
[2, 3]
1,439,845
1,439,846
Do the same multi task in the same time
<p>I have a problem in Asp.net C#</p> <p>I have the code below : List objectList = new List();</p> <pre><code>foreach(var item in listItem) { object obj = getData (item); objectList.add(obj); } Console.Write("Finish all"); </code></pre> <p>Each time `getData (item);' fires it takes about 1s;</p> <p>I want a...
c# asp.net
[0, 9]
1,094,985
1,094,986
jquery is select selected
<p>Ok, first off this isn't to find a value of a select boxes selected option. But its along the lines there of. I have a function I am working on that will check to see if the value selected matches that of the one being compared to from somewhere else, where if the match is found it does one thing if not it does anot...
javascript jquery
[3, 5]
5,982,164
5,982,165
Load another asp.net page into current page
<p>Using ASP.NET with C#, I would like to load the content of another page into my current page. </p> <p>I have a main div <code>id="maindiv"</code> on one page with a header above it. The header contains clickable links that route to the same url with a get variable like <code>http://www.mainpage.com&amp;page=nextpag...
c# asp.net
[0, 9]
2,314,905
2,314,906
Convert ArrayList<<NameValuePair>> to string android java
<p>How to Convert ArrayList&lt;> to string ...</p> <p>Details:</p> <p>step1: send e-mail address to php mySql database step2: if email address match database content, echoed success step3: retrieved the php echoed value ("success") step4: assign the the response to a string phpEchoedVal step5: compare phpEchoedVal w...
java android
[1, 4]
4,468,174
4,468,175
JavaScript catch event
<p>I have a problem. I have too many events in my DOM. The upper layer is catching the deeper event.</p> <p>Easy Example:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(docu...
javascript jquery
[3, 5]
2,289,668
2,289,669
Disable select, copy and paste of the content of HTML pages in Mozilla Firefox
<p>I want to disable select, copy and paste of the content of HTML pages in Mozilla Firefox. I have used jQuery and JavaScript to disable right-click and copy, select, paste of the contents of HTML pages and it's working fine in IE and Chrome, but not working properly in Mozilla Firefox.</p> <p>Can we disable copy, pa...
javascript jquery
[3, 5]
611,543
611,544
I ran out of available quote symbols in javascript!
<p>I can't believe it, but this is really happening. I ran out of available quote symbols using jquery and javascript native functions together. Can somebody help? Maybe there is yet another symbol?</p> <pre><code>var t=setTimeout('$("#popupChange").html('&lt;img src="http://servername/pdf/picture/genericThrobber.gif"...
javascript jquery
[3, 5]
2,483,112
2,483,113
two small image slider problems
<p>What I want to accomplish is to animate the selected slide from the right just the selected slide and hide the slides in between and the second problem is when the index is zero it animates a slide in from the left does anyone know how to make it animate from the right - when the index is zero it thes the first inde...
javascript jquery
[3, 5]
4,886,046
4,886,047
Detecting an "unselect" event in a text area
<p>jQuery has the <a href="http://api.jquery.com/select/" rel="nofollow"><code>.select()</code></a> method, which lets you execute a function when text is selected in a text area.</p> <p>Unfortunately, there is no corresponding <code>.deselect()</code> method for executing a function when the user removes a selection....
javascript jquery
[3, 5]
347,439
347,440
Is there a better approach to minify html generated from aspx page
<p>I am using the following code to minify html generated from aspx page duuring runtime.</p> <pre><code>protected override void Render(HtmlTextWriter writer) { TextWriter output = new StringWriter(); base.Render(new HtmlTextWriter(output)); String html = output.ToString(); html = Regex.Replace(html, @...
c# asp.net
[0, 9]