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
5,266,871
5,266,872
alternatives to jquery animate?
<p>On hover I want my div to scroll down.</p> <p>I know i can use the <code>.animate({left: 0}, "slow");</code> but this doesnt go down but what else does jquery have to offer?</p> <p>Here is my jsfiddle: <a href="http://jsfiddle.net/WZvPk/4/" rel="nofollow">http://jsfiddle.net/WZvPk/4/</a></p> <p>hover over the sectors box and you will see the "view project" move down. I need it to move down in a slow fashion similar to <a href="http://www.jeremymartin.name/examples/kwicks.php?example=3" rel="nofollow">http://www.jeremymartin.name/examples/kwicks.php?example=3</a></p> <p>Then need the opacity to be so my image is darker.</p> <p>edit: slide down wont work with this:</p> <pre><code> $(".sectorGrid").hover( function () { $(this).children(".sectorImage").children(".showme").css("display", "block").css("margin-top", "-5px"); }, function () { $("div.sectorImage div.showme").css("display", "none"); } ); </code></pre>
javascript jquery
[3, 5]
4,523,375
4,523,376
Event keycode in javascript for galaxy tablet
<p>Any one aware of the event keycode of the key (to use in javascript) for the following.</p> <p>Android devices --> key which minimizes the keyboard when the focus is on.</p> <p>Generally, we can minimize the keyboard which is up (when the focus is on textbox) by pressing a key in android devices (which is generally at the left bottom of the keyboard)</p> <p>I would like to know the event keycode of that key to disable the keyboard through javascript.</p> <p>Thanks</p>
javascript android
[3, 4]
1,840,080
1,840,081
'Please wait' screen between pages in C# ASP.NET. Best practice?
<p>I have a gridview with some imagebuttons, each of which kicks off a report page for that item. The report take 10-15 seconds to run, so I'd like a popup 'Generating report, please wait' type thing. I can think of a few ways but would like the opinion of those more experienced than I. The options I was considering:</p> <p>a) link my imagebutton to an intermediate page that says 'please wait', and then refer it onto the report page from there. Seems a bit clunky b) Investigate using jquery or similar. I have telerik controls, they have a few things but it isn't clear if any are suitable. c) Define some kind of CSS layer with a please wait warning on it, and make it visible as part of the button's onclick event d) Look into jquery or similar</p> <p>Any thoughts?</p> <p>Thanks!</p>
c# asp.net
[0, 9]
5,028,254
5,028,255
Best way to get map overlays from a server to Android \ iPhone client
<p>I want to implement a client app for Android and iPhone, which will get from a servlet data about specific locations (X pos, Y pos, short description and url to image), and will represent it on mapView. I have no problem implementing all map issues, but I have a question regarding how to transfer all data. Would it be best to transfer the data from the server by some XML file, or maybe there is more efficient way to transfer this data?</p> <p>All implementations are Google map based.</p>
android iphone
[4, 8]
1,878,101
1,878,102
Reddit Style Voters with jQuery
<p>I am trying to copy reddit's voting buttons but I'm somewhat new to jQuery so I'm having challenges. My HTML block looks like:</p> <pre><code>&lt;ul class="karma-controls"&gt; &lt;li class="karma-control karma-up karma-up-selected"&gt;&lt;a href=""&gt;&lt;/a&gt;&lt;/li&gt; &lt;li class="karma-total"&gt;1&lt;/li&gt; &lt;li class="karma-control karma-down"&gt;&lt;a href=""&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>The css simply gives .karma-up/.karma-down it's respective karma_up.png and karma_down.png arrow. when the karma-up-selected or karma-down-selected class is added my css just overwrites the background with a more fitting image.</p> <pre><code>$(this).closest(".karma-up").toggleClass("karma-up-selected"); $(this).closest(".karma-down").toggleClass("karma-down-selected"); </code></pre> <p>Actually does what I want but they are independent of one another. If karma-up is clicked then karma-down needs to be unselected (if previously selected) and vice versa.</p> <p>I'm thinking I am going to need a lot of if's with hasClass, removeClass and addClass but I want to see what the SO community thinks.</p>
javascript jquery
[3, 5]
3,465,857
3,465,858
JQuery scroll function issue on IPhone
<p>Im having problems using JQuerys scroll function on the iPhone.</p> <p>Heres a link to the JSfiddle <a href="http://jsfiddle.net/GRnSE/" rel="nofollow">http://jsfiddle.net/GRnSE/</a></p> <p>Ok so I have this effect where when the user scrolls down the content of the header fades out and moves up at half the speed of the scroll. </p> <p>This all works fine but when I test it on my iPhone it looks like the function dosnt run until after I stop scrolling and remove my finger. </p> <p>Is it possible to get the function to run whilst the user is scrolling on the iPhone?</p> <p>Hopefully that all made sense :)</p>
jquery iphone
[5, 8]
2,199,865
2,199,866
Asp.net IE & Safari JQuery compatiblity issue
<p>I recently developed a site but I am having some troubles with displaying a particular JQuery Carousel on Safari be it on the PC or iPhone. Displaying on IE or Firefox has no problem. The issue arise when I refresh that particular page, the JQuery becomes distorted, the image is sliced and buttons gone. I would really like to show some code but I am not sure where to pinpoint the problem.</p> <p>This is the page:</p> <p><a href="http://clotheher.com.microsoft2008hosting.com/ProductDetails.aspx?ProductId=2&amp;&amp;CategoryId=1" rel="nofollow">http://clotheher.com.microsoft2008hosting.com/ProductDetails.aspx?ProductId=2&amp;&amp;CategoryId=1</a></p> <p>On the bottom right side is the carousel. Anyone experiences such problem or understand this behavior please kindly let me know. Thanks.</p>
c# jquery asp.net
[0, 5, 9]
4,557,767
4,557,768
jquery draggable/droppable issue
<p>Hey guys I have a drag and drop function that <strong>does not fully work</strong>. What I want to do is be able to drag and drop a picture into a div and have that picture pop up in the div. I have a list of 2 pictures right now, so I have the following function echoed for each picture. Both pictures are draggable and droppable, but the first one is the only one that appears in the div, regardless of which picture gets dragged in. I am not sure what is wrong because the <strong>jquery function seems to be unique to each picture</strong>. If any one has any suggestions I would appreciate it greatly.</p> <pre><code>while ($row = mysql_fetch_assoc($query)) { $image=htmlentities($row['image']); //image name $uniqid=uniqid(); //unique id for jquery functions $dirname = "usercontent/$user/images/$image"; echo "&lt;img id=\"$uniqid\" src=\"$dirname\" width=\"75\" height=\"75\"/&gt;"; echo "&lt;script&gt; $(function() { $(\"#$uniqid\").draggable({ scroll: true, scrollSensitivity: 10, scrollSpeed: 10, revert: true, helper: 'clone', cursorAt: { cursor: 'move', top: 27, left: 27 } }); $(\"#droppable2, #droppable-background , #droppable2-innerer\").droppable({ greedy: true, activeClass: 'ui-state-hover', hoverClass: 'ui-state-active', drop: function(event, ui) { $(this).addClass('ui-state-highlight').find('&gt; p').html('Dropped!'); $('#droppable-background').css(\"background-image\",\"url($dirname)\"); } }); }); &lt;/script&gt;"; } </code></pre>
php jquery
[2, 5]
1,867,110
1,867,111
Problem with jquery setting wrong RequestUrl
<p>I'm using the $ajax interface, working from localhost.</p> <p>First example works as expected, RequestUrl (seen e.g. in Chrome Developer tools network tab) is: /commentSubmitted</p> <pre><code>$.ajax({ type: "POST", url: '/commentSubmitted', data: "hi"}); </code></pre> <p>This here doesn't work as expected, it appends the current browser url (referrer) to it:</p> <pre><code>$.ajax({ type: "POST", url: 'anyotherstring/commentSubmitted', data: "hi"}); </code></pre> <p>I would like to have the RequestUrl always be the exact string I specify. For some reason the RequestUrl looks like this: <code>/nested/url/I/dont/care/about/anyotherstring/commentSubmitted</code></p>
javascript jquery
[3, 5]
1,598,748
1,598,749
execute javascript method after completing code behind method?
<p>I want execute below callback() method after completion of <code>document.getElementById('btnDownload').click();</code> method . Now <code>callback()</code>executing immediatly. I want wait "Click()" process done then Execute <code>callback();</code> method.</p> <pre><code>function LoadPopup() { // find the popup behavior this._popup = $find('mdlPopup'); // show the popup this._popup.show(); // synchronously run the server side validation ... document.getElementById('btnDownload').click(); callback(); } function callback() { this._popup = $find('mdlPopup'); // hide the popup this._popup.hide(); alert("hi"); </code></pre> <p>}</p>
asp.net javascript jquery
[9, 3, 5]
5,175,092
5,175,093
enable textbox when checkbox checked in a TABLE ROW
<p>My <code>submit.cshtml</code> is: </p> <pre><code>&lt;table id="scDetails" class="table"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Item&lt;/th&gt; &lt;th&gt;IsChecked&lt;/th&gt; &lt;th&gt;Comment&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; @Html.EditorFor(m =&gt; m.Fbacks) &lt;/tbody&gt; &lt;/table&gt; </code></pre> <p>EditorTemplate is for - <code>@Html.EditorFor(m =&gt; m.Fbacks)</code> (Fbacks.cshtml)</p> <pre><code>&lt;tr&gt; &lt;td&gt;@Html.HiddenFor(m =&gt; m.Item) @Html.DisplayFor(m =&gt; m.Item) &lt;/td&gt; &lt;td&gt;@Html.CheckBoxFor(m =&gt; m.IsChecked)&lt;/td&gt; &lt;td&gt;@Html.TextBoxFor(m =&gt; m.Comment)&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>What I need is:</p> <p>When I check the checkbox, textbox should be enabled and when uncheck, textbox should disabled.</p>
javascript jquery
[3, 5]
2,282,695
2,282,696
how to use variable inside .wrap()
<p>This might sound silly but i'm having trouble printing a variable in this code - </p> <pre><code>var clsuffix = "something"; $("#box").wrap('&lt;div class="boxy" /&gt;'); </code></pre> <p>I want to print the <strong>clsuffix</strong> variable inside the class=" <em>here</em> " so it could be like </p> <pre><code>&lt;div class="boxysomething"&gt; </code></pre> <p>But when i use the variable inside class="", it comes up as it is (not being treated as variable)</p>
javascript jquery
[3, 5]
5,520,817
5,520,818
Why < is getting converted as &lt; during runtime
<p>I am trying to write an aspx page where I am passing some server side value to the Javascript. The server side tag is changing from <code>&lt;%</code> to <code>&amp;lt;%</code></p> <pre><code>&lt;asp:TextBox ID="txtOriginalNo" runat="server" onkeyup="javascript:EnterKeyPress(&lt;%=ibtnSubmit.ClientID%&gt;,event);" TabIndex="1" MaxLength="13" &gt;&lt;/asp:TextBox&gt; </code></pre> <p>This is getting converted during runtime to: </p> <pre><code>&lt;input name="txtOriginalNo" type="text" maxlength="13" id="txtOriginalNo" tabindex="1" onkeyup="javascript:EnterKeyPress(&amp;lt;%=ibtnSubmit.ClientID%&gt;,event);" /&gt; </code></pre> <p>Can anyone tell me why this is?</p>
asp.net javascript
[9, 3]
3,269,650
3,269,651
Showing on mouseover a div created dynamically and remove
<p>I searched a lot through questions but I did not find the right way. My problem is: I want to create a <code>div</code> dynamically , showing it on <code>mouseover</code> appending it to another <code>div</code>, and remove (through <code>remove()</code> function) on <code>mouseout</code>. I tried couple ways but in any of them , sometimes the <code>div</code> shows up and then disappear, sometimes it doesnt, sometimes it disappear when my mouse goes away from the text in the container <code>div</code>. Thank you guys .</p> <h3>This is my code</h3> <pre><code> var usr = 'username_pre'; var newdiv = $('&lt;div&gt;', { html: '&lt;a href="#" title=""&gt;'+usr+'&lt;/a&gt; &lt;/br&gt; &lt;a href="#" title=""&gt;impostazioni&lt;/a&gt; &lt;/br&gt; &lt;a href="#" title=""&gt;esci&lt;/a&gt;' }); $("#container").mouseover(function(){ $("#options").css('visibility','visible').append(newdiv); }); $("#options").mouseout(function(){ $(newdiv).remove(); }); </code></pre>
javascript jquery
[3, 5]
4,427,127
4,427,128
javascript: execute jquery code variables by the function
<p>i don't know good title but heres the explain</p> <p>i have this link</p> <pre><code>&lt;a href="#" class="link" effect="show"&gt; Link1 &lt;/a&gt; &lt;a href="#" class="link" effect="fadeIn"&gt; Link2 &lt;/a&gt; &lt;a href="#" class="link" effect="slideDown"&gt; Link2 &lt;/a&gt; </code></pre> <p>i want if click <code>.link</code> use its effect meas</p> <pre><code>$('a').hide(); $('.link').click(function(){ var effect = $(this).attr("effect"); /* what should i do here not conditions to make if effect is show show this link if its fadeIn do fade in etc */ }) ; </code></pre>
javascript jquery
[3, 5]
3,964,811
3,964,812
On click move option to next select
<p>I would like to move each option on click to next select, here is what currently I have got:</p> <pre><code>&lt;form action="#" method="get"&gt; &lt;select multiple name="players" id="players"&gt; &lt;option value="player"&gt;player&lt;/option&gt; &lt;option value="player1"&gt;player1&lt;/option&gt; &lt;option value="player2"&gt;player2&lt;/option&gt; &lt;/select&gt; &lt;select multiple name="team" id="teams"&gt; &lt;option value="team"&gt;team&lt;/option&gt; &lt;option value="team1"&gt;team1&lt;/option&gt; &lt;option value="team2"&gt;team2&lt;/option&gt; &lt;/select&gt; </code></pre> <p></p> <pre><code> $('#players option').each(function() { $(this).click(function() { $(this).appendTo('#teams'); }); }); $('#teams option').each(function() { $(this).click(function() { $(this).appendTo('#players'); }); }); </code></pre> <p>The problem is when I click on already appended element, it just don't want to move to "original" select. How to fix it?</p> <p>Demo: <a href="http://jsbin.com/ujugej/4/edit" rel="nofollow">http://jsbin.com/ujugej/4/edit</a></p>
javascript jquery
[3, 5]
4,576,181
4,576,182
software design - tools and tips on how to develop api's and such
<p>I have become a software programmer over the years. I have read books on programming, different types software development approaches like waterfall. UML concepts such as class diagrams.</p> <p>But, I'm always lacking in the design side. I'm looking for a tool or something that will easily aid me in designing software.</p> <p>For example, when I'm trying to build a game from scratch. I have a player class, that can shoot and interact. The player class has a super class which is a character. But two days later, I realize I need to add a subclass. I keep having to add functions, classes here and there. It's like i'm writing, rewriting class diagrams and sequence diagrams to the point where it's slowing me down a lot. And when I do start coding, I have to modify the class diagrams yet again. I don't think I'm using the right approach.</p> <p>Is pencil and paper method any better? Is there an easier way to approach classes, interaction, sequences?</p>
java javascript android iphone c++
[1, 3, 4, 8, 6]
1,926,002
1,926,003
(Javascript) Div toggle and cookies
<p>I want to toggle a div#featuredout using a button .featToggle and I want the browser to remember via cookies whether the div#featuredout should be hidden or shown. If possible, I'd like it to be so that if #featuredout is hidden, .featToggle should have an additional class of "hidden" and if #featuredout is shown, .featToggle should have an additional class of "shown".</p> <p>I'm very very inexperienced with Javascript so any help would be great.</p> <p>This is my current code:</p> <pre><code>$(document).ready(function() { // When the toggle button is clicked: $('.featToggle').click(function() { $('#featuredout').slideToggle(550); var featuredoutC = $.cookie('featuredout'); if (featuredoutC == null) {$.cookie('featuredout', 'expanded');}; else if (featuredoutC == 'expanded') {$.cookie('featuredout', 'collapsed');}; }); }); // COOKIES // state var featuredout = $.cookie('featuredout'); // Set the user's selection for the left column if (featuredout == 'collapsed') { $('#featuredout').css("display","none"); $.cookie('featuredout', 'collapsed'); }; }); </code></pre>
javascript jquery
[3, 5]
892,527
892,528
Response.AddHeader attachment doesn't work
<p>here's the code I have:</p> <pre><code> Response.Clear(); Response.AddHeader("content-disposition", "attachment; filename=file.xlsx"); Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; Response.BinaryWrite(pck.GetAsByteArray()); Response.End(); </code></pre> <p>The problem is that when this code is run (On button click) I do not a file for download in my browser (tried in Chrome \ IE).</p> <p>pck is an excel file (Generated with <a href="http://epplus.codeplex.com/" rel="nofollow">epplus</a> library). I don't even know how to debug this part of the code. it's doing nothing.</p> <p>Here's the error I'm getting in my browser:</p> <blockquote> <p>Uncaught Sys.WebForms.PageRequestManagerParserErrorException: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.</p> <p>Details: Error parsing near 'PKX��@ϖ�'.</p> </blockquote>
c# asp.net
[0, 9]
2,942,136
2,942,137
Radio Button not updating value on Server Side
<p>I have 3 radio buttons in a form which are all part of a single group. When one of the non-default radio buttons is clicked, they update on the client side properly (deselects previous radio button and selects new one). I have even attached an OnClientClick to the button that submits the form to test it and right before the form is submitted the .checked values are correct. But the first line of code that is reached on the server side checks the values, again for testing purposes, but .checked values have not changed. The default is still checked according to the server.</p> <p>Here is some of my relevant code:</p> <p>ASP</p> <pre><code>&lt;asp:RadioButton runat="server" ID="rdoDays" Text=" Days" GroupName="RepeatType" /&gt; &lt;asp:RadioButton runat="server" ID="rdoMonths" Text=" Months" GroupName="RepeatType" /&gt; &lt;asp:RadioButton runat="server" ID="rdoYears" Text=" Years" GroupName="RepeatType" /&gt; &lt;asp:Button runat="server" ID="btnSaveAlert" OnClick="btnSaveAlert_OnClick" Text="Save" OnClientClick="Test()" /&gt; </code></pre> <p>Javascript - when month is clicked, the javascript shows "False" then "True" for the alert boxes as it should.</p> <pre><code>function Test() { var rdoDays = document.getElementById("&lt;%= rdoDays.ClientID %&gt;"); var rdoMonths = document.getElementById("&lt;%= rdoMonths.ClientID %&gt;"); var rdoYears = document.getElementById("&lt;%= rdoYears.ClientID %&gt;"); alert(rdoDays.checked); alert(rdoMonths.checked); } </code></pre> <p>Then for the C#, I have set a breakpoint in VS at the very beginning of Page_Init and the radio button .checked values are all "false"</p> <p>I have no idea what's going on. Am I missing a tag in the asp element or something? Any help is greatly appreciated.</p>
c# javascript asp.net
[0, 3, 9]
5,221,071
5,221,072
How do I select a collection of checkboxes...?
<p>I have the html:</p> <pre><code>&lt;tr&gt; &lt;td&gt;&lt;input type="checkbox" value="3" id="userListingSelect0" cssclass="cbDelete"&gt; &lt;/td&gt;&lt;td&gt;general&lt;/td&gt; &lt;td&gt;&lt;a href="editUser.aspx?userId=3"&gt;Edit&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;input type="checkbox" value="1" id="userListingSelect1" disabled="disabled" cssclass="cbDelete"&gt; &lt;/td&gt;&lt;td&gt;hmladmin&lt;/td&gt; &lt;td&gt;&lt;a href="editUser.aspx?userId=1"&gt;Edit&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>And im trying to use jQuery to get all of the checkboxes.</p> <p>Im using:</p> <pre><code>console.log(jQuery('.cbDelete').html()); </code></pre> <p>But all im getting is undefined. How do I...</p> <p>1) Get all the elements 2) Iterate through them?</p> <p>I tried using:</p> <pre><code>jQuery('.cbDelete').each(function () { console.log('got here'); if (this.checked) { selectionMade = true; } resultsGot = true; }); </code></pre> <p>And still it didn't get to to the 'got here' line so it looks like I cant get to collection. Not sure why....</p>
javascript jquery
[3, 5]
5,285,167
5,285,168
Check if a username has been registered
<p>I am using the builtin ASP.NET logon and user management features. Is there a way to just identify if a username or email address is already registered? I would've thought it's part of FormsAuthentication or similar, but can't find such a function.</p>
c# asp.net
[0, 9]
1,265,164
1,265,165
Done PHP with Codeigniter for 2 years. How about C# with ASP.NET MVC for the next level?
<p>Any opinions Ideas Reasons</p> <p>Web development is my first choice but id want to go into developing games once i get more knowledge and become better at programming.</p>
php asp.net
[2, 9]
4,859,522
4,859,523
java script alert a message when user click on window
<p>I am working on a php site.I want to use java script code for alert message when user click on anywhere in window.i am using window.onclick=function name()</p> <pre><code>function function name() { alert('message'); } </code></pre> <p>but it is not working.</p>
php javascript
[2, 3]
2,510,407
2,510,408
jquery select every line that starts with &gt;
<p>What's the easist way to select every line that starts with the:</p> <p>&gt;</p> <p>For example stackoverflow turns every line that starts with &gt; into a quoted line. I want to do the same thing.</p>
javascript jquery
[3, 5]
1,093,653
1,093,654
jQuery IF statement (Only if a web browser on a desktop) not a mobile device / iPad
<p>is there a easy way with jQuery to essentially have a jQUery/JS if statement along the lines of:</p> <pre><code>IF User is on a web Browser on a desktop... not a mobile device / iPad </code></pre> <p>Thanks</p>
javascript jquery
[3, 5]
1,765,012
1,765,013
What is the difference between these 2 javascript?
<p>I have been using Javascript but more in a procedural way not the object oriented way. Recently, I am just getting started to learn Javascript in a OOP manner. Can anybody tell what is the difference between:</p> <pre><code>var foo = { method1 : function(){ } } </code></pre> <p>and</p> <pre><code>var foo = function(){ method: function(){ } } </code></pre> <p>Are both of these same or is the 1st one static class? If both are same then my 2nd question is how do I write methods and call it statically?</p>
javascript jquery
[3, 5]
3,332,321
3,332,322
Variable declaration with its name containing value from loop
<p>i am php developer just started at java i want to declare dynamic variables inside a loop and for that i have to append the loop value to varaible name this is what i want . </p> <pre><code>I would like to make statement like this for (i=1; i&lt;6; i++) { String new_variable_ + i; } </code></pre> <p>the above code does not work in java how to do it ? </p>
java android
[1, 4]
1,440,276
1,440,277
Displaying images from collection in asp.net
<p>I have a collection of custom type which is as follows:</p> <pre><code>[DataContract] public class PhotoDC { public PhotoDC(); [DataMember] public byte[] ImagebyteArray { get; set; } [DataMember] public string Name { get; set; } } </code></pre> <p>I want to show all the items (image and name) on a web form , any idea which control I can use and how can I convert byte array to image ?</p>
c# asp.net
[0, 9]
1,313,043
1,313,044
jQuery javascript binding and calling issue
<p>I have a JavaScript function named 'mc_change'. Also, I have a textbox whose change event should call that JavaScript function</p> <blockquote> <p>&lt;input type="text" id="mc_val" onchange="javascript:mc_change();" /&gt;</p> </blockquote> <p>It's not working<br><br> Can anyone suggest me same normal JavaScript or jQuery?<br><br> Thanks</p>
javascript jquery
[3, 5]
3,988,843
3,988,844
javascript functions in .ascx
<p>I've looked at about 5 Questions here on SOF and haven't really found a useful answer for this. How am I supposed to invoke my javascript functions from client-side events in my .ascx controls? Here is my .ascx file.. what most the answers have led me to:<br/></p> <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeFile="UIMenu.ascx.cs" Inherits="controls_UIMenu" %&gt; &lt;script language="javascript" type="text/javascript"&gt; function insetItem(myMenu) { myMenu.setAttribute("class", "myClass"); } &lt;/script&gt; &lt;asp:Menu ID="Menu1" runat="server" Font-Bold="True" Font-Size="Large" Height="50px" Orientation="Horizontal" Target="_self" StaticMenuItemStyle-HorizontalPadding="10px" OnMenuItemClick="insetItem(this)" StaticMenuItemStyle-BorderStyle="outset"&gt; &lt;Items&gt; &lt;asp:MenuItem NavigateUrl="~/Home.aspx" Target="_self" Text="Home" Value="Home"&gt;&lt;/asp:MenuItem&gt; &lt;asp:MenuItem NavigateUrl="~/Loaner.aspx" Target="_self" Text="New" Value="New"&gt;&lt;/asp:MenuItem&gt; &lt;/Items&gt; &lt;/asp:Menu&gt; </code></pre> <p>I'm getting different errors when doing it this way. ".....ascx does not contain a definition for "insetItem"", and my other pages that use this file don't recognize it anymore. When I try to put the js on the actual .aspx pages that will be using it, I get the same no definition error.<br/><br/> I just started learning jscript, still pretty noob. I'm trying to make it so when the user down clicks a menu item, I want that item's borderstyle to change to "inset". I'm not sure how to change that attribute for the specific item that gets clicked either in javascript >_&lt; but that's another question. If anyone could lead me the right way in doing this too, that'd be amazing. Thanks!</p>
c# javascript asp.net
[0, 3, 9]
1,665,838
1,665,839
jQuery is locking up browser
<p>I am not sure if I should be clearing everything or resetting something somewhere.</p> <p>What is happening is that the browser will lock up for 10 - 30 seconds when setting a int value in the input textbox.</p> <p>Here is a little snippet:</p> <pre><code>function RunIt() { $('#txTotW').bind('keyup', function () { _totWidth = parseInt($(this).val()); $('#totalWidth').text($(this).val()); RunIt(); }); $('#txTotH').bind('keyup', function () { _totHeight = parseInt($(this).val()); RunIt(); }); $('#txBayCnt').bind('keyup', function () { _bayCount = parseInt($(this).val()); RunIt(); }); } </code></pre> <p>If at any time one of the keyup events are fires I rebuild a table by <code>.find('tr').remove()</code> and this table only has three rows max at any time, but since the change of one value the entire table will be rebuilt.</p> <p>This does not seem like a big enough load to make the browser lock up.</p> <p>What can I do to fix this?</p>
javascript jquery
[3, 5]
3,209,158
3,209,159
"search" field to filter content
<p>I'm trying to create a simple "search field", what it does is it searches if typed in text is equal to any data-attr of the boxes in the content and if so, hide everything but what found, something similar (this ain't working):</p> <p>css:</p> <pre><code>.filter-div { display: none; } </code></pre> <p>html:</p> <pre><code> &lt;label for="search"&gt;Search Input:&lt;/label&gt; &lt;input type="search" name="filter" id="search" value="" /&gt; &lt;div class="filter-div" data-filter="one"&gt;one&lt;/div&gt; &lt;div class="filter-div" data-filter="two"&gt;two&lt;/div&gt; &lt;div class="filter-div" data-filter="three"&gt;three&lt;/div&gt; &lt;div class="filter-div" data-filter="four"&gt;four&lt;/div&gt; &lt;div class="filter-div" data-filter="five"&gt;five&lt;/div&gt; </code></pre> <p>jquery:</p> <pre><code> // save the default value on page load var filter = $('.input').val(); // on submit, compare if ( $('.input').val() = $("data-filter") { $(this).show(); } ​ </code></pre> <p>I am also not sure if the content should be filtered with a button click or found content should pop up as click-able text in the search, or should all happen auto? Finally probably I will have to check it against more than one data-attr.</p> <p>Anyone?</p>
javascript jquery
[3, 5]
3,141,014
3,141,015
Equivalent for $.trim in Javascript?
<pre><code>$.trim(value); </code></pre> <p>The above jquery code would trim the text. I need to trim the string using Javascript.</p> <p>I tried:</p> <pre><code>link_content = " check "; trim_check = link_content.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,'').replace(/\s+/g,''); </code></pre> <p>How to use trim in javascript? Equivalent of <code>$.trim()</code> of jQuery?</p>
javascript jquery
[3, 5]
3,221,038
3,221,039
Is there a better way to do a List of Objects?
<p>I am trying to create a list of objects. Is there a better way?</p> <pre><code> // List public List&lt;page&gt; Select() { List&lt;page&gt; _list = new List&lt;page&gt;(); string SqlStatement = "select * from Pages"; SqlConnection thisConnection = new SqlConnection(connStr); // Open the Connection thisConnection.Open(); var thisCommand = thisConnection.CreateCommand(); thisCommand.CommandText = SqlStatement; SqlDataReader thisReader = thisCommand.ExecuteReader(); while (thisReader.Read()) { // Create a new instance of the Current Page Object page currentPage = new page(); // Fill the instance of the Current Page Object currentPage.PageID = Convert.ToInt32(thisReader["PageID"]); currentPage.ParentID = Convert.ToInt32(thisReader["ParentID"]); currentPage.CategoryID = Convert.ToInt32(thisReader["CategoryID"]); currentPage.Name = thisReader["Name"].ToString(); currentPage.PageHTMLContent = thisReader["PageHTMLContent"].ToString(); currentPage.NavigationText = thisReader["NavigationText"].ToString(); currentPage.TopMenu = Convert.ToBoolean(thisReader["TopMenu"]); currentPage.SubMenu = Convert.ToBoolean(thisReader["SubMenu"]); currentPage.DisplayOrder = Convert.ToInt32(thisReader["DisplayOrder"]); currentPage.Active = Convert.ToBoolean(thisReader["Active"]); // Add the instance of the Current Page Object to the List&lt;&gt;. _list.Add(currentPage); } // Close the Database thisConnection.Close(); return _list; } </code></pre>
c# asp.net
[0, 9]
4,300,498
4,300,499
Would like to add pages to gallery
<p>I am creating a gallery with fancybox that needs to constantly be updated and I do not want to have 100 images all on one page. Is there any way to create the gallery as multiple pages in the javascript? For example have a 3 page gallery with 15 images per page? </p> <p>I would prefer to not do separate html documents if possible. </p> <p>Any help would be great! </p> <p>Thank you</p>
javascript jquery
[3, 5]
1,585,124
1,585,125
Can we impliment the operator over loading in Web services?
<p>Hi is it possible to implement operator over loading in Web services in .net</p> <p>Mehar</p>
c# asp.net
[0, 9]
3,975,729
3,975,730
using data table sAjaxSource with parameter
<p>I want to send user inserted value as parameter inside JQuery data table sAjaxSource property. something like this</p> <pre><code>var UsersData = $('input[name="UserValue"]').val(); $('#myTable').dataTable({ "bServerSide": true, "sAjaxSource": "/Home/ProcessThis/UsersData", "aaSorting": [[1, 'desc']], ... </code></pre> <p>how to use this UsersData variable inside sAjaxSource, above sAjaxSource example doesnt work.</p>
c# javascript jquery
[0, 3, 5]
5,835,439
5,835,440
How do I check two input[text] values against each other, using JQuery?
<p>I have a quick question...How do I check two input[text] values against each other?</p> <p>Here's what I have so far:</p> <pre><code>$('#BuyItNowPrice').blur(function(){ if($(this).val() &gt; $('#StartingPrice').val()){ alert("Please make sure that your BuyItNow price is greater than your Starting Price!"); } }); </code></pre> <p>I haven't really touched on form validation. </p> <p>Any help would be greatly appreciated, Thanks</p>
javascript jquery
[3, 5]
5,290,201
5,290,202
How to check a value in a textbox and if it hasn't changed for 3 seconds do something, otherwise check again in 3 seconds?
<p>This is my attempt but I believe 'checker(thisVal)' is the part which is causing problems.</p> <pre><code> $("#search-input").keyup(function () { var thisVal = $(this).val(); if(thisVal!=''){ var checker = function (v){ if($(this).val() !=v){ setTimeout('checker(thisVal)', 3000); } else{ console.log($(this).val()); } } setTimeout(function(){checker(thisVal)}, 3000); } }); </code></pre> <p>Thanks.</p>
javascript jquery
[3, 5]
900,903
900,904
Jquery/JS - Arrow & Return Key Tab Index
<p>I have built my own autocomplete/suggestion feature for my search box.</p> <p>It works fine but I would love to know how I can use keyword arrow keys, to tab through the list of linked suggestions. I'm thinking to start by adding (tabIndex=1, tabIndex=2, tabIndex=3...) or (rel="1", rel="2", rel"3"...) to my links.</p> <p>At the moment, the links are simply:</p> <pre><code>&lt;a onclick="addSuggToTextbox('suggestion1')" tabIndex="1"&gt;Suggestion 1&lt;/a&gt; &lt;a onclick="addSuggToTextbox('suggestion2')" tabIndex="2"&gt;Suggestion 2&lt;/a&gt; ... </code></pre> <p>Well I could probably figure out left and right key navigation, from previous StackOverflow questions... but what confuses me, is allowing my users to click the 'return' key, when they arrow tabbed to the link/suggestion they wanted.</p> <p>So let's say I've just used the right arrow key to scroll along the list of links, to the one I want. How can using the 'return' key, detect which link is focused and to imitate it's onclick event? On click of the 'return' key, I would obviously have a function that passed the parameterized value to the text box.</p> <p><strong>Example:</strong></p> <p>This is what I have managed already:</p> <pre><code>$(document).keydown(function(e) { if (e.keyCode == 13) { $('myLink??????').click(); } }); </code></pre> <p>But how does this function know which link has focus? So I can replace <code>myLink????</code> with the identity of the chosen suggestion link.</p> <p>Any suggestions to get me started (or finished in my case) would be gratefully received.</p>
javascript jquery
[3, 5]
3,344,183
3,344,184
What does this javascript code do? How can I modify to make it a standalone script in the header?
<p>Look at the source of <a href="http://people.iola.dk/olau/flot/examples/realtime.html" rel="nofollow">http://people.iola.dk/olau/flot/examples/realtime.html</a></p> <p>The function that draws the graph is for some reason IN the HTML instead of the header. It also has some mad weird <code>$(function() {});</code> enclosing syntax - no idea what that is. </p> <p>How can I move all of that working code to the header as a self-contained function to draw the graph?</p>
javascript jquery
[3, 5]
5,643,458
5,643,459
Can I convert a php $_POST variable into a jquery variable?
<p>I want to know can I convert a php $_POST variable into a jquery variable. I have php variable below:</p> <pre><code>&lt;?php $postduration = $_POST['durationChosen']; ?&gt; </code></pre> <p>Can I convert the php variable above into a jquery variable?</p> <p>Thanks</p>
php jquery
[2, 5]
2,398,724
2,398,725
Automatically hide a div using jQuery if it gets no MouseOver in a time interval
<p>I have a workaround that shows a div when a menu item gets MouseOver, but hides both only when the div gets MouseOut. This is required for now.</p> <p>However, if the div never gets MouseOver, it never hides. What I would like to do is automatically hide the div if it doesn't get MouseOver within a few milliseconds of showing.</p> <p>The hiding after a time shouldn't be hard, but reseting this on a MouseOver challenges me. Any ideas?</p>
javascript jquery
[3, 5]
4,783,806
4,783,807
Help with ASP.NET HttpWebRequest
<p>I began to learn ASP.NET and C#, to get more familiar with techniques I want to make plugin for open source <a href="http://ifdefined.com/bugtrackernet.html" rel="nofollow">BugTracker.Net</a> application. Where I am stacked is that for adding new issue application need to get HttpWebRequest on insert_bug.aspx</p> <p>I did make basic thing working on code like this:</p> <pre><code>string Url = "http://localhost:8090/insert_bug.aspx"; string post_data = "&amp;username=admin" + "&amp;password=admin" + "&amp;short_desc=Description" + "&amp;comment=Comment" + "&amp;projectid=1" byte[] bytes = Encoding.UTF8.GetBytes(post_data); HttpWebResponse res = null; try { HttpWebRequest req = (HttpWebRequest) System.Net.WebRequest.Create(Url); req.Credentials = CredentialCache.DefaultCredentials; req.PreAuthenticate = req.Method = "POST"; req.ContentType= "application/x-www-form-urlencoded"; req.ContentLength=bytes.Length; Stream request_stream = req.GetRequestStream(); request_stream.Write(bytes,0,bytes.Length); request_stream.Close(); res = (HttpWebResponse) req.GetResponse(); } catch (Exception e) { Console.WriteLine("HttpWebRequest error url=" + Url); Console.WriteLine(e); } </code></pre> <p>I want to insert also CATEGORY into my issues and reading code on insert_bug.aspx i fund part for defining category for opening issue </p> <pre><code>if (Request["$CATEGORY$"] != null &amp;&amp; Request["$CATEGORY$"] != "") { categoryid = Convert.ToInt32(Request["$CATEGORY$"]); } </code></pre> <p>Question: What and How I can add "$CATEGORY$" to my request so the issues I added have defined category.</p>
c# asp.net
[0, 9]
419,972
419,973
How to get the number of days between two dates?
<p>I need to calculate the number of days between 2 date. I have check the codes given this link <a href="http://stackoverflow.com/questions/2627473/how-to-calculate-the-number-of-days-between-two-dates-using-javascript">How to calculate the number of days between two dates using JavaScript? </a>.</p> <p>In this example if give input 2012,02,29 and 2012,03,01 it gives output as 3. Actual answer should be 1. These there any other methods to calculate the number of days between 2 dates ?</p>
javascript jquery
[3, 5]
2,722,339
2,722,340
String is not replaced in CreateUserWizard Registration Email
<p>My website allows users to create accounts. </p> <p>Upon creating, an email verification with a URL will be send to the user's email. </p> <p>Problem: The sending of email worked but unfortunately the verification URL did not appear.</p> <p>And for </p> <pre><code>&lt;a href="&lt;%VerifyUrl%&gt;"&lt;%verifyUrl%&gt;&lt;/a&gt;&lt;/p&gt; </code></pre> <p>there is a green curly line beneath "&lt;%VerifyUrl%>", stating that this file could not be found. </p> <p>This is the source code of Login.aspx : </p> <pre><code>protected void CreateUserWizard1_SendingMail(object sender,MailMessageEventArgs e) { MembershipUser userInfo = Membership.GetUser(CreateUserWizard1.UserName); //Construct the verification URL string verifyUrl = Request.Url.GetLeftPart(UriPartial.Authority) + Page.ResolveUrl("~/Verify.aspx?ID=" + userInfo.ProviderUserKey.ToString()); // Replace &lt;%VerifyUrl%&gt; placeholder with verifyUrl value e.Message.Body = e.Message.Body.Replace("VerifyUrl", verifyUrl.ToString()); } </code></pre> <p>This is the html file that what user would see in their email: </p> <pre><code>&lt;h2&gt; Welcome to My Website!&lt;/h2&gt; &lt;p&gt; Hello, &lt;%UserName%&gt;. You are receiving this email because you recently created a new account at my site. Before you can login, however, you need to first visit the following link:&lt;/p&gt; &lt;p&gt; &lt;a href="&lt;%VerifyUrl%&gt;"&gt;&lt;%verifyUrl%&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt; After visiting the above link you can log into the site!&lt;/p&gt; &lt;p&gt; If you have any problems verifying your account, please reply to this email to get assistance.&lt;/p&gt; &lt;p&gt; Thanks!&lt;/p&gt; </code></pre>
c# asp.net
[0, 9]
5,220,776
5,220,777
add using jquery
<p>I want to do this</p> <pre><code>var x=$(this).attr('id'); var y = x+1; </code></pre> <p>where x is an integer</p> <p>but the value I get is x1</p> <p>How do I do get the 16, if x=15?</p> <p>Thanks Jean</p>
javascript jquery
[3, 5]
4,253,014
4,253,015
How can link each tab to different aspx pages?
<p>I have a application to allow the user upload and download the files. Because the security reason, I have separate the application to Upload.aspx and Download.aspx.</p> <p>On the default page, I would like use tabs to display upload and download page.</p> <p>I am very new in the .net world. This might be a very stupid question, but is it possible using multiview to link to two different pages. All the example I have seen so far, the multiview only show static page.</p> <p>Can any experts give me some advice how should I approach this problem.</p> <p>![sample images][1] function Upload() { top.content.location.href = "wox_upload.aspx"; } </p> <pre><code>&lt;div class="tabContents"&gt; &lt;asp:MultiView id="MultiView1" ActiveViewIndex="0" Runat="server"&gt; &lt;asp:View ID="View1" runat="server"&gt; Upload.aspx &lt;/asp:View&gt; &lt;asp:View ID="View2" runat="server"&gt; Download.aspx &lt;/asp:View&gt; &lt;/asp:MultiView&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; </code></pre> <p> </p>
javascript asp.net
[3, 9]
1,376,721
1,376,722
Convert Java to C#
<p>Could someone pls show me how to convert the following java code into C#. I've tried using TransformBlock to handle the multiple md.update calls but I keep getting the same hash each time - which is different from the java output.</p> <p>Thanks. </p> <pre><code>public static String encrypt(String key, String value) { java.security.MessageDigest md = null; // System.out.println( "-"+key+"-" + " -"+value+"-"); try { md = java.security.MessageDigest.getInstance("MD5"); } catch (Exception e) { e.printStackTrace(); return null; } md.update(key.getBytes()); md.update(value.getBytes()); byte[] bb = md.digest(); // System.out.println( bb.length ); StringBuilder s = new StringBuilder(""); for (byte element : bb) { s.append(byteToHex(element)); } // System.out.println(s.toString()); return s.toString(); } public static String byteToHex(byte by) { int x = by; if (x &lt; 0) { x = 256 + x; } // System.out.println(x); int a, b; b = x % 16; a = (x - b) / 16; // System.out.println( a ); // System.out.println( b ); char q; if (a &lt;= 9) { q = (char) (a + 48); } else { q = (char) (a - 10 + 65); } char w; if (b &lt;= 9) { w = (char) (b + 48); } else { w = (char) (b - 10 + 65); } return "" + q + "" + w; } </code></pre>
c# java
[0, 1]
3,370,021
3,370,022
Insert User Email into Form Automatically jQuery
<p>I am trying to grab text generated by javascript and paste it into a forms input value field. This is what I have so far:</p> <pre><code>var txt=$('#grabemail').text(); $('#email').val(unescape(txt)); &lt;p id="grabemail" style="color:#fff;"&gt; &lt;script type="text/javascript"&gt;formData.display("email")&lt;/script&gt; &lt;/p&gt; </code></pre> <p>The only problem is that when the jQuery grabs the text from #grabemail it not only takes the email but it also takes 'formData.display' so I end up with:</p> <p>formData.display("email")[email protected]</p> <p>In the field as opposed to just the email.</p> <p>I cannot edit the JS inside of the #grabemail div.</p> <p>Anybody have any ideas on how to fix this?</p>
javascript jquery
[3, 5]
5,075,716
5,075,717
How do I know a particular event.keyCode corresponds to a character and not a command key (such as arrows, tab or enter)
<p>I'm using javascript/jQuery.. on the <code>keydown</code> of an <code>input[type='text']</code> I receive a key code. I need to determine whether it's a character code or a command code because I need to know whether the input will change. I cannot use the <code>change</code> event as this event is postergated until the element loses focus.</p>
javascript jquery
[3, 5]
2,348,941
2,348,942
jQuery script to click automatically on a link
<p>My current code that i use is this:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $('#on_holiday').trigger('click'); }); &lt;/script&gt; </code></pre> <p>How ever, this only works when the 'ID' is 'on_holiday' within the input form. I need this to work when I have another element within the form - The current 'ID' is:</p> <pre><code>&lt;a href="#" data-reveal-id="on_holiday" class="side_link"&gt;Test&lt;/a&gt; </code></pre> <p>My problem is when ever I add the element 'ID' to this link, it messes up the data-reveal-id and its cause. I need some sort of jQuery code that can click this link without the need to put the 'ID' field in.</p> <p>Many thanks in advance. </p>
javascript jquery
[3, 5]
3,995,294
3,995,295
Using JavaScript With C# For non browser based operations
<p>I recently had to take a quick look at Adobe InDesign server. In this enviroment you write your interactions with the servers libs via JavaSscript. </p> <p>This got me thinking, how could I use the Javascript language within a C# application so that I could expose set bits of functionality of my API/framework and allow others to write small plugins with JavaScript. </p> <p>As JS is a pretty popular language so I would have thought that I wouldnt have to go writing my own impterpretor or anything, but I could be wrong. Any ideas where I would start with something like this?</p> <p>Cheers, Chris. </p>
c# javascript
[0, 3]
3,891,625
3,891,626
problem of back history not being clear after logout in asp.net
<pre><code>protected void Page_Load(object sender, EventArgs e){ Session.Abandon(); FormsAuthentication.SignOut(); Page.Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Redirect("~/Admin/adminLogin.aspx"); } </code></pre> <p>I m not using any master page.so i have make one logout page and write code in it as above. But after logout it still goes back to previous page.</p>
c# asp.net
[0, 9]
2,676,257
2,676,258
How to write in a id of form
<p>I have to write in a textarea but i have two "id" equal because i create the form for changing data. If the form is:</p> <pre><code>&lt;form method="GET" name="formparam" id="formparam" action="${nextstep}"&gt; &lt;label&gt;ID&lt;/label&gt;&lt;/td&gt;&lt;td&gt; &lt;textarea class="expand" name="inputp'+v+'_id" id="inputp'+v+'_id"&gt; &lt;/textarea&gt; &lt;/form&gt; </code></pre> <p>And for Call i use this script:</p> <pre><code>function qs(key) { key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&amp;"); // escape RegEx control chars var match = location.search.match(new RegExp("[?&amp;]" + key + "=([^&amp;]+)(&amp;|$)")); return match &amp;&amp; decodeURIComponent(match[1].replace(/\+/g, " ")); } function Pcompila(v){ var i; var Listparam=['_id','_description','_info','_type','_value']; for (i=0;i&lt;Listparam.length;i++) { var a ='inputp'+v+ Listparam[i]; alert(a); if (location.search) { var p=qs(a); alert(p); $('#'+a).text(p); } } return; } </code></pre> <p>Where <code>$('#'+a).text(p);</code> is wrong because don't write.<br /> How to change for calling the id in a form???.<br /> I try with this:</p> <pre><code>$("formparam").$('#'+a).text(p); </code></pre> <p>This is a absolute wrong!!!</p>
javascript jquery
[3, 5]
1,624,818
1,624,819
converting json string into json on client side?
<p>In my javascript code I am getting json string from cs file</p> <pre><code>var tmpString="&lt;%=resultset2%&gt;"; </code></pre> <p>In cs I am concatenating strings to build json string. Here is an issue the json string is returned as a string and it has " with it.</p> <pre><code>"[{id:'1',name:'Aik'},{id:'2',name:'Aik or Aik'}]" </code></pre> <p>Because of " in beginning and end javascript code treat it as a string. Kindly guide me how I should sort out this issue. </p> <p>thanks</p>
c# javascript asp.net
[0, 3, 9]
5,828,977
5,828,978
iphone application client - server user authentication practices
<p>I am going to create a iPhone application that will be having the user login (username/pass) mechanism. on the server side i am using PHP.</p> <p>i want to know the best practices for this kind of client/server authentication and session management.</p> <p>looking for replies. Thank you.</p>
php iphone
[2, 8]
16,634
16,635
jQuery - double click class reveals drop down to select
<p>I am having major trouble with this.</p> <p>I am trying to write something in jQuery, when text is double clicked it hides that element and shows a select drop down... However, when the user leaves that element, the drop down should go back to the original text.</p> <p>I have tried so many methods, and none work. I tried using dblclick with hover, etc. </p> <p>In a short recap, user clicks div with text. Div is hidden select is shown. Users mouse leaves area, drop down is hidden, div is shown again.</p> <p>Thanks for the help, I have been playing with this for far too many hours!</p>
javascript jquery
[3, 5]
2,223,162
2,223,163
how can i store visitor infomation like reach time ,duration of visit,and exact location of visitor in php
<p>I want to store visitor information like reach time ,duration of visit and also exact location of the visitor.</p> <p>Can any one give me any ideas about it? Please help me.</p> <p>Thanks &amp; Regards Dasarathi</p>
php javascript jquery
[2, 3, 5]
5,661,344
5,661,345
Trying to set fileinput val from drag and drop Jquery file
<p>Im trying to make a simple uploader where users drag and drop files from the desktop into the website element. I believe I figured out how but I cant seem to get any information on the file. How can I set a file inputs value from a drag and drop? Here is the drag and drop code im not sure if its correct. The box does change color when draged over thats about it.</p> <pre><code>$(".droparea").bind({ dragleave: function (e) { e.preventDefault(); $(".droparea").css("backgroundColor","white"); }, drop: function (e) { e.preventDefault(); //something here to set the FileInput element val() }, dragenter: function (e) { e.preventDefault(); $(".droparea").css("backgroundColor","Green"); }, dragover: function (e) { e.preventDefault(); } }); </code></pre>
javascript jquery
[3, 5]
5,366,967
5,366,968
Can Only .click Once
<p><a href="http://jsfiddle.net/cwUcM/" rel="nofollow">http://jsfiddle.net/cwUcM/</a></p> <p>I've gone through all of the other threads that seems to have a similar title, but I haven't found anything =(</p> <p>I added a console.log, which also only fired after the first click.</p> <p>It should be a fairly simple issue.</p> <p>Why is the event only being fired after the first click?</p> <p>Thanks!</p>
javascript jquery
[3, 5]
291,966
291,967
how do I clear the values in my text input fields?
<p>My code doesn't run and I want the value to be cleared when you click on another </p> <p>what am I doing wrong?</p> <p><a href="http://jsfiddle.net/AL2vS/" rel="nofollow">http://jsfiddle.net/AL2vS/</a> </p> <pre><code>var placeholderText = $('input').val(); $(placeholderText).focus(function() { $(this).attr('value', ""); }); $(placeholderText).blur(function() { $(this).attr('value', phTextVal); });​ </code></pre>
javascript jquery
[3, 5]
412,247
412,248
Add multiple controls to panel in webforms
<p>I would like to be able to add multiple label controls to a panel and display them on an onlick event. The code I have does what I want it to the first time, then the label is simple replaced with a new label on the second onlick event and so on. </p> <p>Here is what I have so far:</p> <pre><code> private void createTaskLabel(Guid GoalID, string Goal) { Label taskLabel = new Label(); taskLabel.ID = GoalID.ToString(); taskLabel.Text = Goal.ToString(); TaskPanel.Controls.Add(taskLabel); } </code></pre> <p>So, for instance, this creates a new label with a uniqueID (handled elsewhere) and places it within the panel and displays it. When the onlick fires again, the same label is simply replaced instead of a new one appearing below it.</p>
c# asp.net
[0, 9]
3,172,449
3,172,450
how to printing/create pdf files from an asp.net page?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/9685215/export-to-pdf-in-asp-net-3-5">export to pdf in asp.net 3.5</a> </p> </blockquote> <p>What is a tools can I use to print asp.net pages ? Is there any good software to create pdf files for asp.net? is there any free software that takes care of this?</p>
c# asp.net
[0, 9]
95,496
95,497
Double postback required for place holder control
<p>Here's a fun problem. The page in question is wizard like page. here's the scenario-</p> <ol> <li>User clicks on a link button to get to step 2 of the wizard. (The post back can't be avoided. URL based navigation isn't an option.)</li> <li>User clicks on a radio button/link button/any control that requires a postback for client-server interaction.</li> <li>The page reloads as if nothing happens.</li> <li>User repeats step 2. Things work fine.</li> </ol> <p>What I do is this - </p> <p>I have just one page for all steps of the wizard. Based on the step, the appropiate control is loaded into the page. This control is added to a placeholder control in the OnLoad event. Doing so in OnInit or OnPreRender doesn't work. This step of adding introduces the odd behaviour I've described above.</p> <p>Any ideas?</p>
c# asp.net
[0, 9]
2,904,113
2,904,114
How to save an array of simple objects in my android app?
<p>I'm currently creating my first android app and I've a simple class 'Player' I want to save a few instances (a dozen or two) of that consist of 5 ints. All I wish to use them for is for the user to be able to save and load players.</p> <p>I'm currently a bit bewildered as to how to do this as googling and searching this site returns Parcelable, Serializable, JSON, Externalizable, SQL, Simple XML, shared preferences and many more techniques all of which have pros and cons and look quite complex to work given they may be slow or might not work or not be suited to the simplicity of what I wish to do.</p> <p>What approach of compression and storage should I be taking? Thanks</p>
java android
[1, 4]
2,440,125
2,440,126
How to called many function in one function using javascript?
<p>I have many functions. I am using an asp.net control. I want to call all of functions in one (main) function. This is a return type function. This must use Javascript.</p> <pre><code>function a(){ if(b==c){ return true }else{ return false; } function b(){ if(b==c){ return true; }else{ return false; } function c(){}//return type </code></pre> <p>Function a, b, and c called function in main function.</p> <pre><code> function main() { //?? } </code></pre> <p>This function is not a work.</p>
javascript asp.net
[3, 9]
1,872,680
1,872,681
Text box value doesn't get post after selecting a date from Jquery datepicker
<p>I create a textbox and add a Jquery UI datepicker.But when I select and click the button.the textbox doesnt get post and show an error message like(Notice: Undefined index: date_text in C:....................\file.php on line 57 ).But when I enter a date using keyboard without having a datepicker it will submit well.Please help me.How can I do this having datepicker</p> <p>this is my jquery code</p> <pre><code>&lt;script&gt; $(function() { $( "#datepicker" ).datepicker(); $( "#datepicker" ).datepicker( "option", "dateFormat", "yy-mm-dd" ); }); &lt;/script&gt; </code></pre> <p>this is my textfield</p> <pre><code>&lt;div id="datetobe"&gt;Date to be dispose &lt;label for="date_to_dispose"&gt; &lt;input name="datepicker" type="text" id="datepicker" class="textfield" /&gt;&lt;/label&gt; &lt;/div&gt; </code></pre>
php javascript jquery
[2, 3, 5]
291,461
291,462
How to display html content using Javascript or jQuery?
<p>Currently I use iFrame to display third party content. For example, my news page displays live website from CNN, MSNBC, Foxnews in single page. </p> <p>Currently, I am just using iFrame to display those sites, but I was wondering if there is a better way to display the contents using Javascript, jQuery or other type of Javascript library?</p> <p>Thanks</p> <p>[edit] Is there a way I can compress the iframe and display it <strong>as</strong> a thumbnails without converting it to an image. Just shrink everything. </p>
javascript jquery
[3, 5]
1,382,644
1,382,645
<%@ Page Debug="True" ...... %>
<p>Does setting this value have the same effect as setting the debug="true" in the web.config file? If not, what does it do? </p> <p>Thanks for the help.</p>
c# asp.net
[0, 9]
4,477,674
4,477,675
How can I take jquery id in session
<p>This is my jQuery code for taking id value when I click <code>itemslist</code> </p> <pre><code>$(document).ready(function() { $('.itemslist ul li').click(function() { $id = $(this).attr("class"); }); }); </code></pre> <p>But session is not taking that id value </p> <pre><code>session_start(); $_SESSION['catname'] = $id; $id= $_SESSION['catname']; session_destroy(); </code></pre> <p>Can any one please say the answer about this?</p>
php jquery
[2, 5]
5,179,611
5,179,612
Display DIV on right click of image
<p>I'm trying to figure out how I can get a DIV to show at the position of the mouse when someone right clicks on an image. An example can be found <a href="http://www.icstone.us/" rel="nofollow">here</a>. </p> <p>I've searched around and found the following code...</p> <pre><code>$('img').bind('contextmenu', function(e){ return false; }); </code></pre> <p>This of course will prevent the right click. Though I don't know how to make the DIV appear at the location of the mouse click.</p> <p>May I please get pointed in the right direction?</p> <p>Thanks! ​</p>
javascript jquery
[3, 5]
5,881,014
5,881,015
ToString() format is not working
<p>I've a strange problem. We use Dutch and French lanuage on our site (nl-NL / fr-FR)</p> <p>I'm binding to a gridview and the strange thing is, the numeric value-saparator (dot) is not displaying well for French (fr-FR)</p> <p>ASP.NET</p> <pre><code>protected void gridview_RowDataBound(object sender, GridViewRowEventArgs e) { Label lbla_min_10 = new Label(); lbla_min_10 = e.Row.FindControl("lbla_min_10") as Label; lbla_min_10.Text = ((int)DataBinder.Eval(e.Row.DataItem, "a_min_10")).ToString("#,#.###"); //.... } </code></pre> <p>e.g. DB value is 24369<br> in Dutch it displays 24.369 and </p> <p>in French it displays 24 369 -> there is no DOT separator, but an empty space.</p> <p>I looked at the view source and the code looks the same except theres is a (dot) in NL and (space) in FR..... </p> <p>Does someone have any idea? </p> <p>why does it work for Dutch (nl-NL) fine and not for French (fr-FR)?</p>
c# asp.net
[0, 9]
1,989,934
1,989,935
How can i rearrange div order at every reload?
<p>Is there a way of rearanging div order? More exact how can i get from</p> <pre><code>&lt;div id="1"&gt;&lt;/div&gt; &lt;div id="2"&gt;&lt;/div&gt; &lt;div id="3"&gt;&lt;/div&gt; &lt;div id="4"&gt;&lt;/div&gt; </code></pre> <p>this</p> <pre><code>&lt;div id="3"&gt;&lt;/div&gt; &lt;div id="1"&gt;&lt;/div&gt; &lt;div id="4"&gt;&lt;/div&gt; &lt;div id="2"&gt;&lt;/div&gt; </code></pre> <p>or any other order at every reload.</p>
javascript jquery
[3, 5]
78,259
78,260
Guider.js highlight feature not work
<p>I use guider.js for create a user helo tour. Everything work but highlight feature. I seems to "guiders_highlight" css class set and z-index of element bigger than overlay but not work and that element still be under the overlay. "guiders_highlight" use relative position property but overlay position is fixed. Is this style currect.</p>
javascript jquery
[3, 5]
1,456,137
1,456,138
is there any keyword 'capital' in javascript?
<p>I am calling a funtion named 'capital()' but it is not working and 'capita' is working. is it a keyword in js or wht is this ?</p> <p>here is the code see it, test it</p> <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;HTML Select Element&lt;/title&gt; &lt;script type="text/javascript"&gt; function capita(){ alert('yes'); c = new Array("Islamabad", "Tehran", "Bejing", "New Delhi", "Kabul"); var i; i = document.f1.country.selectedIndex; document.f1.capital.value=c[i]; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;h3&gt;Countries and Capital&lt;/h3&gt; &lt;form name="f1" method="post"&gt; The capital of &lt;select name="country" id="country" onChange="capita();"&gt; &lt;option selected&gt;Pakistan &lt;option&gt;Iran &lt;option&gt;China &lt;option&gt;India &lt;option&gt;Afghanistan &lt;/select&gt; is &lt;input type="text" name="capital" value="Islamabad"/&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
javascript jquery
[3, 5]
4,057,063
4,057,064
Delete a table row with javascript / jquery
<p>This is not working. Firebug is not throwing any error though. </p> <p>HTML: </p> <pre><code>&lt;table&gt; &lt;tr&gt;&lt;td&gt;BookA&lt;/td&gt;&lt;td&gt;&lt;a href="javascript:deleteRow($(this));" class="red"&gt;Delete&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;BookB&lt;/td&gt;&lt;td&gt;&lt;a href="javascript:deleteRow($(this));" class="red"&gt;Delete&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;BookC&lt;/td&gt;&lt;td&gt;&lt;a href="javascript:deleteRow($(this));" class="red"&gt;Delete&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;BookD&lt;/td&gt;&lt;td&gt;&lt;a href="javascript:deleteRow($(this));" class="red"&gt;Delete&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; </code></pre> <p>Javascript:</p> <pre><code>function deleteRow(ref) { $(ref).parent().parent().remove(); } </code></pre> <p><strong>If possible, I would like to use a solution with inline javascript</strong></p>
javascript jquery
[3, 5]
2,853,848
2,853,849
JQuery - Extend and Access Superclass
<p>Is there a way to access the super object when extending objects using $.extend?</p> <p>I would like to extend an object, override a method, but call the overridden superclass method in the subclass method. </p>
javascript jquery
[3, 5]
982,521
982,522
Android Java to light LED via Bluetooth on Arduino BT board with Amarino
<p>I'm currently working on a project now.. Requiring me to do a home automation bluetooth device. The basic requirement for my project is to control in lighting the led on Arduino BT via Android app(created using Eclipse) from a phone. However, i'm rather poor in programming. As i've not learned anything regarding Java programming. So, i really needed some help here with my project, as i have no idea how to start on it even i've research alot from the internet.. Thank you so much! =)</p> <p>p/s: i've found this : <a href="http://stackoverflow.com/questions/10327506/android-arduino-bluetooth-data-transfer">Android + Arduino Bluetooth Data Transfer</a> , which i think it's rather similar to my project. please help me to check if i can use this codes as reference.</p>
java android
[1, 4]
1,899,854
1,899,855
Android: Is there a way to execute JavaScript from my app?
<p>I was hoping to find something in the Android sdk similar to the <code>javax.script</code> package in Java; but haven't been able to find anything. Am I missing a way to execute JavaScript from my app?</p>
javascript android
[3, 4]
1,677,978
1,677,979
Importing multiple HTML Pages into a single div on page load
<p>I am trying to import multiple HTML External pages into a single div. Example: I am page1.HTML, page2.html and so on. I have this piece of JQuery:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function() { $('.main').load('page1.html'); }); &lt;/script&gt; </code></pre> <p>This works fine except I am not sure how to add multiple pages to become imported into the same div on page load.</p> <p>Thank my friends.</p>
javascript jquery
[3, 5]
3,641,424
3,641,425
Loading MySQL content dynamically to table through dropdown menu
<p>I have a following problem: I would want to load MySQL table content dynamically, without page refresh to table using dropdown menu. I got it working with plain text with the help of this page: <a href="http://www.designing4u.de/2008/05/jquery-drop-down-loading-content-according-to-option/" rel="nofollow">http://www.designing4u.de/2008/05/jquery-drop-down-loading-content-according-to-option/</a> but I don't know how to get content from MySQL table and print it to table instead of plain text.</p> <p>For example if I have a MySQL table called "Animal" with 3 fields: Cat, Dog, Horse and a second field with information of a specific animal:</p> <p><strong>Animal</strong> -></p> <p>Cat, Dog, Horse -></p> <p>Is a cat, Is a dog, Is a horse</p> <p>So I create a dropdown list: Cat, Dog, Horse and when pressing one of them, it prints information on that specific animal to HTML table.</p>
php jquery
[2, 5]
3,215,943
3,215,944
Is there any way to insert a custom class in an existing inheritance tree?
<p>I’m working on an android application that currently has two Activities, A and B, that have some code in common, their options menu and some other code. To cut down on copying and pasting, I created a class called BaseActivity that extends Activity with the, and I then had A and B extend BaseActivity. At least that’s what I wanted to do, but I ran into a problem. While A now extends BaseActivity just fine, I can't figure out how to make B extend BaseActivity because it's not just an activity, it’s a MapActivity. So it’s inheritance tree looks like this:</p> <p>MapActivity inheritance tree:</p> <pre><code>java.lang.Object android.content.Context android.content.ContextWrapper android.view.ContextThemeWrapper android.app.Activity com.google.android.maps.MapActivity </code></pre> <p>But in order for it to inherit my code, I’d need to make it look like this:</p> <pre><code>java.lang.Object android.content.Context android.content.ContextWrapper android.view.ContextThemeWrapper android.app.Activity mypackage.BaseActivity com.google.android.maps.MapActivity </code></pre> <p>Is there any way to insert my custom class in an inheritance tree?</p>
java android
[1, 4]
4,728,855
4,728,856
What is the point of a = a;? Analysing the jQuery source
<p>From the jQuery <a href="http://code.jquery.com/jquery-1.7rc1.js" rel="nofollow">1.7rc1 source code</a> (lines 1822-24):</p> <pre><code>if ( jQuery.isArray( name ) ) { name = name; } </code></pre> <p>What's the point of having <code>name = name</code>? Could the two <code>name</code>s be different?</p>
javascript jquery
[3, 5]
2,808,901
2,808,902
javascript within php
<p>I am trying to do the following in jquery</p> <pre><code>&lt;?php echo "&lt;script&gt;"; echo "$(document).ready(function(){"; echo "$('#mainbody-wrapper').removeClass('mainbody-wrapper')"; echo ";"; echo "$('#mainbody-wrapper').addClass('newStyle')"; echo ";"; echo "contentHeight=$('.content').css('height') + 20"; echo ";"; echo "alert(contentHeight)"; echo ";"; echo "$('#mainbody-wrapper').css('height',contentHeight)"; echo ";"; echo "$('#subcontent-wrapper').remove()"; echo ";"; echo "})"; echo "&lt;/script&gt;"; </code></pre> <p>?></p> <p>But the variable contentHeight output 300px20. I want to do javascript addition, but its getting concatenated. How can this be achieved?</p>
php jquery
[2, 5]
2,077,762
2,077,763
Unterminated String error while iterating
<p>This is my code :</p> <pre><code>&lt;c:forEach items="${entry.value}" var="keyval"&gt; var bdgroup= { elem1: '${keyval.partno}', elem2: '${keyval.location}', elem3: '${keyval.village}', elem4: '${keyval.id}' }; exampleArray.push(bdgroup); &lt;/c:forEach&gt; </code></pre> <p>i am getting </p> <p>'unterminated string literal error'`</p> <p>sometimes it works fine but for other times this error happens..</p>
javascript jquery
[3, 5]
866,968
866,969
Can I manage the AlarmClock in Android from my application?
<p>I develop an application which must manage the Alarm Clock in Android. I specifically need to do the following:</p> <ul> <li>execute some code in my application when the user sets an alarm (also find out the time of the alarm at the moment of execution);</li> <li>cancel an alarm when the user pushes a specific button in my application;</li> <li>execute some code in my application when an alarm goes off.</li> </ul> <p>I must mention that I am not interested in the CPU alarms, but the Alarm Clock application, which people use to wake up.</p>
java android
[1, 4]
1,505,726
1,505,727
Displaying contents details via hover like stackoverflow with javascript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1449574/jquery-show-hide-class-on-hover">JQuery Show hide class on hover</a> </p> </blockquote> <p>just like stackoverflow, when you hover on any tag it will load the description and details of that tag. Is there a way i can accomplish this with a javascript plugin like jquery of doing in manually. Any reference would be grate.</p>
javascript jquery
[3, 5]
1,009,032
1,009,033
How to hide iframe src
<p>I noticed that all the Facebook applications that running inside an iframe hiding their iframe SRC, instead of the real src there is a "javascript:""". How can i do that? I want that my iframe will hide the original src</p> <p>thanks!</p>
javascript jquery asp.net
[3, 5, 9]
1,638,774
1,638,775
Solution for storage virtual coins in mobile application
<p>What is the best solution for storage of virtual coins in a mobile app? Of course I can store locally on the device only, but this has many disadvantages I think.</p> <p>For online solutions, how do you handle synching the coins when there is no connectivity?</p> <p>Are there some services who do these things, or should I write my own service?</p>
android iphone
[4, 8]
4,577,500
4,577,501
Which Adapter subclass best suits implementing a ExpandableList with different element types?
<p>I am trying to implement something similar to the "add contact" list. This is my first time using the ExpandableList, and am not sure how to implement the adapter, since some of the items will be edit text fields, some will be expandable etc.</p> <p>Adapters that I have looked at are SimpleExpandableListAdapter and BaseExpandableListAdapter, both in the sample section of the SDK</p>
java android
[1, 4]
985,328
985,329
How to use jQuery to prevent the space key from entering a space?
<p>I thought it would be a simple thing to hijack the space key when in a form input so that it would function like a hyphen. Generally jQuery makes stuff like this really simple.</p> <p>The code I tried is this:</p> <pre><code> $("#StreamUrl").keydown(function (e) { if (e.keyCode == 32) return 109; }); </code></pre> <p>But this has no effect whatsoever. I tried a more simple script:</p> <pre><code> $("#StreamUrl").keydown(function (e) { //if (e.keyCode == 32) return 109; alert(e.keyCode); }); </code></pre> <p>This script correctly alerts 32 on space press and 109 on hyphen press. Also, I have no JavaScript errors.</p> <p>Why wouldn't <code>if (e.keyCode == 32) return 109;</code> work? When I replace that line with <code>if (e.keyCode == 32) alert("space!!");</code> I get the alert correctly, so I know the <code>if</code> is returning <code>true</code> correctly.</p> <p>What gives?</p> <h2>Edit - Solution</h2> <p>Thanks to @Nick for pointing out the copy-paste issue. I ended up with a little bit of a hybrid. Here's the code that I have gotten to work which is both smooth and handles Copy/Paste.</p> <pre><code> $("#StreamUrl").keydown(function (e) { if (e.keyCode == 32) { $(this).val($(this).val() + "-"); // append '-' to input return false; // return false to prevent space from being added } }).change(function (e) { $(this).val(function (i, v) { return v.replace(/ /g, "-"); }); }); </code></pre>
javascript jquery
[3, 5]
5,347,898
5,347,899
Need to implement a grid in android
<p>I need to implement a grid that will show the position of some physical objects. I want to interact with the objects: I want to be able to send commands or request their "health" status (the objects happen to be sensor nodes). <br><br>The size of the grid is given by the user but is always square (<code>width=length=a</code>).<br><br></p> <p>Any ideas will be appreciated. </p> <p>Creation of a custom view might be an option. If so share your thoughts on this.</p> <p>The grid that I am talking about should look like this <a href="http://1.bp.blogspot.com/_NWSHay-_Gtk/R8hsDLaG9XI/AAAAAAAAAKU/DO6Ltp8v7zY/s1600-h/grid.gif" rel="nofollow">http://1.bp.blogspot.com/_NWSHay-_Gtk/R8hsDLaG9XI/AAAAAAAAAKU/DO6Ltp8v7zY/s1600-h/grid.gif</a> where my objects are expected to be situated in the nodes of the grid.</p>
java android
[1, 4]
1,501,948
1,501,949
Check if User has clicked "Ok" for "onbeforeunload event"
<p>I am checking when the user closes the browser window, if he says ok, how i do I trigger some action, like opening another window or saving a form. If he chooses "cancel", it should stay in the same page (which is working now). pls share some idea on how to approach this issue</p> <p><a href="http://jsfiddle.net/sk5yc/13/" rel="nofollow">Sample Code</a></p>
javascript jquery
[3, 5]
168,298
168,299
How to find each next element with specific class name using jQuery?
<p>I have a html structure in my webpage as below :</p> <pre><code>&lt;div class="group_name"&gt;Group A&lt;/div&gt; &lt;div class="student_name"&gt;Studen 1&lt;/div&gt; &lt;div class="student_name"&gt;Studen 2&lt;/div&gt; &lt;div class="student_name"&gt;Studen 3&lt;/div&gt; &lt;div class="group_name"&gt;Group B&lt;/div&gt; &lt;div class="student_name"&gt;Studen 1&lt;/div&gt; &lt;div class="student_name"&gt;Studen 2&lt;/div&gt; &lt;div class="student_name"&gt;Studen 3&lt;/div&gt; .. . . </code></pre> <p>Now this structure is dynamically generated using PHP. What I want to do is, I want to add below code as a last element of "Group A" :</p> <pre><code>&lt;div class="student_name"&gt;Studen 4&lt;/div&gt; </code></pre> <p>But I want to add it using jQuery, as I am getting this "Student 4" record as a Ajax response string. So the div is getting added based on the Group Name. At the moment I have used static value for group name as "Group A". So the Javascript will be something like below :</p> <pre><code>$(".group_name").each(function(index){ var group_name = $(this).text(); if(group_name=='Group A'){ // Add Student 4 to last position of this group } }); </code></pre> <p>So this way I am already selecting the "Group A" element. But now I want to add "Student 4" as the last entry in that group (below "Student 3"). How can I do this ?</p> <p>Thanks in advance.</p>
php javascript jquery
[2, 3, 5]
5,935,194
5,935,195
JSON Object - how to get values
<p>I have the following </p> <pre><code> JSONObect {"28":["Mugisha","Christian"]} </code></pre> <p>from a larger JSONArray that I need to be able to translate </p> <pre><code> {"28":["Mugisha","Christian"]} </code></pre> <p>into an object which has</p> <pre><code>int itemId; String firstName; String lastName; </code></pre> <p>How do I go about this?</p>
java android
[1, 4]
368,928
368,929
How to stop function reload(window.reload) on jquery or javascript?
<p>Source</p> <pre><code>$(function reload(){ $.ajax({ . . . window.setTimeout(reload, 3000); }); }); </code></pre> <p>This function reload ajax page on every 3 sec.</p> <p>I want to make stop button(#stop).</p> <pre><code>$('#stop').click(function){ //STOP FUNCTION }); </code></pre> <p>Please let me know how to make it?</p>
javascript jquery
[3, 5]
2,944,551
2,944,552
stop two pieces of jquery from conflicting?
<p>hi i have two pieces of jquery code running alongside one another and the 2nd jquery is causing the 1st jquery to break (not work).</p> <p>I am trying to use no conflict but i dont think im using this right. please can someone show me how to fix this, thanks.</p> <p>jquery 1:</p> <pre><code> &lt;script type="text/javascript" src="assets/js/js_photos/jquery.easing.1.3.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="assets/js/js_photos/jquery.gridnav.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $.noConflict(true) $(function() { $('#tj_container').gridnav({ type : { mode : 'seqfade', // use def | fade | seqfade | updown | sequpdown | showhide | disperse | rows speed : 500, // for fade, seqfade, updown, sequpdown, showhide, disperse, rows easing : '', // for fade, seqfade, updown, sequpdown, showhide, disperse, rows factor : 100, // for seqfade, sequpdown, rows reverse : '' // for sequpdown } }); }); &lt;/script&gt; </code></pre> <p>jquery 2:</p> <pre><code> &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"&gt;&lt;/script&gt; &lt;script src="assets/js/scroll/jquery.mousewheel.min.js"&gt;&lt;/script&gt; &lt;script src="assets/js/scroll/jquery.mCustomScrollbar.js"&gt;&lt;/script&gt; &lt;script&gt; (function($){ $(window).load(function(){ $(".board-wall-feeds").mCustomScrollbar(); }); })(jQuery); &lt;/script&gt; </code></pre>
javascript jquery
[3, 5]
4,023,508
4,023,509
how to get empty row in DropDownList
<p>i have this citys in my database:</p> <pre><code>city1 city2 city3 city4 </code></pre> <p>i what to see this in my DropDownList:</p> <pre><code>[empty] city1 city2 city3 city4 </code></pre> <p>this is my bind code:</p> <pre><code>SQL = "select distinct City from MyTbl order by City"; dsClass = new DataSet(); adp = new SqlDataAdapter(SQL, Conn); adp.Fill(dsClass, "MyTbl"); adp.Dispose(); DropDownList3.DataSource = dsClass.Tables[0]; DropDownList3.DataTextField = dsClass.Tables[0].Columns[0].ColumnName.ToString(); DropDownList3.DataValueField = dsClass.Tables[0].Columns[0].ColumnName.ToString(); DropDownList3.DataBind(); </code></pre> <p>how to do it (asp.net C#) ?</p> <p>thanks in advance</p>
c# asp.net
[0, 9]