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,093,353
4,093,354
JQuery - Fade Out Elements After Being Created
<p>I'm currently working on a JQuery game (Just to get around with using JQuery) and on certain collisions, an "explosion" class is created. </p> <p>Right now I'm using <code>$("#game").append("the div html code goes here")</code> to add it in the game div. Now, how do I make it so after the element is created, it fad...
javascript jquery
[3, 5]
5,284,909
5,284,910
class cannot be serializied
<pre><code>[Serializable] public class KeyValue { public List&lt;Dictionary&lt;string, string&gt;&gt; pair { get; set; } } </code></pre> <p>Exception comes Keyvalue pair cannot be serialized when i am insert data into profile. Whats the problem?</p>
c# asp.net
[0, 9]
1,523,007
1,523,008
Getting the size of a image after it is cloned and resized using jQuery
<p>I'm trying to write some jQuery code that gets the combined width of images that have been cloned and resized before they are shown, the problem is that before they are added to the DOM the width is always 0. </p> <pre><code>(function($){ var $images = createDiv(), totalWidth = 0; //loop through ...
javascript jquery
[3, 5]
5,419,098
5,419,099
ASP.NET and jQuery - call from codebehind
<p>This is a problem i've tried so solve before but gived up. Basicly i'm using ModalPopupExtenders (from AJAX.NET) to display Panels with a few content (text, controls, etc). And i'm calling it from codebehind. And it works well.</p> <p>But now i want to replace the ModalPopup with some jQuery dialog box. The proble...
asp.net jquery
[9, 5]
4,745,767
4,745,768
onclick submit one of two same form
<p>I included one file (containing a form) two times in php file.I want to submit one form with onclick function. both forms are same. i wrote onclick function document.formname.submit();</p> <p>I want to do somthing like this document.this.form.submit(); please give some solution.</p>
php javascript jquery
[2, 3, 5]
272,618
272,619
Android App development for a newbie
<p>I have done a bit of programming in Java and the whole point of this project is to learn something new.</p> <p>I want to create an Android App which would record a users voice, and then it would change the recording, and give you an output.</p> <p>The change in the recording would be the frequency or pitch of the ...
java android
[1, 4]
4,047,007
4,047,008
How do i find the difference between two dates using jquery
<p>I want to get reaming days to go particular date so i am trying to detection of particular date with today date. but this not working here is my <a href="http://jsfiddle.net/sureshpattu/sJueG/" rel="nofollow">code</a> If the date is next month 27 how can i get remaining days to go</p> <pre><code> var date2=new...
javascript jquery
[3, 5]
4,435,343
4,435,344
How can I select an element based on its position?
<p>How is it possible to select an element based on its position?</p> <pre><code>&lt;div id="parent"&gt; &lt;p id="text"&gt;This is a text&lt;/p&gt; &lt;/div&gt; </code></pre> <p>//CSS</p> <pre><code>#parent{width:100px;height:100px;position:absolute;left:100px;top:100px;} </code></pre> <p>Now using the left=10...
javascript jquery
[3, 5]
2,764,932
2,764,933
How to export javascript generated report to pdf?
<p>I made a reporting engine with javascript for my project... The problem is with printing.. Although with page-break and css i can produce a good looking report, i want to export that report to a pdf in order to be printed better without ,the url,page title and other stuff that browsers add. Note in Chrome there isnt...
java javascript
[1, 3]
2,657,694
2,657,695
dynamically add a name anchor tag within dynamic content page
<p>I have a page that lists over 100 items and I need to dynamically add a name="" tags to the beginning of each new section of items that starts with the next alphabet.</p> <p>For example:</p> <pre><code>&lt;a name="a"&gt;&lt;/a&gt; &lt;h1&gt;Amazon River&lt;/h1&gt; &lt;h1&gt;Arrow Heads&lt;/h1&gt; &lt;a name="b"&...
php javascript
[2, 3]
1,844,989
1,844,990
Canvas not visible on particular device (One X)
<p>I think I am facing a small issue. My problem is that I am drawing a speedometer based on <a href="http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/" rel="nofollow">http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/</a>. And the needle is visible on all d...
java android
[1, 4]
4,807,393
4,807,394
PHP with javascript code, live clock
<p>Hey I would to create a live clock to put it on my website. So I wrote a simple php with JavaScript code for that, here is it: </p> <pre><code>&lt;?php Function d1() { $time1 = Time(); $date1 = date("h:i:s A",$time1); echo $date1; } ?&gt; &lt;script type="text/javascript"...
php javascript
[2, 3]
5,063,943
5,063,944
Download XML client-side, fetch data from Session first
<p>My goal is to have the user be able to download some information currently stored in Session. There are multiple key/value pairs in Session I would like to have the user download as one XML file.</p> <p>The control I am working with has a client-side 'onClick' event exposed. I was planning on calling a PageMethod t...
c# javascript asp.net
[0, 3, 9]
2,333,416
2,333,417
how do i stop a form submit with jQuery
<p>I have this form <a href="http://posnation.com/shop_pos/" rel="nofollow">here</a> and i dont want them to go to the next page without certain selections</p> <pre><code>&lt;form method="post" action="step2/" id="form1"&gt; .... .... .... &lt;input type="submit" class="submit notext" value="Next" /&gt; </code></pre> ...
javascript jquery
[3, 5]
5,747,233
5,747,234
Get every nth item in array
<p>I have an array of HTML elements. I'm checking whether a previous object in the array exists like this:</p> <pre><code>var boxes = $('.box'); // creating the array boxes.each(function(i){ // going through the array var prevBox = i&gt;0?$(boxes[i-1]):false; // check whether a previous box exists if (prevBox...
javascript jquery
[3, 5]
3,893,130
3,893,131
ASP.Net Repeater Eval in an If statement
<p>So I've been looking around for a good answer to this question, but haven't really found anything useful. Hopefully someone can shed some light on this for me.</p> <p>Basically, I have a repeater that is backed by a database table. Inside the ItemTemplate for this repeater, I have some HTML elements that are popula...
c# asp.net
[0, 9]
312,529
312,530
Remove common string from a string using jquery or Javascript
<p>How can remove the 'tp.','ta.' and 'tta.' from below string from each place where it is coming</p> <pre><code>str = " tp.FirstName, tp.FamilyName, ta.DOB, tta.TypeOfLocation WHERE tp.DateStamp BETWEEN '2012-02-12 15:13:00' AND '2013-02-12 15:13:00' AND tta.db_name_id =21 AND tp.FirstName = 'Darlene'"; </code></p...
javascript jquery
[3, 5]
583,689
583,690
VideoView in Fullscreen
<p>How do I get the VideoView to go Fullscreen in lanscape?</p> <p>I've set the following in the manifest file for the activity.</p> <p>android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"></p> <p>Is there anything else I need to do?</p>
java android
[1, 4]
3,647,502
3,647,503
Monitor the progress of an input stream / httpclient.exectute
<p>I'm trying to get the progress of an Apache HTTP Client Execute method. Is it possible to either</p> <ol> <li>Get the mount of input stream that has been read by the execute method or </li> <li>Monitor the execute process using some internal method either by percent or amount of data sent?</li> </ol> <p>The code b...
java android
[1, 4]
4,157,630
4,157,631
How much data can be stored using .data method?
<p>How much data can be stored using $.data method in Jquery? Are there any pitfalls of using it?</p> <p>I tried to get an answer for this very concrete question, however, I couldn't find any.</p> <p>Thanks</p>
javascript jquery
[3, 5]
4,310,865
4,310,866
jQuery add event for a selector that hasn't been "added" to page yet
<p>I have a <code>&lt;div&gt;</code> tag that gets added to the page depending on user variables (I'm using jquery append() to add it to the page)</p> <pre><code>&lt;div id="message"&gt;&lt;/div&gt; </code></pre> <p>I would like to have a click event for this div, but I think I am having problems because I am listeni...
javascript jquery
[3, 5]
5,385,858
5,385,859
Reading selected value of dropdown list in HTML by jQuery
<p>I am trying to read the value of the selectedID in a drop down list in html through jQuery but it keeps producing an error. Did I miss something?</p> <pre><code>&lt;select style="width: 80px;" class="text ui-widget-content ui-corner-all" id="metaList"&gt; &lt;option value="4d5e3a8c418416ea16000000"&gt;Wikipedia&lt;...
javascript jquery
[3, 5]
1,396,778
1,396,779
How to delete string from string with regex and jQuery/JS?
<p>I wonder, how to delete: </p> <pre><code>&lt;span&gt;blablabla&lt;/span&gt; </code></pre> <p>from:</p> <pre><code>&lt;p&gt;Text wanted &lt;span&gt;blablabla&lt;/span&gt;&lt;/p&gt; </code></pre> <p>I'm getting the text from <strong>p</strong> using:</p> <pre><code>var text = $('p').text(); </code></pre> <p>And ...
javascript jquery
[3, 5]
1,591,979
1,591,980
How to call function defined using jquery in js?
<p>Here is sample jquery code</p> <pre><code>$(document).ready(function(){ $('#myId').change(function(){ regularJSfunc('data1','data2'); }); } </code></pre> <p>now i want to trigger function call of $('#myId').change , can i do it through java script ?</p>
javascript jquery
[3, 5]
4,800,906
4,800,907
Rely on javascript to execute PHP script or manipulate hidden form elements and rely on PHP?
<p>I wrote a JavaScript script that swaps two selected <code>img</code> tag <code>src</code> values.</p> <p>The point is to let the user rearrange a list of images.</p> <p>For sending the new order to a PHP script, I have two ideas:</p> <ol> <li><p>Have a button execute a JavaScript function that gathers the new ord...
php javascript
[2, 3]
1,448,825
1,448,826
browser history for Selectable (jQuery UI)
<p>How can I keep open seletable item when I go to the other pages? When I come back I want it is already open last one, whether when I reload page or come throught "previous page" (browser history). <strong>ui-state-active</strong> is set to item which is currently open. </p>
javascript jquery asp.net
[3, 5, 9]
5,746,228
5,746,229
How to execute a python script in .NET application..?
<p>When user click Build button Python script needs to run.I execute this by using process but so many processes created when so many clicked the Build button, server hang.</p>
c# asp.net
[0, 9]
3,541,994
3,541,995
getting css attributes before the containing div is toggled
<p>I've made a user control containing a panel, which is being loaded in a page, being toggled. in the js of that userControl i have a function in my document.ready that needs those attributes such as height, width, position, z-index. but those are all set to 0 cause the whole containing div is'nt yet toggled. what sho...
javascript asp.net jquery
[3, 9, 5]
3,337,733
3,337,734
How to deal with the callback being called multiple times when animating more than one thing in jQuery
<p>Consider this code...</p> <pre><code>$(function() { for (var i = 0; i &lt; 10; i++) { $('body').append('&lt;div style="width: 30px; height: 30px; background: red; margin: 10px;" /&gt;') } $('div').slideUp(1000, function() { $('body').append('done sliding'); }); }); </code></pre> ...
javascript jquery
[3, 5]
4,269,683
4,269,684
jQuery returns full page to Ajax
<p>Here's a link i saw but still confused over the answers provided for them : <a href="http://stackoverflow.com/questions/2586217/jquery-ajax-returns-the-whole-page">jQuery Ajax returns the whole page</a></p> <p>My situation is something similar. </p> <p>I have a index.php that calls for a popup login form, that tr...
javascript jquery
[3, 5]
4,605,142
4,605,143
Why jQuery do this: jQuery.fn.init.prototype = jQuery.fn?
<p>Little extended question is why jQuery do</p> <pre><code>jQuery.fn = jQuery.prototype = { init: function() {...}, f1: function() {...}, ... }; jQuery.fn.init.prototype = jQuery.fn; </code></pre> <p>Why not simply add <code>f1()</code> etc into <code>init.prototype</code>? Is it only aesthetic or there are ...
javascript jquery
[3, 5]
361,625
361,626
Using native c++ code in c# - problem with std::vector
<p>I want to use my native c++ functions from dll in managed c# code. But my functions take arguments like std::vector&amp; - a vector reference... How I can implement this argument in dllimport statement? I know for example that there are IntPtr and so on but what will be for std::vector&lt;>?</p>
c# c++
[0, 6]
2,835,376
2,835,377
jQuery selectors: targeting inputs in a form
<p>I have the following:</p> <pre><code>$('#registration_form input[type=text], #registration_form input[type=password]') </code></pre> <p>And I feel it can be much better: faster and shorter</p> <p>Something like</p> <pre><code>$('#registration_form input[type=text,password]') </code></pre> <hr> <p><strong>EDIT:...
javascript jquery
[3, 5]
5,752,150
5,752,151
Javascript AJAX call to Jquery Call
<p>In order to have my code written almost fully written in Jquery, I want to rewrite an AJAX call in Jquery.</p> <p>It's a call from a webpage to a Tomcat servlet.</p> <p>Similar code of my present situation:</p> <pre><code>var http = new XMLhttpRequest(); var url = "http://example.com/MessageController?action=send...
javascript jquery
[3, 5]
1,496,961
1,496,962
Why does my JQuery Image swap not work in firefox or chrome, but fine in IE?
<p>Relatively new to JQuery. I've got some code that does a banner swap with a fade in fade out transition. The images swap as expected in IE8, chrome, and firefox. However, the actual fade, the smooth transition between images only works in IE.</p> <p>Can anyone point me in the right direction for a fix?</p> <p>Java...
javascript jquery
[3, 5]
5,730,577
5,730,578
Getting a weird exception Unparseable date: "6 Aug 2012"
<p>I got a date time format - <code>"dd MMM yyyy"</code>, when trying to parse "6 Aug 2012", I get an java.text.ParseException Unparseable date.</p> <p>Every thing looks fine, do you see the problem?</p>
java android
[1, 4]
4,069,956
4,069,957
How to display the latest called object on top?
<p>I'm creating a custom select plugin. Everything is going great, but the dropdowns (<code>&lt;ul&gt;</code>-objects) are overlapping on each other :(</p> <p>I understand, that the overlapping order is set after the elements order on page or when they are created. So my question is: <strong>What is the method to make...
javascript jquery
[3, 5]
5,831,841
5,831,842
How to "run method" from different android class
<p>First and foremost, like so many, I have just recently began to try and learn Java and Android Development. I am following some tutorials and so on. Anyhow, I am attempting to do something that is probably very simple but I am unsure of syntax to complete, and because of such, not sure how to search it on the inte...
java android
[1, 4]
4,403,118
4,403,119
Convert client time to utc time to save into sql
<p>How could I go about having a client in various time zones select a date and time in their web browser and save it as utc time in my sql database? This date is a date in the future, so whether or not the date is in daylight savings time could change so I'll need to account for that.</p> <p>The site is a asp.net c#...
c# asp.net javascript
[0, 9, 3]
1,671,495
1,671,496
JQuery search and copy DIV
<p>I have a div </p> <pre><code>&lt;div id="s1"&gt;s1&lt;/div&gt; </code></pre> <p>Can JQuery check the ID and create a copy of the div BUT with the 1 being changed to the next number?</p>
javascript jquery
[3, 5]
3,485,333
3,485,334
Which HttpUtility decode method to use?
<p>this may be a silly question, but it trips me up every time.</p> <p><code>HttpUtility</code> has the methods <code>HtmlDecode</code> and <code>UrlDecode</code>. Do these two methods decode anything (Html/Http related) I might find? When do I have to use them, and which one am I supposed to use?</p> <p>Just now I h...
c# asp.net
[0, 9]
2,526,455
2,526,456
Get number of pictures using URL and Directory.GetFiles
<p>I want to get the number of pictures that is in a folder on a website. But I can't find a way to do it.</p> <p>I have tried to use </p> <pre><code>string a = Request.QueryString["nr"]; string[] filePaths = Directory.GetFiles(@"URL" + a, a + "_profil*"); </code></pre> <p>But it doesn't work. I get the error:</p> ...
c# asp.net
[0, 9]
4,735,372
4,735,373
Replacing &ndash; character using Javascript or JQuery
<p>I need to replace the dash in a title on by site with a span tag and line break to break to title over two lines. Unfortunately I don't have access to do this in the PHP :(</p> <p>The below statement seems to do this. Although with bugs as it's making this change to the character throughout the page.</p> <pre><cod...
javascript jquery
[3, 5]
670,534
670,535
append data is not showing? HELP!
<p>im trying to append data using jquery, but its only showing the status messages but not the button! although the button deos show on firebug?</p> <pre><code>$("form.follow-form").live('submit', function(e) { /* stop event */ e.preventDefault(); /* "on request" */ $(this).find('i').addClass('active'); /* sen...
php javascript jquery
[2, 3, 5]
3,012,571
3,012,572
How to send array to Javascript function from another page?
<p>I have a static site (let's call it settings page), and my Javascript function takes with AJAX data from mysql table and draws table on a HTML document. It works like a charm - it takes all the data I need and doing it in a proper way. Here's my function:</p> <pre><code>function get_people() { $.post("/controll...
php javascript jquery
[2, 3, 5]
327,362
327,363
Stopping twitter api from refreshing
<p>On my webpage, I have the following link:</p> <pre><code>&lt;asp:LinkButton ID="lnkChangePic" runat="server" onclick="lnkChangePic_Click" Text="Upload new profile picture"&gt;&lt;/asp:LinkButton&gt; </code></pre> <p>When you click it, it calls this function:</p> <pre><code> protected void lnkChangePic_Click(ob...
javascript asp.net
[3, 9]
786,023
786,024
Insert } to Complete ClassBody error even with matched braces
<p>Yes. I know this is trivial. But this is getting silly. </p> <p>Image proving the error:</p> <p><img src="http://i.stack.imgur.com/BXMUG.png" alt="enter image description here"></p> <p>The code:</p> <pre><code>package apack.age; import android.app.Activity; import android.content.Intent; import android.net.Uri;...
java android
[1, 4]
5,266,553
5,266,554
How to find a directory in ASP.NET
<p>I'm working on an Intranet web application on a server somewhere, and I wish that application to generate files so I can download them to my local PC.</p> <p>I connect to this application using a URL in the browser like this...</p> <p><a href="http://myapp.ourplace.com" rel="nofollow">http://myapp.ourplace.com</a>...
c# asp.net
[0, 9]
2,440,506
2,440,507
jQuery or JavaScript is it possible to call in another JavaScript file that was not initially loaded in the dom?
<p>I am working with an MVC framework with PHP and in my views I only try to load whats needed for the view. However sometimes I need something from a script that may not have been called into play with the loading of the DOM. This is mostly out of the sake of curiosity to know if there is a way I can load another java...
javascript jquery
[3, 5]
6,456
6,457
jQuery: Can't cache onclick handler?
<p>I've got a step-by-step wizard kind of flow where after each step the information that the user entered for that step collapses down into a brief summary view, and a "Go back" link appears next to it, allowing the user to jump back to that step in the flow if they decide they want to change something.</p> <p>The pr...
javascript jquery
[3, 5]
4,795,991
4,795,992
Can't add programmatic controls in ASP.NET
<p>I've got a page in ASP.NET, and I'm dynamically adding a subclass of WebControls.Button to the <code>Controls</code> data member of a pre-existing static TableCell. The button displays fine in the browser as expected. But when I click the button, the event handler I added for <code>button.Click</code> is not being c...
c# asp.net
[0, 9]
2,870,215
2,870,216
Get all text nodes using jquery
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/298750/how-do-i-select-text-nodes-with-jquery">How do I select text nodes with jQuery?</a> </p> </blockquote> <p>In jquery we can select an element using:</p> <pre><code>$(#elem).get(); </code></pre> <p>is the...
javascript jquery
[3, 5]
5,454,091
5,454,092
javascript code executes when grid refreshes
<p>I have a gridview, the gridview refreshes when I type something in the search box that is on top of the gridview, the problem is when the gridview refreshes it excutes a javascript code that is present on the linkbutton click event, this linkbutton is inside the gridview.</p> <p>I don't want the javascript to be ex...
javascript asp.net
[3, 9]
445,957
445,958
Android adding Listener with resources to many buttons
<p>I have a very weird problem with my Android project. I have a 2d array of buttons and i am trying to add action listener to those. So this is what i have:</p> <pre><code>for ( i = 0; i&lt;buttons.length;i++) { for ( k = 0; k&lt;buttons[i].length;k++) { String but = "mtp" ...
java android
[1, 4]
4,624,042
4,624,043
Android - Can't create simple rectangle shape... UnsupportedOperationException?
<p>I'm having trouble creating a simple rounded rectangle using XML. Every time I try to add the "corners" element to the custom shape I get:</p> <blockquote> <p>java.lang.UnsupportedOperationException at android.graphics.Path.addRoundRect(Path.java:514) at android.graphics.drawable.GradientDrawable.draw...
java android
[1, 4]
2,544,572
2,544,573
Apply a function to a variable? JavaScript/jQuery
<p>For example</p> <pre><code>var contents = 'some text'; function fileSave(path){ // I'll handle saving the file, but I need the file contents } contents.fileSave('index.html'); </code></pre> <p>So when the function is fun on the contents variable, the function has access to the variable. Like how replace() works ...
javascript jquery
[3, 5]
682,664
682,665
Algorithm for 'Shift + Clicking' items in a collection to select them
<p>I am trying to mimic the file selecting from Windows Explorer in Javascript. I notice Windows Explorer has two types of "selecting". One is the normal selection which highlights the file and the other one is a dotted line which means that file is currently focussed on. So I am using "selected" and "focus" as css cla...
javascript jquery
[3, 5]
5,179,336
5,179,337
Print Asp.Net page with 3 print copy,2 copy carry copy word.?
<p>i have one asp.net page. i want to print that page on single click of button with[window.print()] this is working fine. but i want to print page on single click with three copy one original and 2 copy with carry copy word in asp.net</p>
c# javascript asp.net jquery
[0, 3, 9, 5]
3,072,051
3,072,052
Fade effect with timer?
<p>How to set a timer for a fade effect? Say text1 will fade out in 5 seconds, then text2 will appear, then it will fade out after 5 seconds, then text3 will appear. I'm not knowledgeable in jQuery. </p> <p>Say I have 3 texts:</p> <pre><code>&lt;div class= "text1&gt;Text 1&lt;/div&gt; &lt;div class= "text1&gt;Text 2&...
javascript jquery
[3, 5]
5,657,565
5,657,566
How to wrap script in setTimeout
<p>I have some jquery code which resets image sliders to slide 1 when the tabs are clicked. The problem is, it happens instantly, so you see a little flicker of the reset slider before the tab fades out. </p> <p>I want to "hold" the reset back about half a second until it fades out. </p> <p>I have been told I need to...
javascript jquery
[3, 5]
5,523,172
5,523,173
Send JSON with FormData-Object through XHR
<p>I've been trying to send images through AJAX to my PHP script and I got it to work out fine. Now I want to send some serialized info along with the images. I've tried a few things to no avail. Can anyone help?</p> <pre><code>var formdata = New FormData(); var info = $('#upload').serializeArray(); $.ajax({ url: "...
javascript jquery
[3, 5]
2,200,247
2,200,248
Best filename to include JQuery in an embedded application
<p>I'm using JQuery for an embedded system that is isolated from the outside word. Therefore jquery exists on the local server (the embedded system). The question is: what would be the best file name to include JQuery in my html?</p> <ol> <li><code>&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt...
javascript jquery
[3, 5]
1,539,871
1,539,872
Issue with JavaScript binding?
<p>I have a drag oriented UI I'm putting the finishing touches on. I was having trouble with losing the mousemove event outside of the parent container, and found some code to bind the mousemove and mouseup functions to the document instead of the element. I tried to apply this to my code but have been unsuccessful so ...
javascript jquery
[3, 5]
3,248,411
3,248,412
creating dynamic table header
<p>i am developing monthly report of attendance sheet of a class. so for that i am thinking to create header dynamically (limit of loop will be the no of days in a month, which i am getting from javascript code) so can ne one pls suggest me with the function to print this kind of table . this is my function to get num...
javascript jquery
[3, 5]
3,881,653
3,881,654
What is a real-world practical application for using return false instead of e.preventDefault() and vice-versa?
<p>I understand that if I return false it's essentially calling <code>e.preventDefault()</code> and <code>e.stopPropagation</code>.</p> <p>My question lies in the decision of when I would want to continue event flow vs stopping it altogether. Could we list some real-world situations where I would want to use <code>e.p...
javascript jquery
[3, 5]
4,502,317
4,502,318
PHP JS Transform date to user timezone
<p>I have a page that shows future events along with the date (server time). I need some method to display the date in user time.</p> <p>Example:<br> Oct, 26 13:48:23 (server)<br> Oct, 26 14:48:23 (user time (UTC +1)) -> event info</p> <p>What I have so far:</p> <pre><code>&lt;?php $sql=mysql_query("SELECT * FRO...
php javascript
[2, 3]
4,869,783
4,869,784
Extracting time from string
<p>I have a string in the format of something like this: "7:18 am"</p> <p>What I'd like to be able to do is extract the "718" (not the colon in between) and the "am" into two separate variables.</p> <p>I tried doing something like this, but it only returned the first integer - in this case, the 7.</p> <pre><code>var...
javascript jquery
[3, 5]
3,996,789
3,996,790
How to load .ascx control in .aspx page with out postback or reloading the page
<p>I have some code that is running fine , what i want is when i create a cookie i want the .ascx control to load to perform some function on the cookie but i don't want the page to post back, how can i achieve that.</p>
javascript asp.net
[3, 9]
1,587,397
1,587,398
$find returning null
<p>I have radGrid in <code>.ascx</code> page in which I want to find the control using <code>$find</code> but it returns a null to me. Below is my code which I am using to get the object (written in .ascx).</p> <pre><code>&lt;script type="text/javascript"&gt; $(function () { var Rates_gridID = $find('&lt;%...
jquery asp.net
[5, 9]
5,963,562
5,963,563
Checking and unchecking checkboxes after postback in Page_PreRender
<p>I have a dynamic table that's in a update panel. The data of the table gets filled form the code behind. In every row there is a checkbox. After a postback the checkboxes get rechecked if they need to be checked. I have all the items that needs to be chacked in a list. This list gets checked in the PreRenderer. This...
c# asp.net
[0, 9]
2,458,373
2,458,374
Jquery chat how track user session
<p>We have implemented a Jquery chat in our company for internal communications.it is working fine. We are saving user status on data base, when a user logged in save his status on DB, when he logged out change status as log out.</p> <p>Issue is that if any user does not click the logged out button and close the windo...
php jquery
[2, 5]
1,075,883
1,075,884
How to get a collection of divs with jquery?
<p>I want to get the second img:</p> <pre><code>&lt;form id="formElem" name="formElem" action="" method="post"&gt; &lt;fieldset class="step"&gt; &lt;img src="1.jpg" &gt; &lt;/fieldset&gt; &lt;fieldset class="step"&gt; ...
javascript jquery
[3, 5]
1,032,923
1,032,924
Restricting characters entered in textbox using Javascript
<p>I need to validate a textbox that it should allow only certain characters and after the limit is reached the textbox should not allow entering characters in it.It can be done by Javascript but dont know how to do.. Anyone please help.. </p>
javascript asp.net
[3, 9]
1,894,975
1,894,976
How can I format a number to the fixed locale?
<p>How can I insert to a string comma (,) after every 3 position starting from last? </p> <pre><code>input desired output 9876567846678 9,876,567,846,678 567 567 1234 1,234 </code></pre> <p>I used one method like first divide the whole string by three position and th...
java android
[1, 4]
562,576
562,577
Writing a quiz application
<p>im making a quiz application in asp.net using c#. The following code is my start page where on clicking on start i'm redirected to my questions page. The only reason I've added a start.aspx page ... so I could initialize the values in the Session. Here in the page_load event the- request.QueryString["testid"] always...
c# asp.net
[0, 9]
3,439,528
3,439,529
Clear cookie with javasript or php script
<p>i have a problem need all you guys help me.i set the cookie with javascript when the user make change to the select tag in html code and clear i want to clear it.</p> <p><em>*</em> if in php script i just need to clear or delete it , but if in jquery script i need to delete the old one immediately and set a new one...
php javascript
[2, 3]
2,643,022
2,643,023
Reloading data using javascript
<p>I'm trying to create an image with text on it that people can edit on the same page. But a lot of the information that will be placed on the image is being taken from another source using <code>file_get_contents</code> via PHP. I want user's to be able to click a refresh button to reload the image and data on the im...
php javascript
[2, 3]
5,652,848
5,652,849
Changing the UI of a webform when the browser language changes
<p>I need to change the location of some controls of a webform when the page is opened in a different language. That is I simply need to Localize the GUI of the Webform too along with the text of the webform.</p>
c# asp.net
[0, 9]
3,826,137
3,826,138
Return value from child thread
<p>I'm writing an Android app that communicates with a website. Any time I hit the website, I'm displaying a ProcessDialog so that the user knows something's happening. Most of my website communication is one-way, so I don't usually expect any return data.</p> <p>There is one point however where I need to get inform...
java android
[1, 4]
5,889,140
5,889,141
"Guard" operator like JavaScript in PHP
<p>I like to do this in JavaScript:</p> <pre><code>function (a, b, c) { var foo = a || b || c; return foo.bar; } </code></pre> <p>Is there a quick way to do assignment with fallback or does it require a custom <code>function</code>?</p>
php javascript
[2, 3]
1,579,901
1,579,902
Validate form before submit with jQuery post to javaScript then to confirmation page
<p>I need to validate a form using jQuery then submit it to a JavaScript file that redirects it to the confirmation/send mail page. The reason I am doing this is to prevent spam emails with out putting some type of Captcha in. I am basically putting in a wrong url for the post to page of the form and then changing that...
php javascript jquery
[2, 3, 5]
2,063,290
2,063,291
How to convert this javascript code in to jquery
<pre><code>if (window.parent.frames['scripts1']) { if (window.parent.frames['scripts1'].document.documentElement) { var strSCRIPT = window.parent.frames['scripts1'].document.documentElement.textContent; if ((strSCRIPT.lastIndexOf('bbbbEND') - strSCRIPT.length) != -7) { window.parent.frames['scripts1'].d...
javascript jquery
[3, 5]
5,734,629
5,734,630
PHP/Javascript, Real Filename from Rewritten URL
<p>I have a Javascript bookmarklet that POSTs to a PHP script, and I need PHP to know the filename of the page that the bookmarklet is POSTing from. I'll be using that filename with <code>file_put_contents()</code>, so I need it to be a real file.</p> <p>The PHP will also be running on the same server as the page bein...
php javascript
[2, 3]
5,945,854
5,945,855
Invoking clearInterval for a Property Instance of an Initialized Custom jQuery Plugin
<p>I've written many js scripts &amp; jQuery plugins, so here's a condensed pseudo coded scenario of my dilemma.</p> <p>Assume we have a well written jQuery plugin defining an a method object to pass into our plugin.</p> <pre><code>// OUR HYPOTHETICAL jQUERY PLUGIN (function($){ var methods = { init : function(o...
javascript jquery
[3, 5]
4,467,882
4,467,883
form won't submit correctly via jQuery and reverts to default behaviour
<p>I've got a form withthe id offerForm which I submit via Jquery, but despite the 'return false' statement, the form doesn't submit via ajax. Any help will be much appreciated. </p> <pre><code>$(document).ready(function() { $('#offerForm').live('submit',function(){ loadData(1); }); ...
javascript jquery
[3, 5]
2,452,213
2,452,214
How to call WebUserControls based on users request?
<p>I'm building a website where i need to call WebUserControls (.ascx) based on the user request, how can I accomplish this? Is this even possible?</p> <p>Example:</p> <pre><code>protected void userclick_click(object sender, EventArgs e) { if(textbox1.Text == "2") { call WebUserControl1.ascx } ...
c# asp.net
[0, 9]
17,751
17,752
How to get current content view in Android programming?
<p>I know that I can set the content of the view in an Android app by saying setContentView(int). Is there a function I can use to know what the current content view is? I don't know if that makes any sense, but what I'm looking for is a function called, say, getContentView that returns an int.</p> <p>Ideally, it woul...
java android
[1, 4]
2,980,071
2,980,072
Database add item to list view?
<p>I download this database script and i was wondering how can i convert it to instead add a item to a list view.. its a really easy understandable database code..</p> <p><a href="http://www.anotherandroidblog.com/wp-content/uploads/2010/08/AABDatabase.zip" rel="nofollow">http://www.anotherandroidblog.com/wp-content/u...
java android
[1, 4]
91,963
91,964
Moving from Java to Python
<p>I've got a junior starting who's coming from a Java background. As a company we're now focused on Python development(albeit with some legacy systems in Java hanging around).</p> <p>I'm looking around for tips and resources to help the transition and wondered if you guys here had any useful tips for a newbie. </p> ...
java python
[1, 7]
2,513,751
2,513,752
javascript or jquery get high lighted text
<p>How do I get javascript or jquery to grab me text that I've selected/high lighted with my mouse or keyboard?</p>
javascript jquery
[3, 5]
3,179,940
3,179,941
get selected text's html in div
<p>i have a div with contentEditable set to true. I have to find selected text html.I am able to get selected text in FireFox by</p> <pre><code> window.getSelection(); </code></pre> <p>I case of IE i am able to get selected text html by using</p> <pre><code>document.selection.createRange(). </code></pre> <p>But, ho...
javascript jquery
[3, 5]
4,898,373
4,898,374
ASP.NET (C#) - vs PHP
<p>Is it possible to create a login/registration system on my site without using any of the bulit-in stuff from ASP.NET - just like you can do in PHP? I've almost completely forgotten everything I learned about ASP.NET - but I don't mind starting over again.</p> <p>I'd rather roll my own login-registration system in A...
c# php asp.net
[0, 2, 9]
4,260,802
4,260,803
use variable part of ID with js
<p>I have a list of 8 divs: #video1, #video2, ... with each the same javascript actions to run when clicked, but with other id's (for #video1: show #image1, #preview1, ...). </p> <p>Instead of writing 8 times the same code but with other id's, can I do this more efficient? Is it possible to take the sixth caracter (th...
javascript jquery
[3, 5]
3,893,608
3,893,609
PHP - How can I load the same form with some differences concerning the type of fields?
<p>I have a form with some fields of type text and 2 fields (<code>name</code> and <code>second name</code>) that have a value by default, and these 2 fields are of type="hidden".</p> <p>Now, I would like to add a link on the form "Fill an order for another person". If the user click on this link the same form must be...
php javascript jquery
[2, 3, 5]
4,275,311
4,275,312
ASP.NET Role Management
<p>I am new at ASP.NET and developing my first web based application at ASP.NET.I should do role management.There are three kinds of folder in project; 1.ADMIN 2.MEMBER 3.ANOYNOMUS I wanna set the roles at web.config side.How can I do it at web.config? I couldn't find useful info at web, about the database side of this...
c# asp.net
[0, 9]
4,892,285
4,892,286
jquery fadein broken
<p>I dont knwo why the Jquery fade in is not working for my content div</p> <p>HTML:</p> <pre><code>&lt;div id="content"&gt; &lt;div id="logo"&gt; &lt;img src="images/blue.jpg" alt="logo" /&gt; &lt;/div&gt; &lt;div id="form"&gt; &lt;form action="controler.php" method="p...
javascript jquery
[3, 5]
3,995,862
3,995,863
Getting URL of the top frame
<p>Inside a facebook application I need to check what is the top frame (the main window) URL, and show content accordingly.</p> <p>I tried using the following:</p> <pre><code>if (top.location.toString().toLowerCase().indexOf("facebook.com") &lt;0) { ... } </code></pre> <p>Which works well if the page is not inside a...
javascript jquery
[3, 5]
1,395,652
1,395,653
what is the difference between jquery selectors and js selectors?
<p>Simple question for a noob. Is there a difference between these to variables?</p> <pre><code>var object1 = document.getElementById('myElement'); var object2 = $('#myElement'); </code></pre> <p>Also, am I able to run normal js stuff on object2? For example, if #myElement is a <code>&lt;textarea&gt;</code> can I do:...
javascript jquery
[3, 5]
1,150,984
1,150,985
Best way to put delay after calling javascript functions
<p>I'm using jquery to call some javascript functions with a delay between them.<br /> Also I'm using <a href="http://docs.jquery.com/Cookbook/wait" rel="nofollow">Jquery Wait</a></p> <p>When I call below function,all functions are called recpectively,there are no delays between each other.</p> <pre><code>$(this) .ca...
javascript jquery
[3, 5]
584,724
584,725
Form submit event problem
<pre><code>&lt;form id="form1" runat="server" onsubmit="return CheckForm(this)"&gt; &lt;script type="text/javascript" language="javascript"&gt; function CheckForm(frm) { if(CheckEntireForm(frm) == false) return false; } &lt;/script&gt; </code></...
asp.net javascript
[9, 3]