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
3,990,000
3,990,001
Get the value in the textbox automatically when clicking an item in dropdown
<p>I have a text box and dropdown list box. In dropdown list box i'm having the list of equipments which are having the different price according to the equipment. User take the equipment for the rent for the num of days. Now I calculate the price for the rent using php function. </p> <p>Now all I want is, to display ...
php javascript
[2, 3]
4,385,964
4,385,965
copy data from one textbox to another when document is ready
<p>In a form, when the document is ready, I am trying to copy the preset value of a textbox to another textbox using jQuery. I tried <code>$("#b").val() = $("#a").val();</code> but, it dint work. Please refer to <a href="http://jsfiddle.net/Z693R/" rel="nofollow">this fiddle</a>.</p>
javascript jquery
[3, 5]
455,114
455,115
Jquery - Open a new window with content from the current page
<p>I'm trying to create a 'print' button to open a new window and display a PHP Variable in it. </p> <p>The code below is looped through the PHP script as many times as there are tickets, however I can't seem to get the correct number to display when the window opens (the number that displays in the print link is corr...
php jquery
[2, 5]
4,668,102
4,668,103
creating Web User Control and adding it to tool box
<p>I'm trying to learn how create a web user control so i can use in diffrent projects. I created a simple control just to see how it worked; after I created it, I could add it to any page on the current project and it worked fine. </p> <p>My problem is how can I add this control to the tool box so I can use it in d...
c# asp.net
[0, 9]
1,268,001
1,268,002
Subscribing to "childrenAdded" event in jQuery
<p>Is there currently a way to subscribe to an event of a wrapped set, that will trigger when any element is appended to it as a child element? </p>
javascript jquery
[3, 5]
1,273,160
1,273,161
How can I narrow down a class with an id in jQuery?
<p>I have the div:</p> <pre><code>&lt;div class="io-content-pane" id="record-view" style="position: relative;&gt;&lt;/div&gt; </code></pre> <p>How can I select this based on its class and its id in jQuery?</p>
javascript jquery
[3, 5]
2,800,354
2,800,355
jQuery make kellishaver stopwatch plugin countdown instead of up
<p>I need a stopwatch/timer to countdown. I'm trying to use <a href="http://www.kellishaver.com/projects/stopwatch/" rel="nofollow">Kellis Havers stopwatch jQuery plugin</a> and change it to countdown.</p> <p>But can't figure out how to make it substract instead of add seconds, tried changing the 'second++;' to 'secon...
javascript jquery
[3, 5]
4,123,843
4,123,844
Intellisense for <tr> and <td>
<p>Hey, This is the one i used. For some condition, i want to hide these by using Visible to false.</p> <pre><code>&lt;tr id="trpackage" runat="server" valign="top" align="center"&gt; &lt;td id="tdpack" runat="server" style="display: none;" align="center"&gt; ....... &lt;/td&gt; &lt;/tr&gt; </code></pre> <p>In the c...
javascript asp.net
[3, 9]
2,276,400
2,276,401
Animate to top value when element has a bottom value
<p>I am trying to animate an element that is absolutely positioned and positioned bottom and left to a position top and right.</p> <p>CSS</p> <pre><code>.obj{ position: absolute; bottom: 0; left: 200px; } </code></pre> <p>JS</p> <pre><code>$('.obj').click(function(event){ $(this).animate({top:'15%', righ...
javascript jquery
[3, 5]
5,308,002
5,308,003
load content while scrolling not working
<p>I am writing a code which i scroll to the bottom of the window it loads another data with the help of php code. It loads the load_first.php file but not identifies the load_second.php file What problem in this code see this </p> <pre><code> &lt;?php $_SESSION['first']=1; if($_SESSION['first']==1) { ?&gt; &lt;...
php jquery
[2, 5]
2,254,169
2,254,170
Avoid data redundancy in ASP.NET page
<p>I have an asp.net page which uses a listview to show 2 columns of data. The first column has just labels and the second one has dropdowns.</p> <p>My concern is, the dropdowns in second column has same items 100% of the time, they never change and since it is databound, and datasource to these dropdown is also same....
c# asp.net
[0, 9]
259,079
259,080
jquery removing a class (if it exists and adding a new class)
<p>I'm trying use jquery to remove a class from an element (not knowing ahead of time if it exists) and add a new element to replace it.</p> <p>Would this be the best way (I'm skepticle because its not checking to see if the class exists before removing it):</p> <pre><code>$(elem).removeClass(oldClass).addClass(newCl...
javascript jquery
[3, 5]
2,252,595
2,252,596
Send message from a hotspot to a connected client
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/10777678/send-message-from-a-basic-server-to-a-specific-client">Send message from a basic server to a specific client</a> </p> </blockquote> <p>Here is a scenario. I have enabled a hotspot through wifi tethering...
java android
[1, 4]
1,853,435
1,853,436
Change the selected value of the selectlist
<p>I am using <code>selectmenu plugin</code> for my select list. I want to change the selected value of the selectlist using jquery. I tried :</p> <pre><code> $('select').val("new selected value"); $('select').selectmenu("value", "new selected value"); </code></pre> <p>But both of the abo...
javascript jquery
[3, 5]
1,125,616
1,125,617
how to make a secondary link after a first link was clicked?
<p>i want to make two links. 1. click here to generate CSV file. 2. click here to download the CSV file.</p> <p>the problem is that i want the second file to appear only if the first link was clicked.</p> <p>can someone help?</p> <p>thanks, Sebastian</p> <p>EDIT: i forgot to mention that my table is built up in a w...
php javascript
[2, 3]
1,884,895
1,884,896
adding a try catch around a large method call
<p>I have a web service that's pretty simple; something like this:</p> <pre><code>public class LeadService : System.Web.Services.WebService { [WebMethod(EnableSession = true)] public string MyService(string TheIncomingData) { string ReturnData = ""; MyClass TheClass = new MyClas...
c# asp.net
[0, 9]
4,709,707
4,709,708
How to Change the Text of a button using EditText on Android
<p>I am trying to use an EditText one one Activity to change the text of a button on another. I know I have to go through the SharedPreferences, and although this is where I am stuck.</p> <p>Activity with the Button:</p> <pre><code>protected void onResume() { super.onResume(); class1.setText(this.getButtonTe...
java android
[1, 4]
5,495,384
5,495,385
How to run Javascript code before document is completely loaded (using jQuery)
<p>I am sharing a tip with you all.Please add on to this discussion.</p> <p>JQuery helps faster page load than javascript. JQuery functions are fired when the related elements are loaded, instead of complete pageload. This is a common practice to call a javascript function when page is loaded like</p> <pre><code>wind...
javascript jquery
[3, 5]
1,684,287
1,684,288
How does one share data between a C++app and a C# app without files?
<p>I have a C++ application with data that needs to be shared with a C# application. I'm currently transferring the data via files, but with speed and quantity of the data becoming an issue I would like to find a way to share the data through memory.</p> <p>I'm a beginner to intermediate programmer at best, and so far...
c# c++
[0, 6]
3,645,191
3,645,192
check element has a class starting with string using jquery
<p>I am getting the last element from a form which has a value like this: </p> <pre><code>var lastOne =$(':text[name^=distanceSlab][value!=""]').last(); </code></pre> <p>now I want to find the element which has a class that begins with the string "limit". I have tried something like:</p> <pre><code>if(lastOne.is("cl...
javascript jquery
[3, 5]
951,257
951,258
Gridview with multiple columns of checkboxes selection in javascript
<p>I am using a Gridview with checkboxes in my application. Here is the format: <img src="http://i.stack.imgur.com/QK95k.png" alt="enter image description here"></p> <p>In the gridview if header checkbox is checked then all subsequent chekboxes under that should also be checked or unchecked as the case of header chekb...
javascript asp.net
[3, 9]
1,887,231
1,887,232
Will Java catch up with C#?
<p>Today I posted a question asking about which language C# or Java would be better for me to study. I had some great answers. One thing that came up was that perhaps Java is now rather behind C# with new features. I saw some web links and most pointed out what C# had and what java did not have. </p> <p>So my question...
java c#
[1, 0]
4,268,137
4,268,138
jQuery insertAfter: will insert <li> but not <a>?
<p>With this code: </p> <pre><code>&lt;ul data-role="listview" id="routelist" data-theme="g"&gt; &lt;li id="firstlistitem" style="display:none;"&gt; </code></pre> <h2> </h2> <pre><code>$("&lt;li&gt;&lt;a href='http://www.google.co.uk'&gt;&lt;/a&gt;&lt;/li&gt;").text('content').insertAfter($("#firstlistitem")); ...
javascript jquery
[3, 5]
26,305
26,306
Determine if collection of elements are visible using JQuery like $(".someClass")
<p>I have a collection of elements on my page, and I want to see if they are visible or not currently.</p> <p>So:</p> <pre><code>$(".someClass") </code></pre> <p>How can I loop through and figure this out? because if it is visible, i have to fire another function.</p>
javascript jquery
[3, 5]
2,531,639
2,531,640
JQuery Toggle with sliding effect or similar
<p>I am working with this code:</p> <pre><code>&lt;script type="text/javascript"&gt; $(function(){ $('#MyLink').click(function(){ $('#DivA').toggle(); $('#DivB').toggle(); }); }); &lt;/script&gt; </code></pre> <p>I just need to add some sliding to it of some other effect so that you can tell that it's...
javascript jquery
[3, 5]
2,714,086
2,714,087
Linking a button to a XML page
<p>Basic question but i have checked a number of places and can only find information on pop up messages like toast etc.</p> <p>How would I be able to link buttonA (stored in fragment xml file) so that it will view activitypage.xml?</p> <p>Thanks!</p>
java android
[1, 4]
4,819,815
4,819,816
How to convert an image into ASCII
<p>I want to send an image to the server through XML. For that i need to change my image in ASCII. Can any one help me</p> <p>Thanks in Advance. </p>
java android
[1, 4]
2,736,708
2,736,709
How to export javascript generated report to pdf?
<p>I made a reporting engine with javascript for my project... The problem is with printing.. Although with page-break and css i can produce a good looking report, i want to export that report to a pdf in order to be printed better without ,the url,page title and other stuff that browsers add. Note in Chrome there isnt...
java javascript
[1, 3]
2,343,116
2,343,117
PHP syntax for setting a variable
<p>I have a JS script which im converting the code over to PHP but am stuck on what the correct syntax is to create the same as this piece of code in JS in my PHP script:</p> <pre><code>var sdata = { "13":{ "22":["618","22","1","1","0","0","0"], "21":["617","22","1","1","0","0"...
php javascript
[2, 3]
6,033,567
6,033,568
jQuery dynamic changing image header
<p>Iam trying to write a simple jQuery function to change the image header of my webpage.</p> <p>The HTML looks like this:</p> <pre><code>&lt;div class="slider"&gt; &lt;ul&gt; &lt;li&gt; &lt;img src="img/slide21.png" alt=""&gt; &lt;/li&gt; &lt;li&gt; &lt;img src="img/slide31.png" alt=""&gt; &lt;/li&gt; </code></pre>...
javascript jquery
[3, 5]
3,616,534
3,616,535
sliding the divs accroding to url
<p>I am having a page here.</p> <p><a href="http://www.kharota.com/cantsay/index.html" rel="nofollow">http://www.kharota.com/cantsay/index.html</a></p> <p>What I wanted was to div slide up and down as url changes for example index.html#thisweek will slide the div which contains data of this week. Sometimes it works s...
javascript jquery
[3, 5]
5,158,490
5,158,491
PHP JSON and <script> tag
<p>I am using PHP to send a json string to jQuery ajax. I am simply using $("#id").html(data.result) to display the html from the fetched page. Now on the fetched page I am looping through MySQL results. I need to run a piece of javascript on each result so I can start a countdown timer for each result.</p> <p>My prob...
php jquery
[2, 5]
1,279,586
1,279,587
Jquery PHP media upload library
<p>Strange trouble I want to upload image via ajax which many plugin does but none support textarea to write caption. As i want to assign a caption to every image ,how do my new learning task makes it different is i want user to be able to put up caption whilst image is uploading.</p> <p>Do any one know of such plugin...
php jquery
[2, 5]
1,760,886
1,760,887
Current Page HTML output using c#
<p>I am working in an asp.net website. I need to get the current page HTML output in the Page Load event. I tried the following code. But I am not getting any output, it executes continuously.</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { Http(Request.Url.ToString()); } public void Htt...
c# asp.net
[0, 9]
4,372,494
4,372,495
Get value attribute of the clicked checkbox via JQuery
<p>I have got this <code>checkbox</code> which has value <strong>1</strong>.</p> <pre><code>&lt;input type="checkbox" name="option_1" id="checkbox_1" value="1"&gt; </code></pre> <p>Also I use this method to make checked/unchecked it. </p> <pre><code>$('input[id^="checkbox_"]').not('#checkbox_all').click(function () ...
javascript jquery
[3, 5]
1,736,833
1,736,834
jQuery Add Class on Click but only allowed once.
<p>Here is what I have so far: <img src="http://i.stack.imgur.com/8WC1d.png" alt="enter image description here"></p> <p><strong>Javascript:</strong></p> <pre><code>$(document).ready(function() { $(".thumb_wrapper").click(function() { $(this).addClass("active"); }); }); </code></pre> <p>So this is wor...
javascript jquery
[3, 5]
1,404,593
1,404,594
jquery select elements from a given selector
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4502533/jquery-method-to-select-a-subset-and-also-its-inverse">jQuery method to select a subset and also its inverse?</a> </p> </blockquote> <p>given this javascript code </p> <pre><code>var radio_buttons = $('...
javascript jquery
[3, 5]
4,347,064
4,347,065
how to access parent window object using jquery?
<p>How to acess parent window object using jquery?</p> <p>This is my Parent window variable , I want to set its value after closing child window .</p> <pre><code>$('#serverMsg').html('some text here'); </code></pre>
javascript jquery
[3, 5]
2,839,367
2,839,368
How to add number of days to today's date?
<p>I need to be able to add 1, 2 , 5 or 10 days to today's date using jQuery.</p>
javascript jquery
[3, 5]
3,894,682
3,894,683
jQuery: set selected value of dropdown list?
<p>What's wrong with this code? <a href="http://jsfiddle.net/x3UyB/1/">http://jsfiddle.net/x3UyB/1/</a></p> <pre><code>$(document).ready(function() { $("#routetype").val('quietest'); )}; &lt;select id="routetype" name="routetype"&gt; &lt;option value="fastest"&gt;Fastest&lt;/option&gt; &lt;option selected=...
javascript jquery
[3, 5]
390,221
390,222
how to add a div and apply a style to it in jquery
<p>the code is like this:</p> <pre><code> &lt;div id="comments"&gt; &lt;h2&gt;comments list&lt;/h2&gt; &lt;div class="clear-block"&gt;....&lt;/div&gt; &lt;div class="clear-block"&gt;....&lt;/div&gt; &lt;div class="clear-block"&gt;....&lt;/div&gt; &lt;div class="indented"&gt;....&lt;/div&gt; // thi...
javascript jquery
[3, 5]
2,882,747
2,882,748
What is the best way to call Java code from Python?
<p>I have a Java class library (3rd party, proprietary) and I want my python script to call its functions. I already have java code that uses this library. What is the best way to achieve this?</p>
java python
[1, 7]
4,777,578
4,777,579
Logout on Backward
<p>I want the page to sign out automatically if the user accessed the page from back the button.</p> <p>below is my code:</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { Label1.Visible = false; try { if (!IsPostBack) { TxtLogin.Focus(); Sessi...
c# asp.net
[0, 9]
3,079,260
3,079,261
Off-canvas / viewport navigation slide in with jQuery
<p>I am trying to make an off-canvas navigation that slides in from the left to take up 20% of the page while the content slides to the left ( some of it will be off canvas ) taking up 80% of the page. This has been seen in Google's mobile site and Facebook's mobile app.</p> <p>Here is a version using CSS3 Transitions...
javascript jquery
[3, 5]
5,983,507
5,983,508
blueooth barcode getInputStream()
<p>im using a blueooth barcode reader to deliver text to an edit text</p> <p>the problem is that it cuts the barcode text for about half the time and delievers me an incomplete text</p> <p>i am using the class "BluetoothSocket" this is my reading code:</p> <pre><code>int bytes = socket.getInputStream().read(buffer);...
java android
[1, 4]
684,215
684,216
Detect when an alert box is OK'ed and/or closed
<p>Basically as the title says.</p> <p>How can I detect when an alert box is OK'ed and/or closed?</p>
javascript jquery
[3, 5]
19,562
19,563
How to call methods
<p>I have few js files in my project with this structure:</p> <pre><code>(function (window, $) { var reload = function (force) { /* implementation here */ }; //more variables are here, the same construction as above })(this, $); </code></pre> <p>Are more such files, for each part (page) of the website there i...
javascript jquery
[3, 5]
5,724,703
5,724,704
java script is not working
<p>i am comparing password and confirm password through java script.my code-</p> <pre><code>function validate_form(thisform) { with (thisform) { if (validate_required(password,"&lt;b&gt;Error: &lt;/b&gt;Password must be filled out!")==false) {password.focus();return false;} else if (validate_required(...
php javascript
[2, 3]
430,139
430,140
advice on how to fix the prev and next buttons of content slider
<p>I'm trying to add in previous and next buttons to my content slider but seem to be having problems, what I would really like to do is move the $slideCtn left or right by the width slideWidth each time the previous or next button is clicked but i'm unsure how to increment each click by the value of slideWidth. I've t...
javascript jquery
[3, 5]
3,936,517
3,936,518
How to set position of element equals to position of another element?
<p>The simple question. How to set position of element equals to position of another element by jquery or javascript?</p> <p>The following code doesn't work:</p> <pre><code>$('#credit_tip').css('top', $('.credit').position().top); $('#credit_tip').css('left', $('.credit').position().left); </code></pre>
javascript jquery
[3, 5]
4,860,070
4,860,071
How to return a value from a nested and anonymous function?
<p>I have this JS code:</p> <pre><code>function paging() { $('.paging li').click(function(e) { $('.paging li a').removeClass("active"); $(this).find('a').addClass("active"); $('#img-grp-wrap img').hide(); var indexer = $(this).index(); $('#img-grp-wrap img:eq('+indexer+')...
javascript jquery
[3, 5]
5,550,497
5,550,498
Recompiling Android Launcher2 (Gingerbread)
<p>I'm attempting to recompile the Launcher2 (Gingerbread) application, so that i can modify it.</p> <p>However, I get a fair few errors (120ish), namely:</p> <p>mLeft, mTop, mBottom, mRight, mParent, mContext cannot be resolved to a variable.</p> <p>These come from (what I can see anyway), private members of the "T...
java android
[1, 4]
740,049
740,050
Data binding in gridview column using eval
<p>I hava grid containing a column for displaying countrynames. I need to display value in that column as contrycode-first 10 letters of country name (in-India) .I tried it using Eval functions with in the item template:</p> <pre><code>&lt;asp:TemplateField&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID="CountryNam...
c# asp.net
[0, 9]
5,252,442
5,252,443
To delay javascript function call using jquery
<p><strong>CODES:</strong></p> <pre><code> $().ready(function(){ function sample() { alert("This is sample function"); } $("#button").click(function(){ t=setTimeout("sample()",2000); }); }); </code></pre> <p><strong>HTML:</strong></p> <pre><code>&lt;input type="button" name="b...
javascript jquery
[3, 5]
5,578,781
5,578,782
How can I make a box hide when mouse hovers other element
<p>Im making a webpage and at the moment it has a full screen background image with an overlaying div containing all the page text content slightly off center an about 500px wide so the image is visible behind it. I'd like to be able to hover the mouse over the background image which would cause the text box to close c...
javascript jquery
[3, 5]
5,082,422
5,082,423
How to get an array in asp (Server side) to javascript?
<p>Hi i have float array in server side i want to take this array to javascript how do i do this?</p> <p>I'm using c# </p>
c# javascript asp.net
[0, 3, 9]
2,982,469
2,982,470
Pre load images from an ajax request before displaying them?
<p>I'm using jQuery to load html content which contains images, the problem is that i don't want the effect of blinking on images due to loading, to achieve that i need to pre load images inside the response body before inserting it to guarantee a smooth update.</p> <p>Current Code:</p> <pre><code>$.ajax({ url: 'hell...
javascript jquery
[3, 5]
1,635,743
1,635,744
Javascript multidimensioned isset()
<p>When running:</p> <pre><code>if (data.custaccount.webaddress) { alert('found it'); } </code></pre> <p>I get the error </p> <pre><code>data.custaccount is undefined </code></pre> <p>The only way i can get around it seems to be with multiple IFs like so:</p> <pre><code>if (undefined != data &amp;&amp; undefine...
javascript jquery
[3, 5]
5,972,130
5,972,131
Check the time stored in the DB, then make sure its 15 min later before running a update task
<p>I would like to stop people from constantly syncing/updating items in the DB as this could cause potential problems. I have a time the last sync/update occured which is stored in the DB. What I need to do is disable the user from initiating another update/sync until 15 minutes has passed since the last update/sync...
c# asp.net
[0, 9]
3,457,337
3,457,338
Using jQuery to perform .load on originating page div, from floatbox popup
<p>I have 3 pages, we'll call them Page A, B, &amp; C.</p> <p>On Page A, Page C loads into a div. Also on Page A, there's a link-click that opens Page B with Floatbox (like a popup).</p> <p>On Page B, there's an onClick function that should reload Page C into the div that is located on page A (underneath the floatbox...
javascript jquery
[3, 5]
912,061
912,062
iphone apns sending push notification in different languages with voice
<p>i have studied and implemented Ray wenderlich's awesome tutorials on apns, and i am using this php script on server side</p> <p><a href="https://github.com/sebastianborggrewe/PHP-Apple-Push-Notification-Server" rel="nofollow">https://github.com/sebastianborggrewe/PHP-Apple-Push-Notification-Server</a></p> <p>every...
php iphone
[2, 8]
5,338,689
5,338,690
File Upload for asp.net in c#
<p>I have been working on an image/file uploader that stores an image to a virtual directory with MapPath or to a database. I have been using if statements for the button click event to check the file and attempt to save but I have not been successful.</p> <pre><code>protected void Button1_Click(object sender, EventAr...
c# asp.net
[0, 9]
5,557,474
5,557,475
hash change and save element position
<p>I'm looking for a simple way of having the hash change and to be able to save an element position. By looking at all the examples around are in regards of tabs systems, but I only really need: "on a click of this link, save this element at this position". Following a quick and simple logic:</p> <p>start addres bar ...
javascript jquery
[3, 5]
3,356,781
3,356,782
local Javascript - write to local file
<p>I have some javascript code loaded from a local html file (without going through a webserver).. i.e., opened using <code>file://</code></p> <p>Is there any way the javascript in this file can be used to write to a local file?</p> <p>I know that cross-site restrictions do not allow lot of things in javascript, but ...
javascript jquery
[3, 5]
4,091,785
4,091,786
Different events when onclick tabs
<p>Hi Guys I have created a tabs by jquery and i want to display different data from database at each tab how can i do that knowing that it is the same container and same data but with different conditions hope to find an answer soon And i am using php and javascript Thanks </p>
php javascript jquery
[2, 3, 5]
1,162,338
1,162,339
Converting image to text using ocr in c# asp.net
<p>I am trying to convert a image to text using OCR library with the source code provided on below link</p> <p><a href="http://www.codeproject.com/Articles/41709/How-To-Use-Office-2007-OCR-Using-C" rel="nofollow">Converting image to text using ocr</a></p> <p>But i get the below annoying exception every time i do</p> ...
c# asp.net
[0, 9]
4,830,701
4,830,702
How to show human-readable "time ago"
<p>My user last logged in at 15:50:09 Wednesday, January 25, 2012 IST how can i show it as "10 minutes ago". Is there any js?</p>
javascript jquery
[3, 5]
4,014,743
4,014,744
dropdownlist custom databinding
<p>DropDownList inside Gridview.</p> <p>Database Schema: </p> <pre><code>Restaurants Menus Products RestaurantID MenuID ProductID RestaurantName MenuName ProductName RestaurantID MenuID </code></pre> <p>it doesnt work with this:</p> <pre><code>&lt;as...
c# asp.net
[0, 9]
1,699,558
1,699,559
javascript: Swap image & onClick
<pre><code>&lt;img src="logo.jpg" class="myImage" alt="Logotyp" /&gt; </code></pre> <p>This is my javascript code:</p> <pre class="lang-js prettyprint-override"><code>$(function() { var windowWidth = $(window).width(); if (windowWidth &lt;= 480) { $(".myImage").attr("src", "load.jpg"); } }); </cod...
javascript jquery
[3, 5]
325,782
325,783
Intent problem, return value (Android)
<p>I have an application that open an other class using intent : </p> <pre> private void createRepository(){ Intent j = new Intent(this, Repository.class); startActivityForResult(j, ACTIVITY_CREATE); } </pre> <p>In Repository.class we have the <strong>onActivityResult</strong> method :</p> <pre> ...
java android
[1, 4]
2,250,514
2,250,515
Should C# or C++ be chosen for learning Games Programming (consoles)?
<p>I've basic game programming knowledge in c and c++. I'm learning c# nowadays. If I want to make a career in console games programming, which one I should use to proceed? I've noticed that a lot of game companies are using C++/C (probably because of legacy reasons). Also probably C++ enjoys more number of supported l...
c# c++
[0, 6]
5,444,948
5,444,949
Is there any method to escape '&gt;' to '>' in JavaScript?
<p>i want to escape some HTML in JavaScript. How can I do that?</p>
javascript jquery
[3, 5]
1,404,422
1,404,423
Current selection of tab selected in tabcontainer when page load or refresh
<p>When page refresh tabcontainer of tab not staying current selection of tab.I have 3 tabs.I select tab2,when page load it goes to tab1.My current page name is Customer.aspx.This page automatically refresh every 60sec.so i wrote coding </p> <pre><code> $(document).ready(function () { window.setInterval(yourf...
javascript jquery asp.net
[3, 5, 9]
4,290,020
4,290,021
Max return parameter limit for HtmlPage.Window.Invoke method
<p>What could be the maximum limit of string values return from the following code?</p> <p>is there is any limit on that application? </p> <p>string o = (String)HtmlPage.Window.Invoke("CallMe", "data here!!");</p>
javascript asp.net
[3, 9]
2,906,435
2,906,436
How to access a method by another method?
<p>I was watching thenewboston Android tutorials and I got lost in this line of code:</p> <pre><code>getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); </code></pre> <p>I think <code>getWindow()</code> and <code>setFlags()</code> are a method, but why they ca...
java android
[1, 4]
4,460,175
4,460,176
Counting the number div loaded from external php file
<p>I have two php files, child.php and parent.php. Child.php generates div. Now, the parent.php calls child.php to be loaded in <code>&lt;div id='divContainer'&gt;</code>. Now, I need to count the div inside the divContainer. Is it possible? I tried something like this: </p> <pre><code>$(document).ready(function (...
javascript jquery
[3, 5]
4,775,925
4,775,926
Remove last line from string
<p>How do I remove the last line from a string, if I dont know how big the string will be?</p> <pre><code>var tempHTML = content.document.body.innerHTML; var HTMLWithoutLastLine = RemoveLastLine(tempHTML); function RemoveLastLine(var x) { // code } </code></pre>
javascript jquery
[3, 5]
3,226,108
3,226,109
Detecting referral url
<p>I can't detect referral url if user type url directly to browser or if he has some anti-virus or firewall which removes referral url. Is it possible to detect when user typed url directly in browser?</p>
php asp.net
[2, 9]
4,691,191
4,691,192
Get the largest value from the array in JS or jQuery
<p>Using flow chart lib I’m plotting a graph. Below is the <code>x</code> and <code>y</code> coordinates of the graph as an array.</p> <pre><code>var plottingPoints = [[0, 3], [4, 8], [8, 5], [9, 23], [10, 2]]; </code></pre> <p>I just need to pick largest value of the <code>y</code> coordinate (ie 23). Please need s...
javascript jquery
[3, 5]
2,758,261
2,758,262
Android 2.3X kills Apps into the Background
<p>I always used Android 2.2 for my Apps. But currently I upgraded to Android 2.3.X Gingerbread. So if I start my App and go back to the android "desktop", the app is kill by 3-4 Minutes.</p> <p>I think it will be killed after some minutes inactivity, but I need to run it in background to read some mobile status. </p>...
java android
[1, 4]
1,595,442
1,595,443
Delay execution of jquery error function
<p>I use the error function below to hide external images which do not seem to load. However images are hidden very easily and I think it is because the function executes to fast. Is there a way in Jquery to delay the function two seconds?</p> <pre><code>$(".display li img").error(function () { $(this).parent().p...
javascript jquery
[3, 5]
1,817,930
1,817,931
javascript alert not working if i use php redirect?
<p>i have code written something like this.</p> <pre><code> if(!isset($cid)) { echo "&lt;script type=\"text/javascript\"&gt;alert('OOps, Something went wrong, please make sure you select country from the list')&lt;/script&gt;"; header('Location:location-manager.php?view=countries'); exit...
php javascript
[2, 3]
4,024,838
4,024,839
How can I position an element next to user text selection?
<p>I need to position an absolute positioned button<br /> next to user's selected text. just like what IE8 does internally.</p> <p>I'm binding a <strong>jquery event mouseup</strong> to the Document, and get<br/> the selected text. but I'm currently out of ideas how to know where the<br/> actual selection is positione...
javascript jquery
[3, 5]
2,378,383
2,378,384
To get path name with url values in jquery
<p>This is an example URL.</p> <pre> http://stackoverflow.com/questions/ask?a=1&b=2 </pre> <p><strong>question</strong>: I need to fetch path name along with url values like this<pre>/questions/ask?a=1&amp;b=2</pre> I need jquery or javascript solution</p>
javascript jquery
[3, 5]
616,128
616,129
get uploaded image width & height for loding actual image size
<p>how i get uploaded image height and width,for display in it's original size.</p>
php javascript
[2, 3]
3,752,963
3,752,964
dynamically display products in two columns
<p>I have a jsfiddle <a href="http://jsfiddle.net/K5PGp/" rel="nofollow">http://jsfiddle.net/K5PGp/</a> that I am trying to modify so that it displays the "products" in two columns even if the browser is IE 8.</p> <p>For example, if all 8 products are displayed, it should look like this:</p> <h2>one two</h2> <h2...
javascript jquery
[3, 5]
2,196,329
2,196,330
gridview on edit event , on update event?
<p>I would like to know how I can access the edit and the update button from <code>GridView</code>?<br> I mean, if I click the edit button from the website in the <code>GridView</code>, I want to get some values from the tables.<br> For example: the <code>button1</code> event.</p>
c# asp.net
[0, 9]
1,756,750
1,756,751
Click Once For All Elements In Same Class
<p>I am trying to write code that will add another row to a form automatically. It should only do this once for each form input with the class lastName.</p> <p>The below code works. But it executes more than once. I want the code to only execute once for each form input with the class lastName. I am inexperienced with...
javascript jquery
[3, 5]
131,728
131,729
How do I find what class of anchor tag has using javascript/jquery?
<p>I have HTML like this:</p> <pre><code>&lt;div id="signbtn"&gt; &lt;a class="btnsignin" href="signin.php"&gt;Admin&lt;/a&gt; &lt;/div&gt; </code></pre> <p>How do I find the class of the anchor tag embedded inside the <code>div</code> with <code>id="signbtn"</code>.</p> <p>I need this to be able to assign a dif...
javascript jquery
[3, 5]
2,643,603
2,643,604
Clip text in C# after the third word
<p>I have a text(title) which has values like "Zesty Bean Bites South of the Border ". I need to add ... after the 3rd word in title .How can we achieve this ? i tried using Substring() method but it wont split by words ? </p>
c# asp.net
[0, 9]
4,343,745
4,343,746
Count Number of days between 2 dates in javascript
<p>Please help me get the number of days between today's date and some other date.. Here is my <a href="http://jsfiddle.net/vQnHz/" rel="nofollow">example</a></p> <p>It gives me <code>NaN</code></p> <p>Here is what I came up with. My <a href="http://jsfiddle.net/vQnHz/3/" rel="nofollow">demo</a></p> <pre><code>var c...
javascript jquery
[3, 5]
4,564,509
4,564,510
big Ajax problem .. can't figure it out
<p>Hy, </p> <p>I have a live username validation using ajax :</p> <pre><code>&lt;td id="user_process_live"&gt;&lt;input type="text" id="user_live_ver" name="user" /&gt;&lt;/td&gt; </code></pre> <p>abnd the following java :</p> <pre><code> $("input#user_live_ver").blur(function() { var username=$(this).val(); ...
php jquery
[2, 5]
697,632
697,633
Dynamically updating label text on textbox changes?
<p>I want to display the text entered in a textbox on a label character by character.</p> <p>I.e, if I enter a character in textbox, I need to display that character in the label. Up to the length of the textbox, this procedure has to done for the label also.</p> <p>How can i achieve this?</p>
c# asp.net javascript
[0, 9, 3]
861,834
861,835
jquery post on document ready
<p>All i want is, a data will pass into this php file: check.php and this php file will pass data into that function when the page is ready. this is just an expirement.</p> <p>ok I have this code:</p> <pre><code>$(document).ready(function() { $.post("check.php", { name: "log" }, function(data) { ...
php javascript jquery
[2, 3, 5]
5,246,241
5,246,242
How to access the values of a dropdownlist bound using jquery from server side
<p>I have created a cascading dropdownlist using jquery and a webservice in my asp.net website. I have changed the <strong>EnableEventValidation="false"</strong>. I am not getting the selected value which i am binding using jquery on save event.</p> <p>This is the code I am using to select the value.</p> <pre><code>i...
jquery asp.net
[5, 9]
3,482,194
3,482,195
Change margin-top position of an fixed positioned element after reaching the bottom of the page?
<p>I need to change top-margin of an fixed div element from margin-top: 200px to margin top 0px after reaching the bottom of the page (or 200px from bottom) using vertical scrollbar.</p> <p>And toggle return back if scrolling back to the top.</p> <p>I guess some javascript/jQuery code code do that.</p> <p>my html/la...
javascript jquery
[3, 5]
3,523,676
3,523,677
Popup window unload issue
<p>I have one popup window, when user opens and closes popup window simultaneously, it is giving script error. Below code is used in popup window.</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;script src="../../StaticContent/Scripts/jquery-1.7.2.min.js" type="text/javascript"&gt;&lt;/script&gt; ...
javascript jquery
[3, 5]
5,492,874
5,492,875
why this is output as the following?
<pre><code>var obj = [ "one", "two", "three"]; $.each(obj, function() { console.log(this); }); </code></pre> <p>The output I get is</p> <pre><code>{ '0': 'o', '1': 'n', '2': 'e' } { '0': 't', '1': 'w', '2': 'o' } { '0': 't', '1': 'h', '2': 'r', '3': 'e', '4': 'e' } </code></pre> <p>I suppose to get "one" "two" "...
javascript jquery
[3, 5]
4,994,291
4,994,292
How to determine size and position of span or relatively positioned element with Javascript/jQuery?
<p>For example, I want to draw submenu while its parent item is a <code>&lt;span&gt;</code> element. Can I determine the <code>&lt;span&gt;</code>'s dimensions and location on the fly?</p>
javascript jquery
[3, 5]
5,227,252
5,227,253
Tiles layout (bin packing)
<p>Situation: I have set of images. Each image has some level of priority. I want them to be distributed like this:</p> <p><a href="http://appstouse.com/wp-content/uploads/2011/10/Grid-Size-File-Manager-Android12.png" rel="nofollow">http://appstouse.com/wp-content/uploads/2011/10/Grid-Size-File-Manager-Android12.png</...
java android
[1, 4]