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,388,923
4,388,924
Getting specific objects from a selected list
<p>I think I'll have to hit myself in the head after that.</p> <p>Let's say I have html like this:</p> <pre><code>&lt;div class="some-class"&gt;&lt;/div&gt; &lt;span class="some-class"&gt;&lt;/span&gt; </code></pre> <p>Somewhere I select items like this:</p> <pre><code>var items = $(".some-class"); </code></pre> <...
javascript jquery
[3, 5]
1,267,205
1,267,206
How can I make my inner table show?
<p>I have a table like this, all rows have the structure like 1st data row</p> <pre><code>&lt;table id='table1'&gt; &lt;thead&gt; &lt;tr&gt;...table headers...&lt;/tr&gt; &lt;/thead&gt; &lt;tr&gt; &lt;td&gt;xyz&lt;/td&gt; &lt;td&gt; &lt;table&gt;&lt;tr&gt;&lt;/tr&gt;&lt;/table&g...
javascript jquery
[3, 5]
3,395,982
3,395,983
border color won't change
<p>I'm trying to animate background-color,color and border color to change with jquery but for some reason border color is not changing any idea why? here is the portion of jquery code :</p> <pre><code>$('#tabbed a').hover(function() { $(this).animate({ backgroundColor: "#FBFBFB", color:...
javascript jquery
[3, 5]
5,265,545
5,265,546
Javascript spinning wait hourglass-type thing
<p>I'd like to indicate to the user of a web app that a long-running task is being performed. Once upon a time, this concept would have been communicated to the user by displaying an hourglass. Nowadays, it seems to be an animated spinning circle. (e.g., when you are loading a new tab in Firefox, or booting in Mac OS ...
javascript jquery
[3, 5]
5,095,204
5,095,205
jquery work in json
<p>i am new in jquery.<br> i want to send data in my index.php through ajax. i want to encode it in json and the decode it in normal to work on it. any one help me or suggsest me some helpfull url?<br> I am using jquery ajax function. thanks in advanse.</p>
php jquery
[2, 5]
3,631,121
3,631,122
Prevent form fields from repopulating after clicking the back button in spring
<p>I have a login form, when i submit form it redirect me on success page. now I clicked on back button from browser then I got the same login page with fields. So I want empty fields when i clicked on back button from browser.. Any one can help in this..?</p>
java javascript
[1, 3]
5,196,139
5,196,140
scroll event not firing on div element in IE
<p>I have tried everything I can think of to get this event to trigger when scrolling on the div tag. I made sure that it was actually reaching this code and it does. It never triggers when scrolling though. I also tried using .scroll(...) and .bind('scroll'...) Any thoughts on what the issue is?</p> <pre><code>$('.Sc...
jquery asp.net
[5, 9]
3,290,198
3,290,199
Android Use local CSS to display html String
<p>Ok so what i do is the following:</p> <p>i have a html string i show in a WebView like this:</p> <p><code>webView.loadDataWithBaseURL("",htmlText, "text/html","utf-8", null);</code></p> <p>i also have a local css file i want to apply to that html String in the webView. </p> <p>i looked this up for a while but no...
java android
[1, 4]
5,191,614
5,191,615
JQuery Drop Down menu wont display drop downs
<p>I am using this <a href="http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm" rel="nofollow">Dynamic Drive Script for a smooth drop down menu</a>.</p> <p>My site with the menu can be seen <a href="http://dgtgroup.co.uk/ascofzco/" rel="nofollow">here</a>. (the menu is the black bar in the middle).</p> <p>Eve...
javascript jquery
[3, 5]
5,046,672
5,046,673
Creating dynaimc controls in c# and placing them in html
<p>I have an datatable which I would like to use to generate controls i.e. <strong>textbox, checkbox, dropdown</strong></p> <p>From the datatable I need to create those controls using c#, can any one help me out in syntax. How do I go ahead and bind these controls in HTML tags?</p>
c# asp.net
[0, 9]
896,142
896,143
Popup form using asp.net and javascript
<p>Hi I am new for web development. I have an application which consists of a button. On clicking the button a popup window should appear which consists of 2 fields and a button. On clicking button in Popup window 2 fields in popup has to be saved in to database. How to implement this using <strong>ASP.NET and javascri...
javascript asp.net
[3, 9]
1,622,439
1,622,440
min3d and camera view
<p>How can I load the 3d object on a live camera view (in my android apps) using the <code>min3d</code> framework? </p> <p>This is on of the method in Obj3DView class:</p> <pre><code> public void initScene() { scene.lights().add(new Light()); scene.lights().add(new Light()); Light myLigh...
java android
[1, 4]
975,614
975,615
Javascript alert box invoked from codebehind does not work
<p>I need alert boxes to let the user know of successful entry or data conflicts. I've tried the following and I get no errors and no alerts.</p> <p>In the Save_Click:</p> <pre><code> ClientScript.RegisterStartupScript (GetType(), "Javascript", "javascript: UpdateComplete(); ", true); </code></pre> <p>also......
c# javascript asp.net
[0, 3, 9]
5,094,487
5,094,488
How to check if specified tag is inside in rad editor content
<p>I am using Telerik Rad editor. using vs 2010 with c#.</p> <p>I bind the content to editor during page load.</p> <p>On button click event ,i need to check if th particular tag (for ex: ) is inside the content in HTML mode.</p> <p>I am using the following code.</p> <pre><code> if (Radeditor1.Content.Contains("&...
c# asp.net
[0, 9]
5,705,844
5,705,845
Equivalent of strcmp() in Java for comparing byte arrays
<p>I use a byte array to fit 1024 bytes. The problem is, at separate times in my code I need to only use SOME of those bits. In C, I have used...</p> <pre><code>byte buff[] = read(); strcmp( buff, "CMD\r\n" ); </code></pre> <p>This would ignore all later bytes in the array, and only compare the first 5 bytes. Is ther...
java android
[1, 4]
1,115,584
1,115,585
$(window).scroll not accurate, when scrolling fast
<p>I'm trying to manipulate element's position, so between certain page scroll position, his css is changed. Take a look at this simple example: <a href="http://jsfiddle.net/6RtTX/8/" rel="nofollow">http://jsfiddle.net/6RtTX/8/</a></p> <p>The problem is - <code>$(window).scroll</code> is not so accurate, so if i scrol...
javascript jquery
[3, 5]
3,255,671
3,255,672
How to extend an object while ignoring null values?
<p>Say for example I have an object of</p> <pre><code>var user = { "Name": "Dan", "Age": 27, "Hobbies": null }; </code></pre> <p>which I would like to merge onto the following base object so that my user object will have all the required properties</p> <pre><code>var base = { "Name": null, ...
javascript jquery
[3, 5]
4,532,430
4,532,431
Convert a method from java to C#.net
<p>I have a method in Java:</p> <pre><code>public int getInt() { IntByReference ibr = new IntByReference(); if (CFLib.INSTANCE.CFNumberGetValue(this, 4, ibr)) return ibr.getValue(); return -1; } </code></pre> <p>here is the Reference:</p> <p><a href="http://developer.apple.com/iphone/library/documentation/CoreFou...
c# java
[0, 1]
176,277
176,278
Get selected value dynamically and include that in if condition
<p>How to get value from select box dynamically without loading page and use that value in if condition ?</p>
php jquery
[2, 5]
4,454,737
4,454,738
Sortable list + ability to re-order each item by inputting rank #
<p>I've searched and searched about how to do this, but to no avail.</p> <p>Basically I have a pretty standard jQuery sortable list, using a gripper to allow users to rearrange the list</p> <p>What I would like to add is an input box to each list item, autofilled with that item's #, that allows users to enter any num...
javascript jquery
[3, 5]
1,844,624
1,844,625
jQuery plugin: plugin methods calling other plugin methods?
<p>I have a plugin definedlike so:</p> <pre><code>(function( $ ){ var mymethods = { init: function(opts) { // do some wild awesome magic if (opts.drawtablefirst) $(this).drawtable(); // This doesn't actually work of course }, drawtable: function() { $(th...
javascript jquery
[3, 5]
1,698,086
1,698,087
how to prevent select item in dropdowlist using javascipt?
<p>I want prevent user to select dropdown list items using javascript methods. Is there anyway use <code>OnMouseKeyDown</code> so I can stop there. I donot want use <code>Enable=false</code>.</p> <p>Javascripts gurus, help me out.</p>
javascript asp.net jquery
[3, 9, 5]
654,666
654,667
How to connect http server for every moment using c#?
<p>Files are uploading to http server then i need to connect to that server need to check if new file is there need to parse that file.please tell me how to connect to http server using c#?and how to check it's new file or old file?</p> <p>uploaded url like</p> <pre><code>http://uploadfiles.com/upload.php </code></pr...
c# asp.net
[0, 9]
4,847,718
4,847,719
Is it bad practice declaring global variables in a.js file?
<p>I have a .js file where I am initialising two parameters which are used in a seperate function : </p> <pre><code>var submyvar1; var submyvar2; function init(myvar1 , myvar2){ submyvar1= myvar1; submyvar2= myvar2; } function (){ //subvar1 &amp; subvar 2 used here } </code></pre> <p>Is declaring global...
javascript jquery
[3, 5]
5,893,418
5,893,419
Convert Java code to C#
<p>Please help convert the following Java code to C# ?</p> <pre><code>String[] titles = new String[] { "Alpha", "Beta", "Gamma", "Delta" }; List&lt;double[]&gt; x = new ArrayList&lt;double[]&gt;(); for (int i = 0; i &lt; titles.length; i++) { x.add(new double[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,13,14,15 }); } ...
c# java
[0, 1]
4,597,067
4,597,068
How to access x and y values from a jQuery XY pad
<p>Im using this jQuery library called jQuery Control. <a href="https://github.com/aterrien/jQuery-Kontrol" rel="nofollow">https://github.com/aterrien/jQuery-Kontrol</a> the XY pad gives me a value like this :</p> <pre><code>Object {x: 112, y: 77} </code></pre> <p>how can i access x and y separately and use them for ...
javascript jquery
[3, 5]
3,025,285
3,025,286
Adding a link to an image
<p>Is there a way to add a link to an image using an input box, let say you have an image uploaded and you have an input, </p> <pre><code>Image Link: &lt;input type="text" id="image_link"/&gt; </code></pre> <p>in this box a user types in www.google.com and you want the link to append to the image. Is there a way to d...
javascript jquery
[3, 5]
1,597,873
1,597,874
c# asp .net Add column with static text on gridview
<p>I am working on an asp .net project.How can i add a static column with static text to a GridView which is loaded with a dataset?. For ex i want a column Check which has values in every row Checked. </p>
c# asp.net
[0, 9]
4,088,308
4,088,309
how to convert datatable to list?
<p>I have a dataset with few rows and columns in it, in the columns state there will be many matching rows, i want all the rows with same state to bind it to some list..how to achieve it.</p> <p>I need it because i have same capital in all the rows where i have same state, so i don' t want the loop to run each and eve...
c# asp.net
[0, 9]
4,941,518
4,941,519
stopping jquery animation when not hovering
<p>I posted a question earlier about a <code>div</code> animation and I'm trying to modify it a bit. I have a <code>div</code> that rotates when the page loads. When hovering over it, I'd like for it to stop.</p> <p>Here's the script</p> <pre><code>rotate(); //the function which rotates the div $("#div2").hover(func...
javascript jquery
[3, 5]
4,547,805
4,547,806
How to hide any row in a table whose third cell value does not match a given string in JQuery
<p>If i have a table:</p> <pre><code>&lt;table id="myTable"&gt; &lt;tr&gt; &lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;NoMatch&lt;/td&gt;&lt;td&gt;4&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;Match&lt;/td&gt;&lt;td&gt;4&lt;/td&gt; ...
javascript jquery
[3, 5]
3,825,688
3,825,689
send JSON android object to .net server
<p>I have .net web service that expect JSON object. This web service has method for return token: </p> <pre><code>public string GetToken(string username, string password)... </code></pre> <p>This is my site url for direct access (when I field manually id, method and params and paste in browser url I receive response ...
java android
[1, 4]
504,966
504,967
How can I get package name in android?
<p>I need to write some util class by myself and I need the packagename of android app. While I found the packageManager which only can be used in Activity and so on that has context. I only want to get packagename in my class which will be used in android app. So how can I do this? Thank you!</p>
java android
[1, 4]
5,216,747
5,216,748
Anonymous function on page load
<p>I'm trying to get better with JavaScript and learn how to utilize my code in functions and keep everything clean. I'm trying to run a function on page-load...</p> <pre><code>var setColors = function(){ this.init = function(){ $.getJSON('js/colors.json', function(colors) { $.e...
javascript jquery
[3, 5]
3,483,688
3,483,689
getting nodes without texts
<pre><code>$("br").parent().contents().each(function(i) { if(this.nodeType == "#Text") { alert(this.textContent); } }); </code></pre> <p>i am trying to select all texts not surrounded by html tags, but separated via <code>&lt;br&gt;</code></p> <p>doing this, sometimes returns a lot of alert message...
javascript jquery
[3, 5]
4,553,589
4,553,590
Jquery Get all the array elements
<p>I am programming beginner..</p> <p><strong>Code</strong></p> <pre><code> &lt;script type="text/javascript"&gt; $(function() { var course_category = "&lt;?php echo $_REQUEST['cities'] ?&gt;"; alert(course_category); // alerts as Array }); </code></pre> <p>when i do print_r in php (<code>print...
php javascript jquery
[2, 3, 5]
2,031,855
2,031,856
asp:menu in safari and chrome
<p>I have seen some posts of the asp:menu and the browsers Chrome and Safari here, but nevertheless, I think the problem that I have is different than other problems.</p> <p>I am using the following code in order to display the menu:</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { if (Reques...
c# asp.net
[0, 9]
2,251,637
2,251,638
popup window according to CheckBox checked
<p>If user don't checked, I want to show asp:ModalPopupExtender and get numeric value from this form.</p> <p>I'm using asp.net wizard control. I don't know "finish" button id. Can somebody help me?</p> <p><img src="http://i.stack.imgur.com/V7ZnU.png" alt="enter image description here"></p>
c# asp.net
[0, 9]
3,551,731
3,551,732
jQuery disable/re-enable validators on a page
<p>When I need to disable/re-enable validator I usually use jQuery code like so:</p> <pre><code> ValidatorEnable($('[id*=DueDateRequiredValidator]')[0], false); </code></pre> <p>and to re-enable it back:</p> <pre><code> ValidatorEnable($('[id*=DueDateRequiredValidator]')[0], true); var validato...
asp.net jquery
[9, 5]
3,144,848
3,144,849
Game Engine Remake - Trouble Choosing a Language /API(Java or Python)
<p>The engine I've been wanting to remake is from a PlayStation 1 game called Final Fantasy Tactics, and the game is basically a 2.5D game I guess you could say. Low-resolution sprites and textures, and 3D maps for battlefields. The plan is to mainly load the graphics from a disc, or .iso (I already know the sectors th...
java python
[1, 7]
3,118,072
3,118,073
Disabling a checkbox in asp.net
<p>I am dynamically creating a CheckBox and setting the disabled property like this:</p> <pre><code>chk.Disabled = false. </code></pre> <p>This renders the following HTML:</p> <pre><code>&lt;input type="checkbox" disabled="disabled" .../&gt; </code></pre> <p>On the click of the checkbox, I have a JS function that t...
asp.net javascript
[9, 3]
1,900,649
1,900,650
How to find control on Jquery tab control
<p>I am using Jquery tabcontrol i.e using tabs() plugin. I have created 5 asp.net pages &amp; assigned each page to each tab. Everything is working fine but when i try to find a control using $find("cntName") it always returns null. When i run the same page directly i.w without using tab control. It finds the control.w...
jquery asp.net
[5, 9]
1,300,448
1,300,449
Converting String to class
<p>I have a class <code>AuthUser</code></p> <pre><code>public class AuthUser { public int UserID { get; set; } public string UserNo { get; set; } public string UserName { get; set; } public string Password { get; set; } } </code></pre> <p>I have converted the class to a <code>string</code>.</p> <pre>...
c# asp.net
[0, 9]
3,014,889
3,014,890
importance of super keyword in android
<p>I am new to Android.I want to know whats the use of super keyword in android.</p> <p>Thanks in advance Tushar</p>
java android
[1, 4]
4,758,903
4,758,904
How to reset the form fields after moving to other tab or on closing the current tab,java and jquery
<p>I am using jquery-ui tabs ...Actually i want to reset the form fields after closing the current tab or if we move to another tab means form fields should be reseted.. I don't know how to reset the form fields at the close of tab.</p> <p>Anything help me in this.</p>
java javascript jquery
[1, 3, 5]
5,660,933
5,660,934
Using JavaScript which of these code chunks is best for real world use?
<p>This is just an example but there are a bunch of similar scenarios sprinkled throughout the code so it would be nice to choose the best solution and stick with it. The first is probably quickier but the second takes up less space*</p> <p>*less space when reading/fixing code and less space when downloading.</p> <pr...
javascript jquery
[3, 5]
3,945,955
3,945,956
How to get rid of "Menu_HoverRoot(this) Object Expected" error in ASP.NET application (SharePoint 2007)
<p>I have just deployed my ASP.NET/C# code to a sharepoint server and am getting this error when hoving over the menu:</p> <p>Menu_HoverRoot(this) Object Expected</p> <p>I have absolutely no idea what is causing it, but have seen other people with this problem, and it seems to be something with WebResource.axd.</p> ...
asp.net javascript
[9, 3]
4,924,670
4,924,671
Data structure for Statistics and Achievements system
<p>I'm implementing an Statistics + Achievements system. Basically the structure is:</p> <ul> <li>An Achievement have many related Statistics, this relations must associate each Achievement with the required Statistics (and it value). For example the Achievement1 needs the Statistic1 with value 50 (or greater) and th...
java android
[1, 4]
158,521
158,522
Why does the click function not work after I change the class of a button?
<p>I have a set of buttons(previous &amp; next) that the user clicks.</p> <pre><code>&lt;a id="prev_btn" class="prev_1" href="#"&gt;Previous&lt;/a&gt; &lt;a id="next_btn" class="next_1" href="#"&gt;Next&lt;/a&gt; </code></pre> <p>When the user clicks on the next button(.next_1), it changes the class name of the butto...
javascript jquery
[3, 5]
2,068,272
2,068,273
php - Calling a jquery dialog box in a div loop
<p>How do i call a jquery dialog box from a div in a loop?</p> <p>See for instance, clicking the <code>&lt;p&gt;</code> will show up the profile of selected database user. </p> <p>Ex:</p> <pre><code>&lt;div id="db-users"&gt; &lt;div id="user-info1"&gt; //db userinfo 1 &lt;p&gt;ID#001 John Smith&lt;/p&gt; ...
php javascript jquery
[2, 3, 5]
3,423,707
3,423,708
cannot get results from an asp.net page to be used in the jquery token input drop-down
<p>please help me I'm stuck here for a long time with no solution, I'm trying to use the jQuery token input to display selection result from an asp.net page, the page is called correctly and it generates the right JSON form, but the result didn't appear in the drop-down list, here is the code of the input field in the ...
jquery asp.net
[5, 9]
3,326,693
3,326,694
Total number with jquery
<p>How can total the number of characters between the <code>p</code> tags with jQuery?</p> <p>I try as:</p> <p><strong><a href="http://jsfiddle.net/TPFkF/" rel="nofollow">DEMO</a></strong></p> <p>html:</p> <pre><code>&lt;b&gt;1&lt;/b&gt; &lt;b&gt;1&lt;/b&gt; &lt;b&gt;1&lt;/b&gt; </code></pre> <p>js:</p> <pre><cod...
javascript jquery
[3, 5]
3,822,975
3,822,976
ASP.Net: Dynamic JavaScript path / src
<p>I try to make Folder for things in my ASP.Net Application (e.g. all with Finance in /Finance).</p> <p>No I bind an JavaScript in the MainPage:</p> <pre><code>&lt;script type="text/javascript" src="Helper/jquery-1.3.2.min.js"&gt;&lt;/script&gt; </code></pre> <p>But when I now open ~/Finance/Payment.aspx I get an J...
asp.net javascript
[9, 3]
3,793,405
3,793,406
Add dynamically controls to asp placeholder in addition to controls which already exist in it
<p>Add dynamically controls to asp placeholder in addition to controls which already exist in it ? how to add them?</p> <p>for example - on page load I added to textboxs and labels to placeholder on button click I need to add additionally one more textbox.</p>
c# asp.net
[0, 9]
2,237,456
2,237,457
Why I can't get position of all items in my ListView?
<p>My problem is, I have listView with contacts, then I'm using </p> <pre><code>onItemClickListener and Object obj = lImenik.getItemAtPosition(position); String tmp = obj.toString(); </code></pre> <p>to get position of clicked item. That works fine for visible items.</p> <p>But the problem is when I scroll little ...
java android
[1, 4]
441,319
441,320
Is there an equivalent of ? : operator of C# in Javascript/Jquery?
<p>I want to write the following C# code equivalent in JavaScript/jQuery</p> <pre><code>(x == 0 &amp;&amp; y &lt; 0 ? x : x+y) </code></pre> <p>Is there an equivalent shorthand way such as above in JavaScript/jQuery or will I have to write the whole if else. </p> <p>I need to put such a condition in the for loop def...
c# javascript jquery
[0, 3, 5]
2,081,192
2,081,193
How to access PHP methods inside a Javascript?
<p>I have made a method which will delete a file. first i echo the url to this file. like this </p> <pre><code>echo "&lt;a href='$fulr'&gt;$filename&lt;/a&gt;"; </code></pre> <p>now basicaly i want to call the function <code>deletefile($file);</code> how can i do it like this </p> <pre><code>echo "&lt;a onclick='$th...
php javascript jquery
[2, 3, 5]
780,300
780,301
JQuery delete button not working
<p>Hi I have a JQuery function which creates a popup dialog box, which you have to click to continue, however whilst the box pops up and everything works fine the link doesn't trigger the php link.</p> <p>Below is the JQuery code:.</p> <pre><code>jQuery('.delete-row').click(function () { var conf = confirm('Conti...
php jquery
[2, 5]
1,016,248
1,016,249
Calling a server side method in client side in asp.net
<p>This is the JavaScript that I have to use in my ASP.NET page, how to change it so that it works in ASP.NET?</p> <pre><code>&lt;script type="text/javascript"&gt; window.onload = function () { /** * These are not angles - these are values. The appropriate angles are calculated ...
c# asp.net
[0, 9]
2,374,216
2,374,217
jquery equivalent to javascript piece of the code
<p>I have this part of the code which works very well on javascript:</p> <pre><code>document.getElementById("firma").onkeypress = function(e) { return restrictCharacters(this,e,alphaOnly); }; </code></pre> <p>i'ts part of some script and this part joins it on id="firma"</p> <p>I'm courious to know what is equivalen...
javascript jquery
[3, 5]
3,345,755
3,345,756
How to post status updates on myspace using asp.net C#?
<p>Can someone please tell how can I post status updates on myspace using asp.net C# ?</p> <p>Thanks :D</p>
c# asp.net
[0, 9]
2,146,739
2,146,740
Using custom adapter?
<p>I want to use custom adapter to fill my list view with phone contact data. I have xml with 2 text views for contact name and contact number. Also I have xml with list view and 2 buttons which I need to use latter. I want to extend Activity if is possible not ListActivity!? I tried lots of things(BaseAdaper, SimpleCu...
java android
[1, 4]
235,984
235,985
How to disable Windows default shortcut & use user defined functions in javascript/ASP.net (web application)
<p>I am developing web application, in that I want to use hot eys functionality, like combination of Ctrl + F1 ..... F12. But there are some keys having default functionality like F1 is used for Help, ctrl + f4 used to close windo or do. f11 for full screen.So how to disable their default functionality to use my functi...
javascript asp.net
[3, 9]
3,998,685
3,998,686
Refresh Treenode parent to show most current child nodes
<p>I am able to select and expand to a particular tree node programmatically, but unable to refresh it to reflect most current data in the table. Is there Treeview1.Refresh() method ? or something like that to effect? any help will be appreciated. I have a treeview and I am adding child nodes to a parent node by having...
c# asp.net
[0, 9]
2,457,010
2,457,011
Best way to store a key=>value array in Javascript?
<p>What's the best way to store a key=>value array in javascript, and how can that be looped through?</p> <p>The key of each element should be a tag, such as <code>{id}</code> or just <code>id</code> and the value should be the numerical value of the id.</p> <p>It should either be the element of an existing javascrip...
javascript jquery
[3, 5]
1,964,946
1,964,947
javascript toggle to jQuery slow toggle slide
<p>Hello I have a bullet tree that toggles fine, but I wanted to do a one of those sliding toggles that look pretty in jquery...can you help?</p> <p>javascript:</p> <pre><code>function toggle(id) { var e = document.getElementById(id); if (e.style.display == '') e.style.display = 'none'; else e.style.di...
javascript jquery
[3, 5]
4,895,998
4,895,999
puting 1D arrays into the end of the 2D arrays
<p>Lets say i've got this code:</p> <pre><code>float[] bigA = {1,2,3,4}; for (int i = 0; i &lt; bigA.length; ++i) { float abc = bigA[i] - 1; float[] bigerAbc = {abc}; float[][] wcs = {bigerAbc}; } </code></pre> <p>The <code>float[][] wcs = {abc};</code> part is defining the wcs array everytime, and the end resu...
java android
[1, 4]
347,389
347,390
Jquery selectbox script not auto-initializing
<p>I am trying to implement the jquery selectbox script. I have made all the changes needed to css and html markup and the selectbox is working and appearing fine. the problem is. It is not initializing automatically at page load. </p> <p>I have to manually run <code>$("SELECT").selectBox();</code> from the firebug sc...
javascript jquery
[3, 5]
4,219,825
4,219,826
jQuery extension (scope?) question
<p>I have some confusion over a jQuery extension not working as I'd expect. I have the following function defined:</p> <pre><code>$.fn.poster = function() { this.each(function() { self = $(this); self.click(function() { /* does stuff */ $.post(url, data, function(d, t) { han...
javascript jquery
[3, 5]
1,372,602
1,372,603
Bind touch event to elements created by array
<p>How to make touch event work on single element of each created by this function. This code doesn't work since it makes all of the '#demo-1 p' background-color change together even I touch one of them.</p> <pre><code>function token1(r) { for (var j = 0; j &lt; r.length; j++) { if (r[j].match(srr[0], "g")...
android jquery
[4, 5]
1,816,214
1,816,215
how to send a variable from jquery to a template?
<p>how to send a variable from jquery to a template?</p>
javascript jquery
[3, 5]
2,108,484
2,108,485
Populate a TextBox from a DropDownList selection ASP.NET/Javascript
<p>I have a DDL and ASP.NET Textbox. I would like to populate the text box with the option I choose from the DDL. I need this to be instant and not use postbacks so it would seem JavaScript would be the obvious choice here. I have done quite a bit of searching but everything I have found seems to be for standard HTML (...
javascript asp.net
[3, 9]
2,259,701
2,259,702
ASP.NET proxy to access protected resources (other webapps)
<p>I am running an ASP.NET based CMS/portal site using mojoPortal (www.mojoportal.com, open source). Users log in and access content based on their group/role. Now I would like to add a different web application (a wiki, MediaWiki based for ease of maintenance, but essentially any other web application or site) that sh...
c# asp.net
[0, 9]
2,316,548
2,316,549
Variable Undefined in Anonymous Function
<pre><code>function updateServerList() { var i; for (i=0; i &lt; servers.length; i++) { var server = servers[i]; var ip = server['serverIp'] var html = constructServer(i); var divId = '#server' + ip.replace(new RegExp("\\.", "mg"), "-"); var visible = $(divId).find(".server_body").is...
javascript jquery
[3, 5]
4,519,379
4,519,380
jQuery How to kill a Created Div?
<p>What I have at the moment is a list of products (divs) that, when hovered over, a duplicate div is created and positioned over the original div (offset a bit and restyled using css). This new div is larger and offers more information that was being shown in the list view.</p> <p>When I hover off the new div it is ....
javascript jquery
[3, 5]
810,985
810,986
Start reading from a specific byte
<p>How I can start reading from a specific byte? I have following code:</p> <pre><code> try { while ( (len = f.read(buffer)) &gt; 0 ) {} } </code></pre> <p>For example, I want to start to read at byte 50.</p>
java android
[1, 4]
5,570,360
5,570,361
Is increased programming efficiency in Java or C# a myth?
<p>A big advantage of Java or C# in increasing <strong>productivity of development</strong> is that you're supposed to lose less time with complicated language features, especially those related to memory management. But is it just an impression?</p> <p>I think that the learning curve for C++ is definitely more steep,...
c# java c++
[0, 1, 6]
4,715,532
4,715,533
Looking for a way to impliment a pop out read more link
<p>I am kind of handcuffed here with a limited spacing of 350px x 160px, my goal is to highlight three main topics from a CMS and have a READ MORE link for each. Achieving this by either a horizontal fly out to the right or to have it pop up like a tooltip that stays up until the user clicks to close. </p> <p>I am hav...
javascript jquery
[3, 5]
2,401,513
2,401,514
How do you select a specific child div with jQuery?
<p>How do you select a div which is a child of the current $(this)? </p> <p>I have many divs with the class row, in each of which I have a hidden div called form_explanation. I want to show() the div form_explanation when the row is onClick-ed. </p> <p>Thanks!</p>
javascript jquery
[3, 5]
828,645
828,646
What is the java Vector.element() C# equivalent
<p>Here is the java code i incompletely tried to translate</p> <pre><code> static Enumeration enumerate() { Vector list = new Vector(); Enumeration e = cache.keys(); while (e.hasMoreElements()) { Vector v = (Vector) cache.get(e.nextElement()); for (int i = 0; i &lt; v.size(); i...
c# java
[0, 1]
1,445,162
1,445,163
Why isn't my CustomValidator in ASP.NET 4.0 working?
<p>The controls in the ASP.NET</p> <pre><code>&lt;asp:TextBox ID="txtEnd" runat="server" placeholder="12:59"&gt;&lt;/asp:TextBox&gt; &lt;asp:RadioButtonList ID="rblTime2" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"&gt; &lt;asp:ListItem&gt;AM&lt;/asp:ListItem&gt; &lt;asp:ListItem&gt;PM&lt;/a...
c# asp.net
[0, 9]
2,254,022
2,254,023
In which jquery version does outerHTML method exist
<p>I tried this in my javascript and it worked without additional plugin</p> <pre><code>var2 = $('.my_div')[0].outerHTML; </code></pre> <p>But i could not find it in official documentation . Where can i find more information about that</p>
javascript jquery
[3, 5]
3,126,806
3,126,807
Parallel lists vs list of class with multiple variables
<p>I am creating a list of x,y values for tracking positions. Working on android optimization is very important, so I am wondering which method would be better from a resource usage standpoint.</p> <p>Method 1: Create a class(Position) containing an int for x and y, then create a list: positions.</p> <p>Method 2: Cre...
java android
[1, 4]
1,907,368
1,907,369
check if a string contain specific words in the start should remove-JavaScrip/jQuery
<p>I want to remove any label that begins with M#- or L#- this rule should be in jquery/javascript that any label that begins with M#- or L#- should return false labels example:</p> <pre><code>Live M1- My Choice, Stage M2- Site, KFC L1- 1KFC, L2- New Choice </code></pre> <p>Result:</p> <pre><code>Live Stage ...
javascript jquery asp.net
[3, 5, 9]
620,061
620,062
Can I pass javascript variable to a PHP form?
<p>I'm using jcrop to crop my photos and need to send the current values along with my form submission. Is there an easy way to do this?</p> <p>The JavaScript variable is this:</p> <pre><code>c = coords; $.param(c) </code></pre> <p>Can I include this as a hidden field in my PHP form somehow?</p> <pre><code>&lt;inpu...
php javascript
[2, 3]
5,754,568
5,754,569
Trying to get numbers from keypress document, javascript
<p>it seems simple, but I couldn't figure how to intercept numbers on javascript from Document DOM</p> <pre><code> $(document).keypress(function (e) { if (e.keyCode == xx) { alert(); } }); </code></pre>
javascript jquery
[3, 5]
2,559,952
2,559,953
jquery gallerific preload conflict
<p>I'm unflashing a gallery using jquery-1.3.2, galleriffic and opacityrollover.</p> <p>The goal is to display a large image in the gallery container only when one mouses over a thumb. <a href="http://dcostaging.net/clients/AHF/washington_mills.php" rel="nofollow">Example page here</a>.</p> <p>Everything's working f...
php jquery
[2, 5]
2,226,602
2,226,603
JavaScript innerchild?
<p>I have the following example HTML:</p> <pre><code>&lt;div id="target"&gt; &lt;div id="targetText"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>and I'm using the following code to get the inner div:</p> <pre><code>$('#targetText'); </code></pre> <p>instead, I was wondering if I could drop the id of the inner ele...
javascript jquery
[3, 5]
3,982,911
3,982,912
How can I get the JQuery to return a valid img src?
<p>So, I have images in a div that share the same class and one of them is selected at a time for a single view of that image. In this single view, I have arrows that I want to use to cycle between the images. The images sharing the same class have sequential alt values.</p> <p>Right now, I can get the preceding alt v...
javascript jquery
[3, 5]
5,180,540
5,180,541
Android camera out of memory exception
<p>I have a strange problem on my htc hero. When launching camera, i get out of memory exception. After that, if i launch any other application that uses camera, they also crash(when trying to use camera function). I call camera.release and camera.stoppreview in surfacedestroyed function, but that doesnt help. </p> <p...
java android
[1, 4]
736,697
736,698
jQuery autocomplete to get unused value
<p>In my ASP.Net MVC application I have a jQuery autocomplete on a text box. I have everything working to display currently used item names and what I want to do is force the user to enter a completely NEW item name. I.e. the autocomplete acts as a guide to what exists but the user must ultimately enter a completely us...
javascript jquery
[3, 5]
5,719,197
5,719,198
jQuery remove() on element doesn't hide used space
<p>I'm removing an element using <code>remove()</code> (it's a <code>&lt;li&gt;</code> with <code>display: inline;</code> set, although the same problem seems to exist with <code>display: block;</code>), and while the element is removed from the page the space it was occupying isn't.</p> <p>Is this standard behaviour ...
javascript jquery
[3, 5]
3,763,218
3,763,219
Richtextbox in web application and highlighting the text
<p>I am a beginner to web application development. I am loading some text to the text box and checking for certain errors like if occurring of space before <code>.</code>(dot/full-stop). <br>I want to display the line no, column no and cursor position of the errors. Which control is suited for this. How to find the lin...
c# javascript asp.net
[0, 3, 9]
1,973,724
1,973,725
Best data combination to ensure web user uniqueness?
<p>How to ensure that the anonymous web users that voting using your poll-system are unique (<em>each anonymous user votes for once only</em>)?</p> <p><strong>I can think of:</strong><br> 1. Client's IP Address<br> 2. Client's Machine Name<br> 3. MAC Address<br> 4. Storing cookie</p> <p>As far as I know, you cant...
c# asp.net
[0, 9]
1,130,957
1,130,958
not validating special character "_" in javascript
<p>hello i am using javascript to validate field</p> <p>i am checking special characters.. the code i am implementing validates all the special characters except _ underscore..</p> <pre><code> &lt;script type="text/javascript" language="javascript"&gt; function validateForm() { var iChars = "!@#$%^&amp;*()+=...
php javascript
[2, 3]
3,614,822
3,614,823
Creating Javascript function called from PHP
<p>I have a piece of Javascript that invokes a social publishing widget overlay. When you load the page the overlay will popup and this is the script that calls it:</p> <pre><code>&lt;script type="text/javascript"&gt; RPXNOW.loadAndRun(['Social'], function () { var activity = new RPXNOW.Social.Activity( "...
php javascript
[2, 3]
5,346,892
5,346,893
Jquery and trigger a click on a hidden button
<p>I have a hidden button on a form that I need to click in order to fire an asyncpostback trigger that's attached to an update panel.</p> <p>How is this done?</p>
asp.net jquery
[9, 5]
2,694,938
2,694,939
find out if a certain id itself has certain text part of it
<p>I got the id of a clicked element from the site, and i need to check if the id has a certain word. (all the id start with same word but have also a number which is efferent for all).<br> How can i do that with jquery?</p>
javascript jquery
[3, 5]
3,720,304
3,720,305
jquery on submit
<p>i have little problem</p> <p>on form submit</p> <pre><code>e.preventDefault(); </code></pre> <p>not working</p> <p>code:</p> <pre><code>$(function(){ $("#contact-form").submit(function(e){ Validation.init({ name : $("#contact-form").find("input[name='name']").val(), phone : ...
javascript jquery
[3, 5]
1,332,567
1,332,568
JQuery sum all data in specific table row
<p>I have a table with inputs in each cell, except one (.total) which specifies the total of each table row. When one of the inputs are changed I would like the sum to change for that row. Below is far as I have been able to get. <strong>The HTML:</strong></p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td&gt;&l...
javascript jquery
[3, 5]