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,948,494 | 4,948,495 | Call javascript dynamic method in object | <p>If I create a Class with two method like following:</p>
<pre><code>var Car = function() {}
Car.prototype = {
run: function() {
alert('run');
},
stop: function() {
alert('stop');
}
}
</code></pre>
<p>And when the DOM is ready will call test() method,<br />
and this test() method will... | javascript jquery | [3, 5] |
2,219,290 | 2,219,291 | tokeninput jquery plugin - preventDuplicates not working | <p>I am using jquery plugin Tokeninput. I need to prevent user from entering duplicate values, the Js code is as follows:</p>
<pre><code>$(document).ready(function () {
// Configure Tags
$('#Tags').tokenInput(tagSource(),
{
prePopulate: selectedTags(),
theme: "facebook",
propertyTo... | javascript jquery | [3, 5] |
1,287,566 | 1,287,567 | How to use 'Curl' in php to send data to android | <p>I have a listener in an android application to detect messages sent by the server php</p>
<pre><code> public class Threa implements Runnable
{
public static final String SERVERIP = "192.168.1.4";
public static final int SERVERPORT =6060 ; //4444
public BufferedReader in;
public int x=0;
public... | php android | [2, 4] |
4,276,388 | 4,276,389 | Is there any reason to use the 'return' in the second line in the method ? | <p>I have this code that we can write in two ways </p>
<p><strong>First Way</strong></p>
<pre><code>void func(int val)
{
if(val == 0)
return;
// Do something ...
}
</code></pre>
<p><strong>Second Way</strong></p>
<pre><code>void func(int val)
{
if(val != 0)
{
// Do something... | c# c++ | [0, 6] |
118,500 | 118,501 | Convert imageUrl to byte[] for caching | <p>I have an image that I capture from an ip camera and post it on a webpage to an image tag. Now I would like to convert to access the picture so that I can save it to our cache blob. Here is my code:</p>
<p>asp tag:</p>
<pre><code><asp:Image ID="imgPhoto" runat="server" ImageAlign="Middle" />
</code></pre>
<... | c# asp.net | [0, 9] |
5,698,081 | 5,698,082 | Check if value exists in JavaScript object | <p>How would I check in my array of objects, if a specific item exists (in my case MachineId with id 2)?</p>
<pre><code>[{"MachineID":"1","SiteID":"20"},{"MachineID":"2","SiteID":"20"},{"MachineID":"3","SiteID":"20"},{"MachineID":"4","SiteID":"20"}]
</code></pre>
<p>I tried this:</p>
<pre><code>if (index instanceof ... | javascript jquery | [3, 5] |
5,137,332 | 5,137,333 | jquery, undefined variable problem, how to? | <p>i have this situation:</p>
<pre><code><div class="cont_picture">
<?php echo "<a id=\"mine_click\" href=\"#\" >a test</a>"; ?>
</div>
<div id="number"><?php echo $number; ?></div>
</code></pre>
<p>this will give me something like: <a href="http://www.google.com" rel="... | php javascript jquery | [2, 3, 5] |
4,125,970 | 4,125,971 | How to get date between start date and end date? (excluding date on weekend) | <p>Hi want to get a date list between start date and end date. For example start date is 27-08-2010 and end date is 31-08-2010. So the date list is 27-08-2010,30-08-2010 and 31-08-2010. 29-08-2010 and 30-08-2010 will be ignore because it is in the weekend. I attach the picture for more clearer explanation. How to achie... | javascript jquery | [3, 5] |
5,486,407 | 5,486,408 | How to get alerts at client side | <p>I want to set an alert service for my website users for there tasks.</p>
<p>These alerts are like Messenger alerts. My web site is in asp.net C#.</p>
<p>Here is the scenario I want to set for alerts:</p>
<p>I retrieve the alert messages for users through a webservice
and I want utility which displays alerts for ... | c# asp.net | [0, 9] |
5,152,022 | 5,152,023 | Export to pdf AND generate a pdf file in asp.net | <p>I have to create PDF files in 2 ways:</p>
<ul>
<li><p>The first way is just to convert the html to PDF. It can be done in server-side or client-side (javascript?). In this case, I'd like to convert the html with all css styles. This is just to user save the page.</p></li>
<li><p>The second ways is generate a PDF re... | c# asp.net | [0, 9] |
2,950,024 | 2,950,025 | $.slideToggle() & $.hover() animation queue issue | <p>I'm trying to set up a pretty basic hover animation in jQuery. Mouse over a div and the major content is slid down, mouse up and it slides up.</p>
<pre><code><script type="text/javascript">
$(function () {
$('.listItem').hover(function () {
$(this).find('.errorData').slideToggle('slow'... | javascript jquery | [3, 5] |
4,480,440 | 4,480,441 | What would be the right syntax in jQuery | <p>I have a jquery function which on submit event is generating an url.If one the parameter is not defined, adding to url should be skipped </p>
<pre><code> var category =$("#prod_category").val();
var group =$("#prod_group")
window.location.href = "/page/" +
... | javascript jquery | [3, 5] |
2,834,679 | 2,834,680 | Div Slider Slideshow? | <p>I am trying to create a slideshow similar to the one on <a href="http://lifeandtimes.com" rel="nofollow">lifeandtimes.com</a>, and would like to know what is the best method to do so. I have tried <a href="http://www.smoothdivscroll.com" rel="nofollow">www.smoothdivscroll.com</a> and many other solutions to no avail... | javascript jquery | [3, 5] |
1,832,161 | 1,832,162 | Get a numeric value from specific string using javascipt/jquery | <p>I have a grid and I am getting selected row's html by its id using JavaScript.</p>
<pre><code>var parentRow1 = document.getElementById('__' + parentrowid).innerHTML;
</code></pre>
<p>this will return me the following html:</p>
<pre><code><td class="rgExpandCol">
<img title="Expand" onclick="$find(&q... | javascript jquery | [3, 5] |
1,522,458 | 1,522,459 | How do I implement this pop up box that displays when hovered over "Shopping Cart" link in this website | <p>I want exactly like this...not a simple box but the one with shadow borders like this one..I have been googling but all I came across is Slide down boxes and tool tips..that's not what I want..How do I implement the one in this website..oh and this box's got HTML stuff in it...like buttons and all</p>
<p>Is there a... | javascript asp.net jquery | [3, 9, 5] |
4,202,334 | 4,202,335 | Why @Override needed in java or android? | <p>In java or Android there are @Override annotations. What does it mean? I found that it is used when method is from subclass or inherited interface's method, I want to know further and other is @SuppressWarnings its also Anonation, if yes how many annonation used by java and for which purpose.</p>
| java android | [1, 4] |
1,141,223 | 1,141,224 | setInterval( ) -- unexpected identifier - but it works once | <p>Why do I get <code>Uncaught SyntaxError: Unexpected identifier</code> if it works once?</p>
<p>There are a bunch of these on <a href="http://stackoverflow.com/search?q=unexpected%20identifier">StackOverflow</a>. The punchline is usually a typo somewhere in the script.</p>
<p>It works once, then it gives 1 error m... | javascript jquery | [3, 5] |
3,460,529 | 3,460,530 | Android Database Creation Problems MVC Pattern | <p>Hi sorry i'm new in this android developing and i'm doing a sqlite project. So i wanted to create the database once the application is initiated but it doesn't do it here is the application: <a href="http://www.mediafire.com/?6oalfamfes2b5fy" rel="nofollow">http://www.mediafire.com/?6oalfamfes2b5fy</a> .
I work like... | java android | [1, 4] |
5,213,276 | 5,213,277 | Can I restrict a ViewFlipper from flipping until an AsyncTask has been performed? | <p>My application has a <code>ViewFlipper</code> with <code>3 ViewGroups</code> in it. Each <code>ViewGroup interaction</code> is dependent on data from a database. I'm using an AsyncTask to read from a database and return a Cursor when it's done. Before the AsyncTask is executed, I just want to display a single View i... | java android | [1, 4] |
5,147,778 | 5,147,779 | How to return status when using Jquery's .load() function? | <p>I have this action in my controller</p>
<pre><code>public function actionInsertComment()
{
if (isset($_POST['liga']))
{
if(condition)
{
$status = "success";
}
else
{
$status = "error";
... | php jquery | [2, 5] |
3,583,422 | 3,583,423 | Overriding instantiateItem(...) won't compile | <p>I am trying to use a PageAdapter. I found out that <code>public Object instantiateItem( View pager, int position )</code> has been deprecated. So I am trying up update but ran into a problem. The new definition changes the deceration to <code>public Object instantiateItem( ViewPager pager, int position )</code>, whe... | java android | [1, 4] |
5,116,974 | 5,116,975 | Strange IE7 quirk | <p>I am getting the following error in <code>IE9</code> when in <code>IE7</code> mode. Using a small counting script:</p>
<blockquote>
<p>SCRIPT1028: Expected identifier, string or number</p>
</blockquote>
<p><em><strong>Code</em></strong></p>
<pre><code>$.fn.countTo.defaults = {
from: 0, // the number the el... | javascript jquery | [3, 5] |
2,883,338 | 2,883,339 | "hasClass" with javascript? or site with jquery to javascript translation? | <p>How do you do jQuery's <code>hasClass</code> with plain ol' javascript? E.g., <code><body class="thatClass" /></code> What's the javascript way to ask if <code>body</code> has "thatClass"?</p>
<p><em>Also, anyone know of a site that explains that gives javascript versions of many jQuery functions? I often ... | javascript jquery | [3, 5] |
5,187,264 | 5,187,265 | Most Accurate jQuery Transition Time Translation Delay | <p>So; I've heard that a fair translation for jQuery transition delay time could be 1000 = 1 Second.</p>
<p><strong>Is this the most accurate / approximate way to translate?</strong></p>
<p><em>EG</em>: Looking at the script below; I am trying to translate the delays / animations to the most approximate in seconds / ... | javascript jquery | [3, 5] |
5,650,892 | 5,650,893 | jQuery $.get from local directory producing different behaviour in IE vs FF, Chrome | <p>I have the following simple jQuery:</p>
<pre><code> $.get('Data.csv', function(data) {
alert(data);
});
</code></pre>
<p><code>Data.csv</code> is stored in the same folder as the html file which accesses it.</p>
<p>If I run this in all browsers when the url is a domain (i.e. www.mysite.com/path/to/file), t... | javascript jquery | [3, 5] |
4,917,638 | 4,917,639 | Merge and bind two lists to a gridview | <p>I have two list of different objects :</p>
<pre><code>List<Report>
List<Newsletter>
</code></pre>
<p>each having a 'created date' property. I need to sort the created date of both lists in descending order and bind it to a gridview. </p>
<p>How can this be done, as i can provide only one datasource? <... | c# asp.net | [0, 9] |
5,850,002 | 5,850,003 | Save a Javascript file as .php | <p>I have done this before to get data which needed to be looped into the javascript but this time it won't work. It all works fine when it is internal on the <code>index.php</code> file but doesn't work when it's an external file.</p>
<p>This is the code that is breaking it</p>
<pre><code>$('#filter').append('Select... | php jquery | [2, 5] |
552,354 | 552,355 | How to maintain JavaScript function variable states (values) between calls? | <p>I am looking for getters and setters functionality but cannot rely on <code>__defineGetter__</code> and <code>__defineSetter__</code> yet. So how does one maintain a function variable's value between function calls?</p>
<p>I tried the obvious, but myvar is always undefined at the start of the function:</p>
<pre><... | javascript jquery | [3, 5] |
2,731,660 | 2,731,661 | OnClick event - check which is the sender | <p>Is there a way to call one event every time when something on my page is clicked (whether a control or something else), and then in that function to check which is the sender?</p>
| javascript jquery | [3, 5] |
1,910,248 | 1,910,249 | Android: Reading wav file and displaying its values | <p>Hi i'm trying to read the data in a wav file so that i can plot it as a waveform. Following is the code that i have tried:</p>
<pre><code> try {
RandomAccessFile file = new RandomAccessFile(myFile,"r");
while(file.read()>-1){
byte b1 = (byte) file.read();
byte b2 = (byte) fil... | java android | [1, 4] |
2,840,571 | 2,840,572 | how to surround user selection in editable iframe | <p>I need to wrap user's selection within editable <code><iframe></code> in a <code><b></code> (or <code><span></code>) tags in IE. How can I do it? I create a range:</p>
<pre><code>rng = document.selection.createRange();
</code></pre>
<p>and can't understand what to do next.</p>
| javascript jquery | [3, 5] |
1,715,731 | 1,715,732 | Why is my Javascript not valid? | <p>Can anyone please help?<br>
I have a div with ID 'adpictureholder', to which I dynamically add (or remove) images.<br>
On Form submit I want to get SRC values of all these images within that DIV and put them to the value of one hidden input with ID 'piclinkslisttosubmit'. <br> The thing is that my current Javascri... | javascript jquery | [3, 5] |
545,964 | 545,965 | How to set document.getElementById(progressPanel.ID) in aspx.cs page | <p>I have javascript which sets the location of panel and javascript is below</p>
<pre><code>function ShowProgressPanel(progresspanel)
{
var progressPanelId = document.getElementById(progressPanel.ID);
alert(progressPanelId);
if (progressPanelId != null)
{
var height = Math.min(document.docum... | javascript asp.net | [3, 9] |
3,496,307 | 3,496,308 | How to call C++ functions/methods via JavaScript | <p>does anybody know how to call C++ functions or methods via JavaScript.
Need scripting like Lua/Python-C++ but with JavaScript.</p>
<p>Thanks in advance.</p>
| javascript c++ | [3, 6] |
3,004,295 | 3,004,296 | How to find the Vertical size of a window displaying a web page | <p>I have an ASP.NET Site that has a single Master Page. On one of my pages in this site I display a PDF file as the content of the page.</p>
<p>I need a way to know the size that I can make the PDF control so that I do not create a scroll bar for the webpage (the PDF control has it's own scroll bar).</p>
<p>I was a... | asp.net javascript | [9, 3] |
473,339 | 473,340 | Using Javascript/jQuery to crop image | <p>I have a page showing several thumbnail images. When the user mouseovers these images, a modal window showing the full image will appear.</p>
<p><strong>Problem:</strong> In order to save space, I want to just store 1 version (the original version) of the image on the server, and create the thumbnail "dynamically" ... | javascript jquery | [3, 5] |
4,918,195 | 4,918,196 | jQuery: how to refresh javascript value on select event? | <p>I have such code:</p>
<pre><code>var regions = [{'label': 'array', 'value': '1'}]; //default values
$("#auto1").select({
regions = jQuery.parseJSON( //updating process
$.ajax({
type: 'POST',
url: '/ajax/place/',
data: { country: value }
})
);
re... | javascript jquery | [3, 5] |
2,860,423 | 2,860,424 | Idiomatic way of calling a jQuery function on a Javascript object? | <p>Given a Javascript DOM object, what is the most idiomatic way of calling a jQuery function on it? Currently, I am using:</p>
<p><code>$('#' + object.id).someFunction()</code></p>
<p>However, this doesn't feel quite right. Isn't there a better way?</p>
| javascript jquery | [3, 5] |
2,534,713 | 2,534,714 | Trigger JavaScript Anchor Function (Without User Clicking on it) | <p>I have a page where users see this anchor...</p>
<pre><code><a href="javascript:launchSomething("1", "2", "1")">Test</a>
</code></pre>
<p>Is it possible to execute/call <code>launchSomething(.....)</code> function without having the user to click it? If the params were fixed values then I could just do... | javascript jquery | [3, 5] |
5,788,329 | 5,788,330 | Change the format of a date | <p>I submit a date through a form such as below</p>
<pre><code>2012-07-24 17:50
</code></pre>
<p>but on the result page I want to change it's format and echo it to </p>
<pre><code>Tuesday, 24 of July
</code></pre>
<p>How do I do this? Should I use PHP or JavaScript?</p>
| php javascript | [2, 3] |
4,896,948 | 4,896,949 | Unbind an element and add back after animation stops | <p>I am trying to <code>unbind</code> an element, an then <code>bind</code> it back after a page scroll animation completes:</p>
<pre><code>$(".trigger").click(function(){
$(".class1 a, .class2 a").unbind();
$('html, body').stop().animate({scrollTop: $('#container').offset().top}, 1000);
$(".class1 a, .class2 a"... | javascript jquery | [3, 5] |
4,815,880 | 4,815,881 | JQuery drop down bobs up and down continuously | <p>I am using jquery to hide/show an DIV on hover of an LI. When I do this the div appeared but pops up and down without stopping until I take my mouse off the LI.</p>
<pre><code>$(document).ready(function () {
$('li.menu_head').mouseover(function () {
$('div.newsadviceDrop').slideToggle('medium');
});
... | javascript jquery | [3, 5] |
380,555 | 380,556 | error with jquery offset | <p>I'm trying to get a div to appear underneath another div so that I can slide the top div down to reveal the appended second.</p>
<p>I'm pretty far off, but I keep getting an error that jquery's <code>[offset][1]</code> (which I'd like to use to get the position of the top div) is returning undefined. </p>
<p>Maybe... | javascript jquery | [3, 5] |
5,304,542 | 5,304,543 | Basic framework for private album using keys? | <p>I'm trying to implement a private album feature on my site and I'm looking for some basic framework. Are there any scripts available or frameworks to start with?</p>
<p>I've looked through Google but can't seem to find anything useful.</p>
<p>Basically all I want to do is let a user request access to another user... | php jquery | [2, 5] |
5,130,980 | 5,130,981 | Create intermediate element with jQuery | <p>I want to invoke a creation of div with certain class just below the invoke button, how can I do that most efficiently with jquery?</p>
| javascript jquery | [3, 5] |
5,220,070 | 5,220,071 | How can I detect how yellow an image is | <p>I want to ignore all other colours. I just want to count the colours between white and yellow(Bright yellow, Light yellow.. all the way to white). and then give a rating of how yellow a certain image is. is that possible?</p>
<p>I have been playing with <code>Bitmap.getPixel()</code> but I can't figure out how to i... | java android | [1, 4] |
764,282 | 764,283 | How to get copied text from memory without pasting? | <p>I got one requirement which is when the user copy any text the system should get the copied text from the memory into the program without require the user to paste it in a txtbox or similar control. I searched on the internet but I didn't get any information. can somebody suggest or provide some references so that I... | c# asp.net | [0, 9] |
3,501,496 | 3,501,497 | select a range of dom elements based on index | <p>I need to select a specific grange of jquery elements based on there index using <code>:eq()</code> (or something else if you have a better solution)</p>
<p>my html structure is the following:</p>
<pre><code><ul>
<li>slide0</li>
<li>slide1</li>
<li>slide2</li>
<... | javascript jquery | [3, 5] |
2,516,377 | 2,516,378 | Show hidden div (slide) when click on button (change text) | <p>I have a page where I want to hide some content (#hidden_content) as default. On this page there is a CSS button with text example "Show content".</p>
<p>When click on this button I want the div #hidden_content to show with a slide effect and at the same time the text on the button "Show content" will change to exa... | javascript jquery | [3, 5] |
593,404 | 593,405 | Android using data out of datepicker | <p>Im trying to get the Day / Month / Year from my datepicker. I have the problem that the Month en the day never is correct. I give you the code below. The month is correct but it fails when the month is december. The day is never correct.</p>
<pre><code> public class myOnDateChangedListener implements OnDateChang... | java android | [1, 4] |
1,343,094 | 1,343,095 | Calling a method in another class to convert an object to that class | <p>I was wondering about something very basic but that I haven't been able to figure out. I've read the similar questions, but they don't particularly answer my question.</p>
<p>Let's say I have a string. I want to convert it into a double. Now I see that there is a function known as parseDouble in java.lang.Double. H... | java android | [1, 4] |
3,130,335 | 3,130,336 | How to get Form Values from Javascript-added Checkboxes in ASP.NET? | <p>I am adding checkboxes to a by setting the innerHtml property as below.</p>
<pre><code>function ShowCheckbox(uid) {
document.getElementById("samplediv").innerHTML += "<input type='checkbox' value='on' name='box_" + uid + "' id='box_" + uid + "'/> Some Text Here";
}
</code></pre>
<p>This is on a .aspx pa... | javascript asp.net | [3, 9] |
642,719 | 642,720 | Java or Android | <p>I am using eclipse, and I have just tried making an android project instead of a java project. Things that I do in java don't work in android. Are they different programming languages?</p>
| java android | [1, 4] |
5,278,192 | 5,278,193 | Zooming an application | <p>I've one application in running successfully. I've installed this to my device (Samsung Galaxy SII) also. But, i can't view this application in zoom view. How can i view this? If possible means tell me how? Otherwise, tell the another way to proceed this? Thanks in Advance</p>
| java android | [1, 4] |
237,683 | 237,684 | How do you pass data between pages where the source data is in IN an asp:Content block? | <p>So I've noticed that PreviousPage and Request.Form don't work if my SOURCE page has the TextBox's and such within an asp:Content block (master pages)</p>
<p>Is there a workaround or am I not understanding something?</p>
<pre><code> <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inh... | c# asp.net | [0, 9] |
2,073,090 | 2,073,091 | Setting a time for flicker animation on img | <p>I'm using this code to make my logo flicker on my website. But It becomes annoying when it continues to flicker while browsing, how can I set a time to allow it to flicker for something like the first 15seconds on page load, then stops?</p>
<p><strong>JS code I'm using:</strong></p>
<pre><code>$(document).ready(
f... | javascript jquery | [3, 5] |
1,340,471 | 1,340,472 | Determining when the user has scrolled to the end of a DIV | <p>My page has a DIV, with overflow and I've placed two buttons on either side of the div to act as secondary scrolling methods.</p>
<p>When pressing the left button, the following script is run and seems to work perfectly:</p>
<pre><code> function slideLeft() {
if ($("#divfieldWidgets").scrollLeft() =... | javascript jquery | [3, 5] |
2,976,893 | 2,976,894 | Serialize string to standard URL-encoded notation | <p>I need serialize a string to a standard URL-encoded notation
my string has some blank spaces and parentheses: </p>
<pre><code>string = "( 3.141516, 3.1415), 3,1415";
</code></pre>
<p>and I need get it at serverside as a only value - var, how can I do that in order to sent it as a query string??? </p>
<p>Thanks in... | javascript jquery | [3, 5] |
4,082,466 | 4,082,467 | JQuery Condition If Else bug in else | <p>I am trying to hide a next button <code>div</code> until the input in it is populated so I've added this code:</p>
<pre><code><script>
$(document).ready(function () {
if ($('#myDiv').val().length == 0) {
$('#next_btn').hide();
} else {
$('#next_btn').show(); ... | javascript jquery | [3, 5] |
623,093 | 623,094 | Problem with Scrolling a list | <p>I've one application which is containing some item in List. I've successfully installed this into my device (Samsung Galaxy SII). In my emulator i can view the items by scrolling that. But, in my device it seems black shaded on the item. How can i reduce that? Is it possible? Thanks in advance.</p>
| java android | [1, 4] |
5,840,379 | 5,840,380 | Validation for Dropdown | <p>I have two dropdowns with same list populated from database . I want to validate where dropdown 1 value is not same as dropdown 2 .
Thanks
SmartDev</p>
| c# asp.net | [0, 9] |
2,521,155 | 2,521,156 | How to disable page validation when clicking previous in a wizardstep | <p>When I try to click the previous button in a wizard step on my page, it wont return to the previous page until all of the fields are valid. I have turned of CausesValidation. Is there an issue with this in a wizard? My code follows:</p>
<pre><code><StepNavigationTemplate>
<asp:Button ID="StepPrevio... | c# asp.net | [0, 9] |
4,004,749 | 4,004,750 | Send Values of the Checkboxes Groups | <p>I have interesting case. I have a page where I have groups of checkboxes created dynamically, I don't know their names before they're generated.</p>
<p>There might be name "type", "profile" and many more. There's possibility of displaying multiple groups at one time.</p>
<p>Do you have any idea how to send them vi... | javascript jquery | [3, 5] |
2,622,909 | 2,622,910 | jQuery plugin for timeout user and display lightbox alert warning | <p>I am looking fo ra jQuery plugin that does the following behaviour:
1. Find user inactivity for a period of 10 minutes.
2. After 10 minutes display an alert or lightbox message. I believe lightbox would be better.
3. After 5 more minutes, perform an action. </p>
<pre><code> My javascript... | javascript jquery | [3, 5] |
3,875,103 | 3,875,104 | What is the difference between $(document).ready(function() and $(function() ? | <p>So I know what this does:</p>
<pre><code>$(document).ready(function(){
// Your code here...
});
</code></pre>
<p>Now I have seen people doing this lately:</p>
<pre><code><script type="text/javascript">
$(function(){
// Your code here...
});
</script>
</code></pre>
<p>Are these two ways o... | javascript jquery | [3, 5] |
4,469,914 | 4,469,915 | Override all requests from javascript | <p>I have an asp.net application. I need to implement that every request to the server for a page will contain an additional parameter in query string. My idea was to capture all reqests in javascript and add this parameter.</p>
<p>I might use jQuery selector for every link and change it href and override jquery ajax ... | javascript jquery asp.net | [3, 5, 9] |
4,472,709 | 4,472,710 | jquery shortcut for multiple clicks | <p>well i am still new to js/programming.
can anyhow guide me on how can i optimize my code?
i am sure that there are multiple ways to write a small and fast code that does the same thing.</p>
<pre><code>$('.ourservices-content .left ul li:nth-child(1)').click(function(){
$('.our-services-content-box > ul.b... | javascript jquery | [3, 5] |
3,059,843 | 3,059,844 | How to discover and load one web application into another? | <p>I've been googling for a bit now, and maybe I'm not searching for the correct term. I want to have a single "shell" asp.net web application that is able to load/run other web applications (much like prism does with Silverlight xap files). However, I can't seem to find any verbage other than "sub projects", which r... | c# asp.net | [0, 9] |
973,419 | 973,420 | find() not working | <p>I'm creating a bunch of <code>li</code> elements dynamically </p>
<pre><code>$.each(data.attributes.listingImages, function (i, obj){
if(i == 1){
$('#js-carousel-menu').append('<li media class="active"><a media-frame><img class="js-carousel-item" src=" '+obj.thumbnail+ ' " /></a></li&g... | javascript jquery | [3, 5] |
2,995,726 | 2,995,727 | .Net - call client side and server side method on click of asp:LinkButton | <p>I have an asp:LinkButton which require following -<br>
- call jQuery to open link url in another tab of current browser<br>
- then call server side method to perform some logging stuff</p>
<p>Please guide me for a </p>
<ul>
<li><p>safe (which can help avoid having 'popup blocked' messages as far as possible), I ... | c# jquery | [0, 5] |
2,858,676 | 2,858,677 | What javascript event is tied to "waiting for localhost"? | <p>I want to wait until the "waiting for localhost" message in the browser goes away before running some function.</p>
<p>Is it </p>
<pre><code>$(document).ready(#myfunction)
or
$(window).load( #myfunction );
</code></pre>
<p>or is it something else?</p>
| javascript jquery | [3, 5] |
1,799,536 | 1,799,537 | display button only when page loads completely | <p>I have a button like this:</p>
<pre><code><input type="submit" id="product_197_submit_button" class="wpsc_buy_button" name="Buy" value="Add To Cart">
</code></pre>
<p>Now the thing is that if user clicks button before all scripts are loaded -> I get error in shopping cart. Is there a way to disable clicking ... | javascript jquery | [3, 5] |
1,140,141 | 1,140,142 | Most effective way to make jquery field validation | <p>what is the most effective way to make a jquery field validation? For example if field name is empty, it will add empty checkmark next to field? I understand, that PHP validation is needed, and I have it, so no worries about that.</p>
| javascript jquery | [3, 5] |
2,001,834 | 2,001,835 | Enabling close pop up similar to markers in Google maps | <p>I think my problem is fairly simple, however I am unable to figure it out. I want to close a note pop up with an "x" icon/div in the top right corner of the note. </p>
<p>Currently I have this as the code. The only solution to minimize the note is to double click on it, which obviously isn't a viable solution.</p>
... | javascript jquery | [3, 5] |
308,665 | 308,666 | What's the equivalent of Java's Thread.sleep() in Javascript? | <p>What's the equivalent of Java's Thread.sleep() in Javascript?</p>
| java javascript | [1, 3] |
2,352,010 | 2,352,011 | How to express jquery ajax call with only javascript? | <p>Can you help me convert this jquery to javascript? Thanks.</p>
<pre><code> <script>
$(document).ready(function() {
$("a.false").click(function(e) {
$(this).closest("tr.hide").hide("slow");
var main_id = this.title;
var display = "false";
... | javascript jquery | [3, 5] |
1,135,881 | 1,135,882 | Throwing a Javascript error on button click event | <p>I have a Javascript function that's fired on the onclick event of a button on my webform. It's possible for invalid parameters to be passed to the function, in which case I'd like to throw an error so that the browser can report to the user that something went wrong, and that they might want to check their configur... | javascript asp.net | [3, 9] |
2,326,642 | 2,326,643 | Why is object/associative array values not setting when I use $item.data("something").x | <p>Why is it when I do something like </p>
<p><a href="http://jsfiddle.net/sUhn9/" rel="nofollow">http://jsfiddle.net/sUhn9/</a></p>
<p><em>Added relevant HTML</em></p>
<pre><code><div id="container" data-physics='{x: 10, y: 5}'>Hello</div>
</code></pre>
<p>JavaScript:</p>
<pre><code>$(function() {
... | javascript jquery | [3, 5] |
4,456,869 | 4,456,870 | Appending a string variable in jQuery | <p>I'm not sure if I have the syntax correct in the code below, I'm trying to append a var to a string parameter within the find function. I'm trying to search for a unique id within each input element of a particular form.</p>
<pre><code> //Get value attribute from submit button
var name = $('#myForm').find('input#... | javascript jquery | [3, 5] |
4,726,842 | 4,726,843 | Calling a JavaScript function onclick event of button when the function is define in a separate PHP file | <p>How do you call a JavaScript function from one PHP file that is defined in another PHP file?</p>
| php javascript | [2, 3] |
4,970,567 | 4,970,568 | jquery show hide | <p>look I have this question, how can i do something like this (look at images)</p>
<p>I think it's possible to do with jQuery or ajax, but i don't know how..</p>
<ol>
<li>i have page something like this :
<img src="http://i.stack.imgur.com/fEY01.png" alt="enter image description here"></li>
<li>when i click on 1st g... | javascript jquery | [3, 5] |
1,492,882 | 1,492,883 | Cycle through list and call function based on id | <p>I have a list of items as such:</p>
<pre><code><ul>
<li><a href="#" id="Viewer1">click</a></li>
<li><a href="#" id="Viewer2">click</a></li>
<li><a href="#" id="Viewer3">click</a></li>
<li><a href="#" id="Viewer4">click</a&g... | javascript jquery | [3, 5] |
5,599,353 | 5,599,354 | On input:focus hide other inputs with jQuery | <p>Im trying to build a function so that when users are scrolling over input fields on my form, other input fields fade out... </p>
<p>Ive made a fiddle so that hopefully explains what im after better, but there is a label and input in each li, when the user hovers the li, the other fields ('li') should become semi tr... | javascript jquery | [3, 5] |
3,220,167 | 3,220,168 | Check if a layout exsists in Android Java | <p>I have in String name of layout:</p>
<pre><code>String l_name = "fragment_item_detail";
</code></pre>
<p>I want to check if this layout exsist (check if isset R.layout.fragment_item_detail) and get this int id.
How can do it?</p>
| java android | [1, 4] |
1,713,953 | 1,713,954 | How to return the ID of this span under a LI nodeObject using javascript or Jquery | <p>So I have </p>
<pre><code><li>
<span id="foobar"> abc </span>
</li>
</code></pre>
<p>I now have <code>li</code> as an nodeObject. I could get <code>"LI"</code> by using <code>li.nodeName</code>.</p>
<p>Now how could I get <code>"foobar"</code> out of <code>li</code> which is an ID of a spa... | javascript jquery | [3, 5] |
64,750 | 64,751 | Swallowing exception thrown in catch/finally block | <p>Usually I come across situations where I have to swallow an exception thrown by the clean up code in the <code>catch</code>/<code>finally</code> block to prevent the original exception being swallowed.</p>
<p>For example:</p>
<pre><code>// Closing a file in Java
public void example1() throws IOException {
bool... | c# java | [0, 1] |
1,787,838 | 1,787,839 | Can I insert PHP and javascript code in the same HTML file? | <pre><code><HTML>
<script language="JavaScript">
<script language="php">
</script>
</script>
</HTML>
<HTML>
<script language="php">
</script>
<script language="JavaScript">
</script>
</HTML>
</code></pre... | php javascript | [2, 3] |
3,151,786 | 3,151,787 | jQuery after onclick | <p>I've a form with different field, a validation summary and a button Sign up!
When I click on Sign up, if a field is empty, it active validation summary and until here there's no problem.</p>
<p>So the problem is that I would want active a jQuery script after it was clicked Sign up button and it appeared validation ... | asp.net jquery | [9, 5] |
1,821,005 | 1,821,006 | reading namespaced attributes with jquery | <p>Given a document like this:</p>
<pre><code><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
<body>
...
</body>
</code></pre>
<p>How can I read the <code>xml:lang</code> attribute using jquery? I can query for elements that have <code>xml:lang</code> like this:</p>
<pre><code>$('[xm... | javascript jquery | [3, 5] |
1,177,459 | 1,177,460 | document.getElementById() vs $() | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4069982/document-getelementbyid-vs-jquery">document.getElementById vs jQuery</a> </p>
</blockquote>
<p>I am learning jQuery and javascript.</p>
<ul>
<li><p>I wonder why the <code>$()</code> function of jQuery d... | javascript jquery | [3, 5] |
2,064,165 | 2,064,166 | how jQuery $.data() method differs from directly attaching variables to DOM elements? | <p>I can do this:</p>
<pre><code>$('#someid').data('dataIdentifier', 'someVariable');
</code></pre>
<p>And in my understanding I can do this:</p>
<pre><code>document.getElementById('someid').dataIdentifier = someVariable;
</code></pre>
<p>What are the pros of using jQuery for this versus raw javascript?</p>
<p>Tha... | javascript jquery | [3, 5] |
5,120,029 | 5,120,030 | replace in jQuery | <p>Can some one help me in this</p>
<p>I had a variable </p>
<pre><code>var myValue = "what is you name? what is your age?"
</code></pre>
<p>i want to find the '?' in the string and replace it with a html input text element</p>
<p>where the user can enter the answer in the text box and at last i need a string as ou... | javascript jquery | [3, 5] |
2,806,778 | 2,806,779 | How can I add elements to this object | <p>If I had this structure </p>
<pre><code>var data =
{
"people": [
{ "name" : "John", "id" : 1 },
{ "name" : "Marc", "id" : 2 }
]
}
</code></pre>
<p>I want to add more elements to this, in JavaScript, specifically in jQuery to then send it like this</p>
<pre><code>var dataString = JSON.strin... | javascript jquery | [3, 5] |
3,979,312 | 3,979,313 | Executing client-side script on link click | <p>I need my web page to open a window and enable a disabled button when a link or a button is clicked.
From what I've read on other posts on here, if I try and open a new window in Page_load most browsers will assume it's a pop-up and block it so I've been trying to do it client side with JS. </p>
<p>Currently, I'm t... | c# javascript asp.net | [0, 3, 9] |
6,027,848 | 6,027,849 | How to Passing value javascript variable to php? | <p>Passing value JavaScript variable to PHP.</p>
<p>Example</p>
<p><strong>JavaScript</strong></p>
<pre><code>Var ddd='aaaa'
</code></pre>
<p><strong>PHP</strong></p>
<pre><code>if (ddd="aaaa"){do somehting...}
</code></pre>
| php javascript | [2, 3] |
3,015,345 | 3,015,346 | can not use Closure right | <p>I wrote JS function and it must bind the buttons it generates depending on values in the array.
But it gives me the last value. I read that i had to use closure, I did, and I'm still not able to bind them right!
I'm still a beginner
I read about closure, I got the idea but still did not know what I'm missing</p>
<... | javascript jquery | [3, 5] |
1,199,185 | 1,199,186 | How to dynamically keep input field empty when select box option is no? | <p>Ì have form where writing on input field autofills other input field while user types email</p>
<pre><code>$("#edit-submitted-yhteystiedot-sahkoposti").keyup(function(){
$("#edit-submitted-saannot-newsletter-newsletter-email-address").val(this.value);
});
</code></pre>
<p>The thing is that if user does not wan... | javascript jquery | [3, 5] |
212,518 | 212,519 | convert Javascript function to c# | <p>I want to convert following javascript function to c#
can anyone help?</p>
<pre><code>function parseCoordinate(coordinate,type,format,spaced) {
coordinate = coordinate.toString();
coordinate = coordinate.replace(/(^\s+|\s+$)/g,''); // remove white space
var neg = 0; if (coordinate.match(/(^-|[WS])/i)) {... | c# javascript | [0, 3] |
5,763,707 | 5,763,708 | Remove string after last occurrence of character "/" - Android (JAVA) | <p>In my application, I am appending string to create path to generate URL. Now I want to remove that appended string on pressing back button.</p>
<p>Suppose this is the string : </p>
<pre><code>/String1/String2/String3/String4/String5
</code></pre>
<p>Now I want a string like this: </p>
<pre><code>/String1/String2... | java android | [1, 4] |
1,300,105 | 1,300,106 | Android: Is it possible to have dual sim with different ringtone for receiving call for each sim? | <p>Is it possible to set different ringtone for each sim card through which the call receiver can identify the sim that receives the call?</p>
| java android | [1, 4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.