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 |
|---|---|---|---|---|---|
948,459
| 948,460
|
How to hide a div if validation summary is available in javascript/Jquery
|
<p>How to hide a div if validation summary is available in javascript/Jquery.</p>
|
c# asp.net javascript jquery
|
[0, 9, 3, 5]
|
3,044,692
| 3,044,693
|
Post from PHP page to Java program and output result
|
<p>I have a PHP page on one server, which asks for some login details from a user. </p>
<p>I then have a Java application on another server.</p>
<p>I am trying to POST the results from the login form to the Java application, then respond with a yes/no as to whether the details were correct. </p>
<p>Whats the simplest way of going about this? I have read plenty on using sockets to post from Java, not I can't seem to find a good tutorial that explains how to post from a form, process it and return the results pack to the user.</p>
|
java php
|
[1, 2]
|
5,664,308
| 5,664,309
|
Conversion of Date
|
<p>I am getting date in two different formats.<br>
1) <code>2012-01-05</code><br>
2) <code>05/01/2012</code><br>
But i want this to be in the below format. <code>"5 Jan 2011"</code> </p>
<p>Please help..
Now i'm having <code>String d1="2012-01-05"</code> and <code>String d2="2012-01-05".</code><br>
urgent..</p>
|
java android
|
[1, 4]
|
5,597,451
| 5,597,452
|
Parsing remote JSON using Javascript?
|
<p>I am building an application using WorldBank API, but WorldBank API does not support JSONP. So is there a way to parse remote JSON using Javascript. Thank You</p>
|
javascript jquery
|
[3, 5]
|
2,711,244
| 2,711,245
|
Re-usable asp.net web pages
|
<p>I want to build a re-usable asp.net invoice module. This means that I want to utilise this module from several web-sites. This invoice module wil be indipendant and will have its own business layer with its own business logic.</p>
<p>My question : How do I achieve this seperation with asp.net. The webiste that implements this invoice module should be responsible for the theme ect. So is it possible to have re-usable asp.net pages, in say a dll or seperate project, which inherits the theme of the site that implements this module?</p>
<p>Any ideas would be appreciated</p>
|
c# asp.net
|
[0, 9]
|
4,201,018
| 4,201,019
|
Trying to get checkbox label, but getting Object instead
|
<p>I am using a simple few lines of code to get the labels of checked checkboxes and alert the value. But for some reason the alert shows [object Object] for every checkbox instead of its label. What am I doing wrong?</p>
<pre><code>function validate(){
var interests="";
$('input[type=checkbox]').each(function () {
if (this.checked){
var id=$(this).attr('id');
interests += $("#"+id).next()
}
});
alert(interests);
}
</code></pre>
<p><a href="http://jsfiddle.net/WFzS7/" rel="nofollow"><strong>jsFiddle</strong></a>:</p>
|
javascript jquery
|
[3, 5]
|
2,528,898
| 2,528,899
|
how to stop a toggle script from ending when a link is clicked?
|
<p>I'm using the below code to show/hide a nav and its children. It is working as intended. When the nav shows, and I click on one of the child links, it closes, and then takes me to a new page.</p>
<pre><code> // swap classes for lower level nav
jQuery('.toggle').click(function() {
$(this).toggleClass('toggle');
$(this).toggleClass('toggle_open');
});
jQuery('a.portfolio').click(function(e) {
e.preventDefault();
});
</code></pre>
<p>It doesn't do this with Safari, but Chrome & Firefox display the behaviour above. When I watch what is happening when the inspector is open; I click on the parent link, the toggle class is applied, I click on a child link, and the toggle class gets swapped back.</p>
<p><strong>How do I stop the nav from closing before it takes me to the requested page?</strong></p>
<p>My markup (unconventional for a nav - i know):</p>
<pre><code><span class="toggle">
<a href="portfolio/" class="level1 portfolio">Portfolio</a>
<span>
<a href="portfolio/item1/" class="first level2">item 1</a>
<a href="portfolio/item2/" class="level2">item 2</a>
<a href="portfolio/item3/" class="last level2">item 3</a>
</span>
</span>
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,404,031
| 5,404,032
|
Wait for animation to complete before continuing in jQuery
|
<p>Is there anyway to wait for a jQuery animation to finish before proceeding with another command?</p>
<p>For example, I want to fade out/slide up an element, change some items within the element and then fade them back in/slide back down.</p>
<p>If I put the statements one after another, you can see the items change before the animation completes.</p>
<pre><code>$('#item').fadeOut();
$('#item').html('Changed item');
$('#item').fadeIn();
</code></pre>
<p>Thanks.</p>
|
javascript jquery
|
[3, 5]
|
3,661,937
| 3,661,938
|
jquery append not working in IE/Firefox
|
<p>I have the following HTML and subsequent jQuery which appends the related HTML elements after the JSON request has been retrieved. </p>
<p>This implementation works in Google Chrome + Android browser + Safari, but is not populating the data in Firefox or Internet Explorer 9. </p>
<p>*<em>*</em> Works in Chrome, Android browser, Firefox 4 ... does not work in Firefox 3.x and IE.</p>
<p>Static HTML: </p>
<pre><code> <header class=line>
<div class="unit size3of4">
<h2 class="fullname"></h2>
<h4 class="nickname"></h4>
</div>
</header>
</code></pre>
<p>The jQuery code: </p>
<pre><code><script>
function load_user_info() {
var content_url = 'rest.api.url.com';
$.getJSON(content_url, {id:'11xx1122xx11'}, function(data){
console.log(data);
$.each(data, function(key, value) {
if (key == "fullname") {$('.fullname').append(value);}
else if (key == "nickname") {$('.nickname').append(value);}
});
});
}
load_user_info();
</script>
</code></pre>
<p>Slightly confused about the behavior between browsers. I can guarantee the JSON request is returning two variables: fullname & nickname and have confirmed this </p>
<p>In Firefox using the FireBug plugin I see the results of <code>console.log(data)</code>.<br>
In Chrome I see the results of the <code>console.log(data)</code> and the successful display of the fullname & nickname in the HTML after the JSON request. </p>
<p>Using jQuery 1.6.1 if it helps ... </p>
<p>JSON Output:</p>
<pre><code> {"fullname":"johnny fartburger", "nickname":"jf"}
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,397,598
| 3,397,599
|
Alternative for children() and Slice() Methods in jquery
|
<p>I am using children() and slice() methods in my script. I need another alternative for that without using this methods.</p>
<p>This is what I have tried:</p>
<p><a href="http://jsfiddle.net/XVdfm/3/" rel="nofollow">http://jsfiddle.net/XVdfm/3/</a></p>
|
javascript jquery
|
[3, 5]
|
5,722,749
| 5,722,750
|
How can I read this json response "2_1_details":{"latitude":"13.0","longitude":"18.38"} in jQuery
|
<p>I want to read a JSON response as name and value pairs in my jQuery code. Here is my sample JSON response:</p>
<pre><code>{
"2_1_details":
{"latitude":"13.0","longitude":"18.38"},
"2_4_details":
{"latitude":"13.0","longitude":"18.38"}
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,694,108
| 1,694,109
|
Convert InputStream to String with encoding given in stream data
|
<p>My input is a InputStream which contains an XML document. Encoding used in XML is unknown and it is defined in the first line of XML document.
From this InputStream, I want to have all document in a String.</p>
<p>To do this, I use a BufferedInputStream to mark the beginning of the file and start reading first line. I read this first line to get encoding and then I use an InputStreamReader to generate a String with the correct encoding.</p>
<p>It seems that it is not the best way to achieve this goal because it produces an OutOfMemory error.</p>
<p>Any idea, how to do it ?</p>
<pre><code> public static String streamToString(final InputStream is) {
String result = null;
if (is != null) {
BufferedInputStream bis = new BufferedInputStream(is);
bis.mark(Integer.MAX_VALUE);
final StringBuilder stringBuilder = new StringBuilder();
try {
// stream reader that handle encoding
final InputStreamReader readerForEncoding = new InputStreamReader(bis, "UTF-8");
final BufferedReader bufferedReaderForEncoding = new BufferedReader(readerForEncoding);
String encoding = extractEncodingFromStream(bufferedReaderForEncoding);
if (encoding == null) {
encoding = DEFAULT_ENCODING;
}
// stream reader that handle encoding
bis.reset();
final InputStreamReader readerForContent = new InputStreamReader(bis, encoding);
final BufferedReader bufferedReaderForContent = new BufferedReader(readerForContent);
String line = bufferedReaderForContent.readLine();
while (line != null) {
stringBuilder.append(line);
line = bufferedReaderForContent.readLine();
}
bufferedReaderForContent.close();
bufferedReaderForEncoding.close();
} catch (IOException e) {
// reset string builder
stringBuilder.delete(0, stringBuilder.length());
}
result = stringBuilder.toString();
}else {
result = null;
}
return result;
}
</code></pre>
<p>Regards,
Quentin </p>
|
java android
|
[1, 4]
|
3,534,296
| 3,534,297
|
hover is not working as expected
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/5345892/how-to-get-a-hover-effect-with-jquery-its-not-working-for-me">how to get a hover effect with jQuery?? Its not working for me..</a> </p>
</blockquote>
<p>I was trying to modify a bit in my code. Instead of displaying images as list, I tried to place them in tags. Its working fine <a href="http://dragonfly.zymichost.com/hovereffect2.html" rel="nofollow">dragonfly.zymichost.com/hovereffect2.html</a>. But when I place them in my actual page for some reason its not working as expected. <a href="http://dragonfly.zymichost.com/projects1.html" rel="nofollow">dragonfly.zymichost.com/projects1.html</a></p>
|
javascript jquery
|
[3, 5]
|
4,823,670
| 4,823,671
|
Reference from one .js file to another
|
<p>I use javascript bookmarklet with reference to extern path</p>
<pre><code>javascript:(function(){var s = document.createElement('script');s.src = 'http://192.168.0.100/my.js';document.body.appendChild(s);})();
</code></pre>
<p>How I can create reference to jQuery.js file that is located in the same directory that my.js file? </p>
<p>Can I attah css file to this files?</p>
|
javascript jquery
|
[3, 5]
|
899,284
| 899,285
|
How to re-label Object in array?
|
<p>Extending a previous question about JavaScript and jQuery, I'm trying to make an array and then look into it, but the array contains dimensions and I can't get it right..</p>
<pre><code>var markers = [];
$.getJSON('GetList', "id"= + data.id,
function(data){
$.each(data.list, function(index, data) {
}
markers.push( {
category:data.category,
id:data.id,
location:{
latitude:data.location.latitude,
longitude:data.location.longitude
}
});
});
});
return markers;
}
</code></pre>
<p>The first thing that strikes me is that every item will now be called "Object", while default, I'm still wondering if they can be labeled instead?</p>
<p>Further down the line, I try to access the id to compare it to a selection by the user,
but it doesn't work.</p>
<pre><code> var selection = $(div_id).val();
var arr = $.inArray(selection, markersArray.id);
if( arr >= 0) {
return search(selection, div_id);
} else {
throw("selection not found in selectionSearch()");
}
</code></pre>
<p>What am I doing wrong here..?</p>
|
javascript jquery
|
[3, 5]
|
282,617
| 282,618
|
jquery toggle visibility
|
<p>I'm tyring to show/hide the content of a link when it's clicked. much like what you see in FAQ pages. Basically I want to get the data-* of the clicked link and display it's content. This is what I've done but it still doesn't work :(.</p>
<p>My html is as follows:</p>
<pre><code><ul>
<li><a data-faq="1" href="#question"> + first question product?</a></li>
<p data-faq="1" class="hidden">my content</p>
<li><a data-faq="2" href="#question">+ More lorem?</a></li>
<p data-faq="2" class="hidden">my content</p>
</ul>
</code></pre>
<p>and jquery like this:-</p>
<pre><code> $('.hidden').hide();
$("#question").click(function(){
var activeFaq = $(this).attr("data-faq");
//show the content of the active faq
$(activeFaq).toggle();
return false;
});
</code></pre>
<p>this is the fiddle:- <a href="http://jsfiddle.net/8EJDc/" rel="nofollow">http://jsfiddle.net/8EJDc/</a>
again I'd like to toggle the <code>+</code> to <code>-</code> upon the toggle click and vice versa</p>
|
javascript jquery
|
[3, 5]
|
13,247
| 13,248
|
Re-setting field value with JQuery
|
<p>I have the following code:</p>
<pre><code>$('#name1').focus(function() {
if ($(this).val() == 'start value') {
console.log($(this).val()); // this prints "start value"
$(this).val() == ''
}
</code></pre>
<p>What I am trying to do is when a user focuses on the text input <code>#name1</code>, the field's value will disappear. However, the above does nothing, and the text value stays the same. Why is this occurring and what do I need to change?</p>
|
javascript jquery
|
[3, 5]
|
3,521,634
| 3,521,635
|
JQuery Sync 2 input fields...Can it be done?
|
<p>Can JQuery Sync or copy the text of one input field to another when input A is modified?</p>
<p>For example:</p>
<pre><code><input id="input_A" type="text" /> ...If I type something here
<input id="input_B" type="text" /> ... It will be copied here
</code></pre>
<p>Can JQuery Do this?</p>
|
javascript jquery
|
[3, 5]
|
3,587,295
| 3,587,296
|
How to get the full file path
|
<p>When Im using a file field and browsing an image by its full path
say <code>F:\Images\me.gif</code>.</p>
<p>how can i fetch this full path while submitting the form containing it by using php or javascript?</p>
<p>Thanxx in advance..</p>
|
php javascript
|
[2, 3]
|
1,092,537
| 1,092,538
|
using jquery, how do I check if an element is visible or not?
|
<p>I also need to find out all the elements inside a div, and check for their visibility. How to do it?</p>
|
javascript jquery
|
[3, 5]
|
5,105,753
| 5,105,754
|
jQuery alternative for document.activeElement
|
<p>What I wanted to do is figure out whenever the user is engaged with an INPUT or TEXTAREA element and set a variable flag to true... and set that flag to false immediately after the user is no longer engaged with them (ie. they've clicked out of the INPUT/TEXTAREA elements). </p>
<p>I used jQuery's docuemnt.ready function to add the onclick attribute to my body element and assign it to my getActive() function.</p>
<p>The code for the getActive() function is as follows:</p>
<pre>
function getActive()
{
activeObj = document.activeElement;
var inFocus = false;
if (activeObj.tagName == "INPUT" || activeObj.tagName == "TEXTAREA")
{
inFocus = true;
}
}
</pre>
<p>I'd really like to keep by project withing the jQuery framework, but can't seem to find a way of accomplishing the same logic above using JUST jQuery syntax.</p>
|
javascript jquery
|
[3, 5]
|
3,257,647
| 3,257,648
|
Changing the value of String.xml
|
<p>This Might be a stupid question but please forgive me as I am only a learner.</p>
<p>Is it possible to change the value of player in a method from class if so, please tell me how.</p>
<p><strong>This is part of my R.java</strong></p>
<pre><code> public static final class string {
public static final int player=0x7f060003;
</code></pre>
<p><strong>This is part of my string.xml from values file</strong></p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="player">player</string>
</resources>
</code></pre>
|
java android
|
[1, 4]
|
418,622
| 418,623
|
Best practices for how to Layer a ASP.NET/C# web app
|
<p>I have been working on an ASP.NET/C# web app for some time and its size has gotten way to large for how it is being programmed. It has become very hard to maintain and getting harder quickly, something that used to take an 1hr to update now takes about 3-4hrs. </p>
<p>I believe that reworking the app to use different layers would help solve many of these problems. However the more I read the more it seems that everyone does it differently, but achieve mostly the same goals.</p>
<p>I have seen layers such as Presentation/UI, DB, Business, Services, ect. It appears that a 3 layer may be the best but I am unsure.</p>
<p><strong>What layers should I have in a web app and what should each include or be limited to?</strong></p>
<p>Words from previous experience are most appreciated. </p>
|
c# asp.net
|
[0, 9]
|
2,967,436
| 2,967,437
|
How can I do client side text formatting on a Data-bound field inside a repeater?
|
<p>I have a repeater control with some html controls being populated from some server side DataSource. The code for these controls inside the repeater looks something like this..</p>
<pre><code><img src='<%# DataBinder.Eval(Container.DataItem, "Path")%>' title='<%# DataBinder.Eval(Container.DataItem, "Name")%>' alt="">
</code></pre>
<p>I needed to format some of the text so I added a method to this code. The method I added is a server side method though. So I'm assuming this isn't exactly the best way to handle things in terms of performance. The code looked something like this...</p>
<pre><code><span><%# trimItemName((DataBinder.Eval(Container.DataItem, "Name"))%></span>
</code></pre>
<p>trimItemName(Object obj) is a server side method that will obviously trim the name.</p>
<p>Is there a way I can do this using javascript so doing a simple string trimming (or any other kind of formatting) doesn't have to be done on the server side?</p>
|
c# asp.net javascript
|
[0, 9, 3]
|
5,602,273
| 5,602,274
|
Suggestions on making this bit of Javascript code sexier?
|
<p>I'm trying to make a way to add functions under a specific namespace (dpcom). This may be in dot notation depending on what the user did in their javascript file. So basically, what I want them to do is something like this:</p>
<pre><code>dpcom.library('something.foo.funcName', function() {
// Code goes here.
})
</code></pre>
<p>They can then call their stuff later like:</p>
<pre><code>dpcom.something.foo.funcName();
</code></pre>
<p>Which will execute the code they defined above. The code I want help with in making it sexier is here (it's using jQuery):</p>
<pre><code>dpcom.library = function(name, func) {
root = dpcom;
objects = name.split('.');
lastElement = objects[objects.length - 1];
$(objects).each(function(idx, elem) {
if (elem == lastElement) {
root[elem] = func;
} else if (!root[elem]) {
root[elem] = {}
}
root = root[elem];
});
}
</code></pre>
<p>This should handle the possible dot notation and create objects inside of my namespace if they don't already exist (I don't want to overwrite any already declared objects).</p>
<p>The code I have above seems to work great, but I have a feeling I can make it better but my brain isn't telling me where... Anyone want to take a stab at it?</p>
|
javascript jquery
|
[3, 5]
|
3,764,063
| 3,764,064
|
problem with inherits and src attributes of page directive
|
<p>I am having a problem with the page directive. The code behind file is CodeBehind.cs within the namespace <strong>aspnetian</strong>. </p>
<p>when i specify the inherit and src attribute like...</p>
<pre><code><%@ Page Language= "C#" src="~/CodeBehind.cs" inherits="aspnetian.CodeBehind.cs" %>
</code></pre>
<p>Parser Error Message: The base type 'aspnetian.CodeBehind.cs' does not exist in the source file '~/CodeBehind.cs'.</p>
<p>If I remove the namespace and specify the directive like...</p>
<pre><code><%@ Page Language= "C#" src="~/CodeBehind.cs" inherits="CodeBehind.cs" %>
</code></pre>
<p>it gives this error:</p>
<pre><code>class 'codeBehind' and namespace 'CodeBehind', declared in 'D:\AspPractice\WebApplication1\WebApplication1\codeBehind.aspx.designer.vb', conflict in namespace 'WebApplication1'. D:\AspPractice\WebApplication1
\WebApplication1\codeBehind.aspx.vb
</code></pre>
<p>Please tell me where I am mistaken and whats the correct way.</p>
|
c# asp.net
|
[0, 9]
|
200,938
| 200,939
|
Correctly inputed text changes image
|
<p>I have been developing a script that when a user types in correctly entered text the images will change the letter, letting the user know they entered it in correctly. </p>
<p>Preview here: Example word is "ate".
<a href="http://jsfiddle.net/wjx6b/2/" rel="nofollow">http://jsfiddle.net/wjx6b/2/</a> </p>
<p>I made sure it was set to check the index by using</p>
<pre><code>$.each(text, function(index, item)
</code></pre>
<p>My problem is when I try setting it to a foreign word like "taberu" which is Japanese, I have to have two letters in each of the var text boxes like this</p>
<pre><code>var text = ['ta', 'be', 'ru'];
</code></pre>
<p>but when I set it to that nothing happens when I start to type. Thanks to anyone who can help!</p>
|
javascript jquery
|
[3, 5]
|
1,605,672
| 1,605,673
|
Does activity requires Handler in android?
|
<p>In an Android module, does an activity requires Handler to be defined ?</p>
|
java android
|
[1, 4]
|
4,751,579
| 4,751,580
|
Jsoup library ,trying to make an Android app which reads data from HTML site
|
<p>I am facing with an problem which i couldnt fix it for whole day :S,
btw the problem is when I try to parse an html site and if there are data in that html site it works fine, but when there is no data that time it hangs and shows me an error in my LogCat where it says NullPointer, for ex: here we have two links one which has data and the other one which doesnt have data:</p>
<p>1st link: <a href="http://wap.nastabuss.se/its4wap/QueryForm.aspx?hpl=Resecentrum+(V%C3%A4xj%C3%B6" rel="nofollow">http://wap.nastabuss.se/its4wap/QueryForm.aspx?hpl=Resecentrum+(V%C3%A4xj%C3%B6</a>)
2nd link: <a href="http://wap.nastabuss.se/its4wap/QueryForm.aspx?hpl=Ulfsn%C3%A4s+(Hallands+l%C3%A4n" rel="nofollow">http://wap.nastabuss.se/its4wap/QueryForm.aspx?hpl=Ulfsn%C3%A4s+(Hallands+l%C3%A4n</a>)</p>
<p>So the error shows here in case when i try to display data from the 2nd link which is empty.</p>
<pre><code> Element table = doc.select("table[class=tableMenuCell]").first();
Iterator<Element> ite = table.select("td[align=right]").iterator();
Iterator<Element> destinacions = table.select("td[align=left]").iterator();
</code></pre>
<p>and the rest of code after these lines is just while statement and i add the data in arraylist which works fine when there is data on that link.</p>
<p>At the midle line code ate "ite" line is showing the error.</p>
<p>So how can I make any if statement or smth which checks if there is no data at all in that site to not check and just to dipslay some msgbox that there is no data.</p>
<p>Thanx,
I would really appreciate if someone can help me this case.</p>
|
java android
|
[1, 4]
|
1,972,083
| 1,972,084
|
How to turn JSON to object literal using PHP and jquery
|
<p>Is there a concise neat way to turn an XML feed into an JavaScript object literal?</p>
<p>I have this XML feed</p>
<pre><code><jobs>
<industry>
<name>Technology</name>
<area>Refrigiration</area>
<area>Information Technology</area>
<area>Electronics</area>
<area>Avionics</area>
</industry>
<industry>
<name>Agriculture</name>
<area>Agri-Tourism</area>
<area>Animal Husbandry</area>
<area>Harvesting</area>
<area>Poultry</area>
</industry>
</jobs>
</code></pre>
<p>and wish to turn it to:</p>
<pre><code>var jobs = [
{
"name" : "Technology",
"areas" : [ "Refrigiration" , "Information Technology", "Electronics", "Avionics" ]
},
{
"name" : "Agriculture",
"areas" : [ "Agri-Tourism" , "Animal Husbandry", "Harvesting", "Poultry" ]
},
{
"name" : "Media",
"areas" : [ "Journalism" , "Camera person", "Reality tv person", "Commentator" ]
}
];
</code></pre>
<p>I succeeded in encoding the JSON object using php. What I am missing is the rest.</p>
|
php javascript jquery
|
[2, 3, 5]
|
715,355
| 715,356
|
JQuery Toggle & Image
|
<p>I have a + icon and a - icon. When someone clicks the + icon a box appears and the icon changes to a - icon. If they click again the box disappears and the icon changes to a + icon. </p>
<p>Here is the code I tried but its not working...</p>
<pre><code>$("#box").toggle(function(e){
$("#icon").attr ("src","/images/icon_expand.png")
},
function(e) {
$("#icon").attr("src","/images/icon_retract.png")
}
);
</code></pre>
<p>Any ideas?</p>
<p>Thank you!</p>
|
javascript jquery
|
[3, 5]
|
4,513,517
| 4,513,518
|
getElementById is not working in asp.net
|
<p>In my application i just want to alert the value in the text box using javascript .</p>
<p>aspx page code</p>
<pre><code><%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
alert("hi");
alert(document.getElementById('<%=textbox1.ClientID%>').value);
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox runat="server" ID="textbox1" Text="asdsad">
</asp:TextBox>
</div>
</form>
</body>
</html>
</code></pre>
<p>I only get alert 'hi' ..after that i get an error " object required" . whats the reason?</p>
|
javascript asp.net
|
[3, 9]
|
5,415,839
| 5,415,840
|
how can I execute a javascript program 30 after page loads
|
<p>how can I execute a javascript program 30 after page loads, and I have to execute it repeatedly in 30 seconds. I would like to use jquery since I already included in my document</p>
<p>Thank you guys </p>
|
javascript jquery
|
[3, 5]
|
5,405,533
| 5,405,534
|
ByteBuffer allocateDirect taking a really long time
|
<p>I'm using float buffers as direct byte buffers as required for opengl drawing in Android. The problem that is that upon creating the byte buffer, the GC goes crazy---as in 30s+ crazy. I'm creating a mesh of 40x40 vertices, or 1600 vertices, or 4800 floats. As per the profiler, the culprit that calls the GC is ByteBuffer.allocateDirect. </p>
<p>Is this normal or expected for creating a mesh this size? It seems pretty tame. </p>
<p>The buffer init() code is below:</p>
<pre><code>public static FloatBuffer createFloatBuffer(int capacity) {
ByteBuffer vbb = ByteBuffer.allocateDirect(capacity * 4);
vbb.order(ByteOrder.nativeOrder());
return vbb.asFloatBuffer();
}
</code></pre>
|
java android
|
[1, 4]
|
5,862,043
| 5,862,044
|
using Change on an Input and then modifying the input's ATTR?
|
<p>Given:</p>
<p><strong>html</strong></p>
<pre><code><input checked="checked" class="list_completed_checkbox" id="list_item_completed" name="list_item[completed]" type="checkbox" value="1">
</code></pre>
<p><strong>jQuery:</strong></p>
<pre><code>$('.list_completed_checkbox').change(function() {
$(this).attr('disabled', 'disabled');
});
</code></pre>
<p>When you check or uncheck the checkbox, Why isn't the disabled attr being applied to the input?</p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
1,502,411
| 1,502,412
|
jquery trying to delete the highlighted element using keypress event
|
<p>I am using the following code to highlighting the element :</p>
<pre><code>$(".ss").live({
mouseenter: function () { HighLight(this) },
mouseleave: function () { OffLight(this); },
keypress: function () { KeyOperation(this); }
});
function HightLight(s)
{
$(s).css({border : "1px solid red"});
}
function OffLight(s)
{
$(s).css({border : "0"});
}
function KeyOperation(s)
{
$(s).remove();
}
</code></pre>
<p><strong>KeyOperation()</strong> function is not executing on keypress.</p>
<p>Here i am trying to do that when user highlight any element, and while highlighting, if he press <code>Delete key</code> , than that element should be deleted.But this is not working, can anybody tell me how can i do this?</p>
|
javascript jquery
|
[3, 5]
|
3,502,468
| 3,502,469
|
JQuery - Slide Example
|
<p>I want to perform a simple slide motion on an HTML element. JQuery is already available on the site in question so the next logical step for me was to look at their documentation. </p>
<p><a href="http://docs.jquery.com/UI/Effects/Slide" rel="nofollow">JQuery - Slide down</a></p>
<p>When I check out their demo however, it doesn't seem to be functioning. In firebug they have an error;</p>
<pre><code>missing ) after argument list
wyciwyg://0/http://docs.jquery.com/UI/Effects/Slide
Line 18
</code></pre>
<p>Whilst the error seems simple, I can't work out how to correct it (On thier site by editing the JS). On my own site using the same example an error is found in the JQuery 1.4.2 script itself;</p>
<pre><code>jQuery.easing[specialEasing || defaultEasing] is not a function
file:///home/gav/ee-workspaces/web/site/php/jquery-1.4.2.js
Line 5854
</code></pre>
<p>I don't mean to sound lazy / rude but what's going on? Is the JQuery site and newest release actually broken, I doubt it, what am I doing wrong? I'm a CS grad with no real web dev experience so I'm not used to this method of debugging, where should I start with this?</p>
<p>Thanks,</p>
<p>Gav</p>
|
javascript jquery
|
[3, 5]
|
1,341,364
| 1,341,365
|
Using jquery to copy a portion of a table in the most optimized way
|
<p>I am using JQuery to manipulate a page which I do not have access to modify server-side. One of the main things I need to do is create a copy of just a sub-section of one of the tables on the page. More specifically, I need to create 2 tables, one which is a copy of just the first two rows of the table and another which is just the first column.</p>
<p>After optimizing it as far as I could, I'm fairly happy with the performance of the row copy but the column copy is still a bit on the slow side. </p>
<p>I have the following, where sourceTable is the original table and titleColBody is the tbody of a new table created earlier:</p>
<pre><code>sourceTable.find("tr").each(function(){
titleColBody.append(
$("<tr></tr>").append($(this).children(":first").clone())
);
});
</code></pre>
<p>On a table with roughly 50 rows and a huge number of columns, this takes approx. 350ms in IE8. Not terrible, but I would like to bring this down a little if possible. </p>
<p><strong>My question is if there is a more efficient way of doing this in JQuery.</strong></p>
<p>Similarly, I create the copy of the first 2 rows of the table as below.</p>
<pre><code>headerTable.find("tbody")
.append(sourceTable.find("tr:eq(0)").clone())
.append(sourceTable.find("tr:eq(1)").clone());
</code></pre>
<p>This is fairly quick, however if there is a better way of doing it I would be happy to hear it.</p>
<p>Any optimization at all would be greatly appreciated.</p>
|
javascript jquery
|
[3, 5]
|
362,208
| 362,209
|
jQuery's .then() not executing onFailure function even though GET request encountered an error
|
<p>I am trying to convince <a href="http://api.jquery.com/deferred.then/" rel="nofollow">.then()</a> to execute it's failure condition.</p>
<p>I have the following. Note that taskID has been replaced with -1 to induce failure.</p>
<pre><code>load: function (taskID) {
$.when(
$('#OrderDetails').load('../../csweb/Orders/OrderDetails'),
$('#TaskDetails').load('../../csweb/Orders/TaskDetails/?taskID=' + -1),
$('#DeviceDetails').load('../../csweb/Orders/DeviceDetails'),
$('#Provisioning').load('../../csweb/Orders/Provisioning'),
$('#Activity').load('../../csweb/Orders/Activity')
).then(onDisplayLoadSuccess, onDisplayLoadFailure);
}
var onDisplayLoadSuccess = function () {
console.log("onDisplayLoadSuccess!");
};
var onDisplayLoadFailure = function () {
console.log("onDisplayLoadFailure!");
};
</code></pre>
<p><img src="http://i.stack.imgur.com/7bqOo.png" alt="enter image description here"></p>
<p>From <a href="http://api.jquery.com/jQuery.when/" rel="nofollow">documentation of .when()</a>:</p>
<blockquote>
<p>In the case where multiple Deferred objects are passed to jQuery.when, the method returns the Promise from a new "master" Deferred object that tracks the aggregate state of all the Deferreds it has been passed. The method will resolve its master Deferred as soon as all the Deferreds resolve, or <strong>reject the master Deferred as soon as one of the Deferreds is rejected</strong>.</p>
</blockquote>
<p>Since one of my load requests fails -- shouldn't then be executing onDisplayLoadFailure?</p>
|
javascript jquery
|
[3, 5]
|
5,119,762
| 5,119,763
|
How to get the version name/code on server side using PHP
|
<p>One of my previous versions is now not supported by the back-end. So, I want to get the version code/name of the application that calls the server, so that the server can respond accordingly.</p>
<p>In later version I will use a header to achieve this. Like this:</p>
<pre><code>httppost = new HttpPost(url);
httppost.setHeader("version", "10");
</code></pre>
<p>But any way to get the version on server side without setting a header, just from the apk's manifest.</p>
<p>I am using <code>PHP</code> at back-end.</p>
<p>Thank You </p>
|
php android
|
[2, 4]
|
1,891,319
| 1,891,320
|
Modify object using jQuery.map?
|
<p>I have a key-value pair like</p>
<p><code>var classes = { red: 'Red', green: 'Green' };</code></p>
<p>How can I prepend each of the keys with a specific value? Could this be done using jQuery.map?</p>
<p>The final result I'm looking for is</p>
<p><code>classes = { 'a-red': 'Red', 'a-green': 'Green' };</code></p>
|
javascript jquery
|
[3, 5]
|
5,448,642
| 5,448,643
|
ASP button Colors not shown in the Mobile?
|
<p>I am using ASP and MySQL in my project. I am trying to make Mobile Software works in WiFi. I have put MySQL in Server. And Asp.Net Deployment Package in System IIS. </p>
<p>In that I have Created buttons in running time and gave colors to buttons. When I test it in System Browsers, Its perfectly Working. </p>
<p>But in Mobile its not shows colors and perfect sized. I am very Confused. Mobile Model is NOKIA c3 - 01. Its connected to WiFi and I have tested in Mobile Browser.(Not Mini Opera).</p>
<p>Browser Shows this Output.
<img src="http://i.stack.imgur.com/GDGve.png" alt="enter image description here"></p>
<p>And Mobile Browser not show the Button Colors and button sizes are different. panel Also missing,...</p>
<p>Like below</p>
<p><img src="http://i.stack.imgur.com/PaVqi.png" alt="enter image description here"></p>
<p>Why this Happens? How to Solve this. Asp Coding are worked correctly.</p>
|
c# asp.net
|
[0, 9]
|
3,979,240
| 3,979,241
|
How to add a new field each time a button is clicked
|
<p>I want to create a new fileupload field each time i click on a button.
i have a form in a page and i want to add the fields to that form.
i tried to save an array of fileupload fields in a session but it deosnt seem to work.</p>
<pre><code>protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
this.Session["fileUploadArray"] = new FileUpload[5];
}
protected void Button1_Click(object sender, EventArgs e)
{
FileUpload[] flArray = ((FileUpload[])(this.Session["fileUploadArray"]));
for (int i = 0; i < flArray.Length; i++)
{
if (flArray[i] == null)
{
flArray[i] = new FileUpload();
form1.Controls.Add(flArray[i]);
this.Session["fileUploadArray"] = flArray;
return;
}
}
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
5,369,850
| 5,369,851
|
jquery asp.net listview
|
<p>I have a asp.net webapp and I am using Jquery. I wanted to know how can I pull data out of created table on the client side. I tried a few different ways but known work. I just want to be able to say when click alert the data in the row from a hidden class i got with a UID. Please note this is asp.net not regular html. So to sum it up I have a listview that creates a table, and each row thats created I store the ID in a 333-444-556-66 like that. And when a user clicks on a row I alert that ID from that class. Thanks</p>
|
jquery asp.net
|
[5, 9]
|
1,127,684
| 1,127,685
|
Creating a key/pair object using jQuery and some inputs
|
<p>I have a cart on my website and I need to let users easily change the quantity of items they have in their cart at a moment.</p>
<p>Here is the javascript code I have so far:</p>
<pre><code><script type="text/javascript" language="javascript">
$(document).ready(function () {
var items = [];
$(".item").each(function () {
var productKey = $(this).find("input[type='hidden']").val();
var productQuantity = $(this).find("input[type='text']").val();
items.addKey(productKey, productQuantity); ?
});
// 1. Grab the values of each ammount input and it's productId.
// 2. Send this dictionary of key pairs to a JSON action method.
// 3. If results are OK, reload this page.
});
</script>
</code></pre>
<p>The comments I wrote are just guidelines for me on how to proceed.</p>
<p>Is there a way to add a key/pair element to an array of sorts? I just need it to have a key and value. Nothing fancy.</p>
<p>I wrote in an <code>addKey()</code> method just for illustrative purposes to show what I want to accomplish.</p>
|
javascript jquery
|
[3, 5]
|
1,394,116
| 1,394,117
|
Response.End () doesn't abort current thread
|
<p>Anybody know why ASP.NET might not abort the current thread with a Response.End()?</p>
<p>Update: Reason being that there is code, albeit not well written, that is getting executed after Response.End(). I've never seen a case where Response.End () didn't stop the current thread from executing.</p>
<pre><code>
protected void Page_Load(object sender, EventArgs e)
{
Response.Clear();
Response.Redirect("somewhere", true);
Response.End();
//Some other code get's executed here
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
4,412,730
| 4,412,731
|
Export a jquery div as a picture
|
<p>I found a very nice jquery polaroid running in a div.</p>
<p><a href="http://www.marcofolio.net/webdesign/the_polaroid_photo_viewer_non-full_screen.html" rel="nofollow">http://www.marcofolio.net/webdesign/the_polaroid_photo_viewer_non-full_screen.html</a></p>
<p>Is it possible to save the result in a single image? What library should I use. I am using Java, javascript and python. Is there any library for those languages?</p>
<p>Thanks</p>
|
java javascript python
|
[1, 3, 7]
|
4,698,917
| 4,698,918
|
Does Android application memory limit apply to entire app or per process of app?
|
<p>I am having an issue hitting the memory limit of my application. My question is if I break my application into a few processes will this allow each process to get a 24mb limit or will all processes add up to hit the 24mb limit?</p>
|
java android
|
[1, 4]
|
3,550,812
| 3,550,813
|
Download and save image from HTML source
|
<p>In our application, based on some input data, an image will be rendered. The images are some charts. As part of our test automation I need to download those charts.</p>
<p>I just have image source url. How can I download the image from the source and save it to disk. </p>
<p>I tried of using different methods and able to download the file. But when I try to open the file, getting a message saying 'not a valid bitmap file,or its format currently not supported.'</p>
<p>Here is my html</p>
<pre><code><div id="chart">
<img id="c_12" src="Bonus/ModelChartImage?keys%5B0%5D=UKIrelandEBIT&values%5B0%5D=100&privacyModeServer=False&modelId=Bonus" alt="" usemap="#c_12ImageMap" style="height:300px;width:450px;border-width:0px;" />
<map name="c_12ImageMap" id="c_12ImageMap">
<area shape="rect" coords="255,265,357,266" class="area-map-section" share="Core Bonus" alt="" />
<area shape="rect" coords="128,43,229,265" class="area-map-section" share="Core Bonus" alt="" />
</map>
</div>
</code></pre>
|
c# asp.net
|
[0, 9]
|
1,897,018
| 1,897,019
|
The variable name '@Param' has already been declared
|
<p>I'm geting the following error message for given code when user clicks on search button more than two times. Could some one please help what i'm doing wrong.</p>
<blockquote>
<p>The variable name '@Param' has already
been declared. Variable names must be
unique within a query batch or stored
procedure.</p>
</blockquote>
<pre><code>protected void btnSearch_Click(object sender, EventArgs e)
{
DS.SelectCommand =
"SELECT ReportName, ReportType,
FROM Table
WHERE ReportName LIKE @param
ORDER BY ReportType Desc";
DS.SelectParameters.Add("Param", searchTxtBox.Text.Replace("'", "''"));
DS.DataBind();
ListView1.DataBind();
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
88,270
| 88,271
|
How to target a div with a class and an inner p tag
|
<p>I have a structure that looks like this..</p>
<pre><code><div class="infobubble">
<a href="#" class="btn-closebubble"></a>
<p>
PLACE CONTENT HERE
</p>
</div>
</code></pre>
<p>How do I use jquery to target the in <p> tags?</p>
<p>I tried this but did not work.</p>
<pre><code>$("infobubble p").html('My Text');
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,812,399
| 3,812,400
|
How to get the $load respond and print it out
|
<pre><code>var $respond=$("#sql").load("sql/loaduser.php);
</code></pre>
<p>I want to alert the $respond it only gives me object object, how can I see the info, I echo something in php in it, so I want to see that.</p>
|
php javascript jquery
|
[2, 3, 5]
|
5,880,738
| 5,880,739
|
Is this possible to get full client path in <asp:FileUpload> button?
|
<p>I have to upload one file from client using Button.I have to get the full client path.for example,</p>
<p>suppose, user uploaded a file from this local machines "d:\my files\docs\test.xml".So, now i want to get the same path("d:\my files\docs\test.xml") to proceed further.how do i get it?</p>
<p>i have used FileUpload1.PostedFile.FileName...But it is worked fine with IE and but not in Firefox...</p>
<p>So, Can you help me with this for Firefox and chrome...</p>
|
javascript asp.net
|
[3, 9]
|
1,609,544
| 1,609,545
|
ASP.Net - How to Encrypt password before login while using Login Control
|
<p>I'm using the ASP.Net Login control to login a web application. When the user submits the form, I want to call a function to encrypt the password before ASP.Net sends the information for authentication.</p>
<p>I tried to add a Customer Validator on the password field and if the password is not empty, the Password.Text will be replaced with the encrypted value. However, it seems ASP.Net still sent the original password for authentication. </p>
<p>I also tried adding a onClick event on the login button to encrypt the password but ASP.Net still sent the original password for authentication.</p>
<p>Is there a way to do this? Thank you!</p>
<p><strong>UPDATE:</strong></p>
<p>I'm sorry for not making this clear. What I need is to encrypt the password at Server Side.</p>
<p>I'm not using ASP.Net Membership to encrypt or hash the password while registering a user. The passwordFormat property has been set to "Clear".</p>
<p>What I am doing is:</p>
<ol>
<li>While a new user registers, I use a customized function to encrypt the password and save it to database.</li>
<li>When a user tries to login, I want to use the same function to encrypt the password entered by the user and let ASP.Net to authenticate the user.</li>
</ol>
<p>The problem I'm having is I can't find a way to call the encrypt function before ASP.Net initiate the authentication process.</p>
<p>Hope this makes sense. Thank you.</p>
<p>Allen</p>
|
c# asp.net
|
[0, 9]
|
915,185
| 915,186
|
Repeating code block problem
|
<p>I have the following code in a jQuery JavaScript document running on a page (<b>THIS IS CURRENT</b>):</p>
<pre><code>$(window).resize(function(){
detectscreen();
});
function windowWidth() {
if(!window.innerWidth) {
// user is being a git, using ie
return document.documentElement.clientWidth;
} else {
return window.innerWidth;
}}
gearsExists = false;
function detectscreen() {
shouldExist = windowWidth() >= 1300;
if (shouldExist != gearsExists) {
if (shouldExist) {
$('body').append('<div id="gearsfloat"><a href="#" id="clickGoTop"></a></div>');
$('#clickGoTop').fadeTo(0,0);
$('#clickGoTop').hover(function() {
$(this).stop().fadeTo(500,1);
}, function() {
$(this).stop().fadeTo(500,0);
});
} else {
$('#gearsfloat').remove();
$('#clickGoTop').remove();
}
gearsExists = shouldExist;
}
}
</code></pre>
<p>This code is from my <a href="http://stackoverflow.com/questions/1088218/resize-script-appends-object-does-it-over-and-over-again/">previous question</a>, branched here simply because I think it is related.</p>
<p>The problem here is that the beginning is fine: it is displayed. However, if the screen is resized to less than 1300, it disappears; still good.</p>
<p>Now I make the window again larger than 1300. Suddenly the gear element is doubled. Another screen squish and largen and BAM, there's three now. Do this several times and it quickly adds up.</p>
<p>How can I stop this? </p>
|
javascript jquery
|
[3, 5]
|
43,802
| 43,803
|
C# extension methods in a "site.master" template thats wrapped in a namespace quandary
|
<p>The question is this, why do I need to add an "import" directive on my <strong>Site.Master</strong> file to get Intellisense when the html helpers work without it.</p>
<p>Using a simple C# string extension method without a namespace == no problem. However, I wanted to put this extension in a namespace to be a good programmer.</p>
<p>If I wrap it in a <strong>namespace</strong>, you have to do a couple of things. Here is my extension:</p>
<pre><code>namespace MySystemCore
{
public static class StringExtensions
{
public static string F(this string s, params object[] args)
{
return string.Format(s, args);
}
}
}
</code></pre>
<p>So through trial and error, I have it working, but wanted to share my observations. Hopefully it may help someone else in the future.</p>
<p>NOTE: I am using the extension method in <strong>Site.Master</strong></p>
<ol>
<li><p>Add "using MySystemCore;" to <strong>Site.Master.cs</strong> file (codebehind file)</p>
<ul>
<li>Runtime error, no extension method found</li>
</ul></li>
<li><p>Add "<code><add namespace="MySystemCore"></code>" to <code><namespaces></code> configuration block in <strong>web.config</strong></p>
<ul>
<li>Works, no intellisense</li>
</ul></li>
<li><p>Combine #1 and #2</p>
<ul>
<li>Works, no intellisense</li>
</ul></li>
<li><p>Add "<code><%@ Import Namespace="MySystemCore" %></code>" to <strong>Site.Master</strong> file</p>
<ul>
<li>Works, with intellisense</li>
</ul></li>
</ol>
|
c# asp.net
|
[0, 9]
|
3,674,571
| 3,674,572
|
jQUery .slideToggle() & .text replace
|
<p>I've got the following problem (test version available <a href="http://jsfiddle.net/qmP8R/2/" rel="nofollow">http://jsfiddle.net/qmP8R/2/</a>):</p>
<p>I have two <code><div></code> containing two versions of text and a third <code><div></code> used as a "container".</p>
<p>On load the container is populated with the shorten text. On the click of a button I want to change the short version for the long version with some animation (sliding up/down animation) and vice versa (swap short for long and long for short - basically toggle). </p>
<p>In the test version it works quite as expected, but I am not able to solve the following problems:</p>
<ul>
<li>animation on 1st click does not work (but the text is changed to the long version)</li>
<li>on second click the whole container is slided up - not reverting to initial state</li>
</ul>
<p>Basically what I waht to achieve is a kind of toggle behaviour, but connected with .text replacement rather than display: show/hide.</p>
<p>P.S.: AJAX content replacement is not available as a solution in my case.</p>
|
javascript jquery
|
[3, 5]
|
3,370,222
| 3,370,223
|
kangamodeling and displaying graphs fails
|
<p>`Have you any idea why the following code snip I use doesn't produce the expected graph on the browser ?</p>
<p>I have added script tag pointing to latest jquery and kangamodeling's js scripts already.</p>
<p><a href="http://jsfiddle.net/y94Qy/" rel="nofollow">http://jsfiddle.net/y94Qy/</a></p>
<p>Thank you for any instructions.</p>
|
c# javascript jquery asp.net
|
[0, 3, 5, 9]
|
4,210,341
| 4,210,342
|
how to set attributes by jquery and access them by c#
|
<p>I wanna change or add custom attributes in client side by jquery and check them in server side by c#</p>
<p>(for example add a custom attributed named "Loaded=1" to an image HTML element when the image is loaded successfully and in server side I access to this attribute through Image control Attributes Collection)</p>
<p>Is it possible ??</p>
<p>Thanks for your feedbacks</p>
|
c# jquery asp.net
|
[0, 5, 9]
|
1,726,558
| 1,726,559
|
Finish empty activity
|
<p>I'm trying to turn screen on using an activity.
I reached my goal, but the activity stays alive.
If I use finish method, it doesn't get closed.</p>
<p>Note: it doesn't work even if I setContentView(...my xml...);</p>
<pre><code>package it.android.smartscreenon;
import android.app.Activity;
import android.os.Bundle;
import android.view.WindowManager;
public class AccendiSchermo extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
finish();
}
}
</code></pre>
|
java android
|
[1, 4]
|
4,352,732
| 4,352,733
|
Where to register RegisterClientScriptBlock in ASP.NET?
|
<p>Where is the best part of asp.net page or code behind to register <code>RegisterClientScriptBlock</code>.</p>
|
asp.net javascript
|
[9, 3]
|
4,282,414
| 4,282,415
|
generate random numbers(1 TO 90)
|
<p>Can any one help me...</p>
<p>I want to generate random numbers from (1 to 90) with out <strong>any repeated number</strong>
when loop is end,program should Stops.</p>
<p>Can some one help me,creating with java Script or in java page..!
This is for BINGO GAME..!</p>
|
java javascript
|
[1, 3]
|
1,071,886
| 1,071,887
|
Referencing Embedded resources from other resources in c#
|
<p>In my web application I include all of my JavaScripts as js files that are embedded resources in the assembly, and add them to the page using <code>ClientScriptManager.GetWebResourceUrl()</code>. However, in some of my js files, I have references to other static assets like image urls. I would like to make those assembly resources as well. Is there a way to tokenize the reference to the resource? e.g.</p>
<pre><code>this.drophint = document.createElement('img');
this.drophint.src = '/_layouts/images/dragdrophint.gif';
</code></pre>
<p>Could become something like:</p>
<pre><code>this.drophint = document.createElement('img');
this.drophint.src = '{resource:assembly.location.dragdrophint.gif}';
</code></pre>
|
c# asp.net javascript
|
[0, 9, 3]
|
4,648,128
| 4,648,129
|
Return matched elements' attribute ar array using jQuery
|
<p>In jQuery, it is easy to select elements as array.</p>
<blockquote>
<p>$("a"); // return as elements array of anchors</p>
</blockquote>
<p>But is it possible to select <strong>matched elements' attributes</strong> as array?</p>
<p>Currently I need to do something like...</p>
<blockquote>
<p>links = [ ]; </p>
<p>$("a").each(function() {</p>
<pre><code>href = $(this).attr("href");
links.push(href);
</code></pre>
<p>});</p>
</blockquote>
<p>Are there any better method to fill the variable <strong>links</strong> with href of the all matched anchors?</p>
|
javascript jquery
|
[3, 5]
|
3,160,042
| 3,160,043
|
How can DOM DocumentFragments help in optimizing dom manipulation?
|
<p>We are thinking of using <code>DOMDocumentFragments</code> as a candidate for optimizing the dom manipulation code . What do you guys think ?</p>
|
javascript jquery
|
[3, 5]
|
2,194,587
| 2,194,588
|
Callback after loading scripts works when preceded by alert and doesn't when I delete the alert
|
<p>First, I load some scripts. Then, once they're loaded, I bind those scripts to the relevant objects. Everything works great when I have the alert() statement there, and fails (i.e. jEditable does not bind) when I don't.</p>
<pre><code>// Load two scripts, execute editor_callback when both are loaded
$(document).ready(function() {
var scripts = 0;
var update_scripts = function() {
scripts++;
if (scripts == 2) {
editor_callback();
}
};
// Load jEditable
$.getScript('js/jquery.jeditable.min.js', update_scripts());
// Load Elastic textareas (if needed)
if (!jQuery().elastic) {
$.getScript('js/jquery.elastic.js', update_scripts());
}
else {
update_scripts();
}
});
function editor_callback() {
//alert ("In editor_callback()");
$('.edit_area').editable('editable/update', {
type : 'textarea',
cancel : 'Cancel',
submit : 'OK',
indicator : 'Saving...',
tooltip : 'Click to edit...'
});
$('textarea').live("click", function() {$(this).elastic()});
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,835,039
| 1,835,040
|
Disable upload button after uploading image http://valums.com/ajax-upload/
|
<p>I am using this, valums ajax fileupload: <a href="http://valums.com/ajax-upload/" rel="nofollow">http://valums.com/ajax-upload/</a> , It is working fine for me. I want to disable the upload button as I upload an image and want add 2 more buttons beside it "Delete" and "View". How would I do this using existing JS file.</p>
|
javascript jquery
|
[3, 5]
|
688,720
| 688,721
|
Adding functionality to an imageButton in a gridview
|
<p>I have an ImageButton control as part of a GridView control that is displayed as an ItemTemplate and in the same GridView. I have a regular Button control to which I added some code like this</p>
<pre><code>if (e.CommandName == "addToSession")
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow selectedRow = ((GridView)e.CommandSource).Rows[index];
string ISBN = selectedRow.Cells[0].Text;
string bookTitle = selectedRow.Cells[1].Text;
string image = selectedRow.Cells[2].Text;
//storing title, author, pictureUrl into session variables to 'carry them over' to RateBook.aspx
Service s = new Service();
Session["ISBN"] = ISBN;
Session["bookTitle"] = bookTitle;
Session["ImageUrl"] = s.returnImageUrl(bookTitle);
if (Session["userName"] == null)
{
Response.Redirect("registerPage.aspx");
}
else
{
Response.Redirect("RateBook.aspx");
}
}
else if (e.CommandName == "ratedBooks")
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow selectedRow = ((GridView)e.CommandSource).Rows[index];
string bookTitle = selectedRow.Cells[1].Text;
Service s = new Service();
Session["ImageUrl"] = s.returnImageUrl(bookTitle);
Response.Redirect("BookRated.aspx");
}
</code></pre>
<p>when I run this code I get a format exception and again I am not sure why. I have altered the image button a bit and nested the image in a link button which seems to be more correct.</p>
<pre><code><asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="ratedBooks">
<asp:Image ID="ImageButton1" ImageUrl='<%#Eval("pictureUrl") %>' runat="server" />
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</code></pre>
<p>Please advise.</p>
<p>Regards,</p>
<p>Arian</p>
|
c# asp.net
|
[0, 9]
|
2,819,942
| 2,819,943
|
Two equal jQuery scripts with different behavior
|
<p>I have an script that when click a button do many things and also rename some elements, so at first I use first script and I see sometimes work, sometimes not, so change it to second script and all time worked perfectly, but there is a question. is this two scripts do same? what is the difference, rather than all of my script I just replace first one with second one.</p>
<p>This is first script </p>
<pre><code>$(CloneTarget).find(':input[name="' + MainName + '"]').attr('name', NewSelectName);
</code></pre>
<p>And second one:</p>
<pre><code>$(CloneTarget).find(':input').each(function () {
if ($(this).attr('name') == MainName) {
$(this).attr('name', NewSelectName);
}
});
</code></pre>
<p>Where is the problem with first one?</p>
<p><strong>Edit</strong></p>
<p>Also I use this:</p>
<pre><code> $(CloneTarget).find(':input[id="' + MainId + '"]').attr('id', NewSelectId);
</code></pre>
<p>And every thing worked fine I am really confused here, I must mention <code>MainName</code> and <code>MainId</code> are so similar like: <code>MainName = Model.Phones[0]</code> and <code>MainId = Model_Phones[0]</code> is the difference is about <code>.</code> character or any other things?</p>
|
javascript jquery
|
[3, 5]
|
2,600,521
| 2,600,522
|
Arrow animation in jquery
|
<p>Is it possible to make an animation of this picture[1] to this picture[2] in jquery?. I would like to get "a growing arrow effect". I must admit that after some searching i found nothing and simple </p>
<p><code>$('#img').animate({width: '109px',height: '109px'});</code> </p>
<p>is not enough effect for me. Maybe you guys have some clues or tips to achieve that kind of effect.</p>
<p>[1] <a href="http://img543.imageshack.us/i/arrowmb.png/" rel="nofollow">http://img543.imageshack.us/i/arrowmb.png/</a></p>
<p>[2] <a href="http://img687.imageshack.us/i/pngqa.png/" rel="nofollow">http://img687.imageshack.us/i/pngqa.png/</a></p>
|
javascript jquery
|
[3, 5]
|
921,804
| 921,805
|
Nested loop in JavaScript/jQuery not working
|
<p>Im calling a for loop inside a for loop and its not working, here's the code : </p>
<pre><code>function PopulateMonths() {
for (var m = 0; m < 12; m++) {
var $month = $('.d-month').clone();
$month.find('.d-header').text(m);
$month = PopulateDays($month);
$month.appendTo('#diary').show();
$month = null;
}
}
function PopulateDays($month) {
for (var d = 0; d < 30; d++) {
var $row = $('.d-row').clone();
$row.find('.d-day').text(d);
$row.appendTo($month).show();
$row = null;
}
return $month;
}
</code></pre>
<p>If I call PopulateDays manually 12 times it works fine, as soon as I try to loop 12 times using PopulateMonths() the page crashes, CPU usage goes through the roof so im assuming a lot of work is going on.</p>
<p>What am I missing?</p>
|
javascript jquery
|
[3, 5]
|
4,158,157
| 4,158,158
|
jQuery to load text file data
|
<p>I'm trying to load data from a text file on my server using the $.get() function in an external script file. My code is as follows:</p>
<pre><code> /*
* Load sample date
*/
var stringData;
$.get("http://localhost/webpath/graphing/sample_data.txt", function(data){
stringData = data;
//alert("Data Loaded: " + stringData);
});
//Split values of string data
var stringArray = stringData.split(",");
alert("Data Loaded: " + stringData);
</code></pre>
<p>When I'm inside the $.get() function I can see stringData var get peopulated just fine and the call to alert confirms that it contains data from the sample text file. However, when I get outside the $.get() function, the stringData var no longer shows. I don't know enough about how the function works to know why it is not doing as I expected. All I want it to do is load the text data into a variable so I can work with it. Any help is appreciated.</p>
|
javascript jquery
|
[3, 5]
|
4,315,921
| 4,315,922
|
looping through javascript array each time starting at new index
|
<p>i have a javascript array like this:</p>
<pre><code> array = [
{"Command": "SetDuration","QuestionId": "2","NewDuration": "1"},
{"Command": "SetDuration","QuestionId": "2","NewDuration": "1"},
{"Command": "SetDuration","QuestionId": "7","NewDuration": "7"},
{"Command": "SetDuration","QuestionId": "6","NewDuration": "7"}
]
</code></pre>
<p>my task is loop through it 1 time in a minute, starting at incremented index each time, so that after 3 minutes i would start from array[4]
How to accomplish this?
Thanks!</p>
|
javascript jquery
|
[3, 5]
|
1,336,618
| 1,336,619
|
Switching from Java to C++: asking advice
|
<p>I am intermediate to advanced Java developer, working on migrating some Java components to C++. Working on some simple C++ projects in Eclipse has been a humbling experience! I am reading my way through <em>Thinking in C++</em>, and have <em>Effective C++</em> next on my list to read. </p>
<p>There are some basic questions which I'd like to hear people's thoughts about:</p>
<ul>
<li><p>IDE: what do people like to use? I have been using Eclipse for Java for many years, and it has given me tremendous productivity (auto-error correction, refactoring, integrated Junit, etc.) The C++ interface doesn't seem nearly as strong (I recognize the difficulty of making those features work with C/C++, so I'm not complaining). Visual Studio is always nice, but it adds a lot of Windows/MS specific stuff, which needs to be stripped out.</p></li>
<li><p>Cross Platform compatibility: how feasible is it to develop with the IDE on Windows machine (which I currently do in Java), and then compile and run on Linux? Is that just setting myself up for difficulties, and should instead get a Linux machine to use for development?</p></li>
<li><p>Reflection/Dynamic class loading: to provide customization to our core system, we drop extra jar files (or classes) on the server, and then reference the specific class type in the config file, whic causes that class to be loaded instead of parent class. Is there a similar design pattern for doing that in C++, e.g. would you create DLLs for each of your custom behaviors, and load the methods dynamically from DLLs, or is there some other mechanism for dynamic class loading in C++?</p></li>
</ul>
<p>I'm sure many of these questions will be clearer with more reading, and more time, but I can't seem to keep my mind from jumping ahead to these questions.</p>
<p>Thanks to any who want to offer their opinions.</p>
|
java c++
|
[1, 6]
|
1,602,793
| 1,602,794
|
Jquery radio buttonset() not styling in asp.net
|
<p>I'm simply trying to get a RadioButtonList to work with Jquery buttonset() styling in ASP.Net, 2010 C#.</p>
<p>When I use the code below, the radio buttons do turn into jquery buttons, but with a white background and no font change. The buttons can be clicked and the values are correct, but appearance of the button stays white with no visual change whatsoever (the UI I'm attempting to use is 'Flick'). Consequently, it isn't possible to tell which button you have clicked. I've done some testing with a div and a standard set of HTML radio buttons, and they act the same way in ASP.net. However, when I use the div and standard buttons in a simple HTML page, they are styled correctly with color changes etc. </p>
<p>I'm guessing this problem is caused by ASP.Net loading the RadioButtonList as an input/label/span combination, but if that were the case, it seems that everyone using ASP.Net should be experiencing it. </p>
<p>Any ideas or help would be great appreciated.<br>
Thanks!</p>
<pre><code>$(function () {
$("#<%= audioRadioList.ClientID %>").buttonset();
});
<asp:RadioButtonList ID="audioRadioList" runat="server" CssClass="radioButtons">
<%-- These audio list items are loaded in the code behind on page load --%>
</asp:RadioButtonList>
</code></pre>
|
jquery asp.net
|
[5, 9]
|
2,455,823
| 2,455,824
|
OnClick event for whole page except a div
|
<p>I'm working on an own combobox control for ASP.Net which should behave like a selectbox, I'm using a textbox, a button and a div as a selectbox replacement. It works fine and looks like this <a href="http://www.indiwa.de/technik/screenshots/combobox%5F20090921.gif" rel="nofollow">Image</a>:</p>
<p>My problem now is the Selectbox close behaviour: when clicking anywhere outside the opened selectbox it should close.<br>
So I need something like an onClick event for the whole page which should only fire when my div is open. Any suggest how to do that?</p>
|
asp.net javascript
|
[9, 3]
|
2,450,884
| 2,450,885
|
asp:imagebutton, change image from javascript / jquery
|
<p>How can i change the image of an image button clientside, on click.</p>
<p>I have tried this:</p>
<pre><code>function changetoDownload(theId) {
$(theId.id).delay(2000)
.queue(function (next) { $(theId).attr("ImageURL", "Images/Apps/free.png"); next(); });
}
<asp:ImageButton ID="ImageButton1" OnClick="Button7_Click" OnClientClick="changetoDownload(this.id);" ImageUrl="Images/download.gif" runat="server" />
</code></pre>
|
javascript jquery asp.net
|
[3, 5, 9]
|
4,138,700
| 4,138,701
|
Trying to start with google translate API and using ready()
|
<p>I have this code:</p>
<pre><code><script language="javascript" src="http://www.google.com/jsapi"></script>
<script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.js"></script>
<script language="javascript">
$(document).ready(function() {
} );
</script>
</head>
<body>
<form onsubmit="return false">
<input type="button" value="Translate" onclick="gtrans(this.form)" />
<p id="translation" style="border:1px solid #00f;padding:5px;width:400px">-</p>
</form>
</body>
</code></pre>
<p>When I add inside <code>ready(){}</code> the line <code>google.load ("language", "1");</code> the form is not showed, why?</p>
<p>Regards</p>
<p>Javi</p>
|
javascript jquery
|
[3, 5]
|
2,096,467
| 2,096,468
|
How to replace a td with elements with empty td
|
<p>Hi i have a structure like </p>
<pre><code><td valign="top" style="width:150px;" >
<img alt="<recipetitle/>" src="http://<rootweburl/>/photos/recipes/Large/<recipephotoname/>" alt="logo" style="float:left;"/>
</td>
</code></pre>
<p>Where <code><recipetitle/></code> and <code><recipephotoname/></code> are parameters and can change .I want to replace this td with a empty td .How will i do that in C#</p>
|
c# asp.net
|
[0, 9]
|
1,447,953
| 1,447,954
|
Dynamic Editable Checkbox
|
<p>I'm trying to build an android activity screen which displays a table with the last column as editable checkbox. Can someone help get started on this?</p>
<p>Also I was wondering if there was a tool like <code>ArrayAdapter</code>, <code>Listadapter</code> which displays your data from an array, except what I want in this is with the checkboxes for each row. Thanks</p>
|
java android
|
[1, 4]
|
5,401,755
| 5,401,756
|
How to combine click and hover function together
|
<p>Hi all i am doing an example for showing <code>tool tip</code> when <code>hover and click</code>. I found many examples but i choose the below to do</p>
<p><a href="http://ara-abcarians.com/jquery/atooltip/#demos" rel="nofollow">http://ara-abcarians.com/jquery/atooltip/#demos</a></p>
<p>Now my question i would like to combine both <code>click and hover</code> function together, so that when user click the <code>close</code> icon should be shown if not <code>hide</code> ..</p>
<p>Can any one help me</p>
|
jquery asp.net
|
[5, 9]
|
2,448,252
| 2,448,253
|
Restrict user to enter HTML TAGS into a textarea using jquery
|
<p>I have a textarea field and I want the user to be not able to enter HTML TAGS it to textarea.</p>
<p>Is that possible?</p>
<p><strong>EXAMPLE</strong></p>
<pre><code> <textarea rows="4" cols="30" id="textareadescription"></textarea>
</code></pre>
<p>In this user not able to enter HTML TAGS like</p>
<pre><code> <button> Submit </button>
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,298,484
| 4,298,485
|
End of Page Slide out jQuery effect
|
<p>I'm trying to implement Page Slideout jQuery effect by Mary Lou at <a href="http://tympanus.net/codrops/2010/04/13/end-of-page-slide-out-box/" rel="nofollow">http://tympanus.net/codrops/2010/04/13/end-of-page-slide-out-box/</a>
Everything was fine until I tried to open it on Firefox19/Mountain Lion OSX and FF19/Win7. There is an annoying bouncings effect when the slide is out.
This issue even occurs on the original demopage too : <a href="http://tympanus.net/Tutorials/EndPageSlideOutBox/" rel="nofollow">http://tympanus.net/Tutorials/EndPageSlideOutBox/</a>
Please take alook at this video to understand what I mean : <a href="http://d.pr/v/zhgz" rel="nofollow">http://d.pr/v/zhgz</a> </p>
<p>If you someone could help me out, I would really appreciate it. Thanks</p>
|
javascript jquery
|
[3, 5]
|
5,197,128
| 5,197,129
|
asp.net C# generate pdf files
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6119561/generate-pdf-file-in-asp-net">Generate PDF file in asp.net</a> </p>
</blockquote>
<p>Whats is a good and easy-to-use library (Third party software) in order to create a fillable pdf file? Im using asp.net C# and basically I want to generate a fillable pdf file that I send it to other users so they can fill it?</p>
|
c# asp.net
|
[0, 9]
|
1,166,480
| 1,166,481
|
What's the best way to grab the number in this url string with jQuery or vanilla javascript?
|
<pre><code>"/organizations/1/media/videos/11"
</code></pre>
<p>I would like to just grab that <code>1</code> . Not sure how to exactly do that.</p>
<p>Any ideas?</p>
|
javascript jquery
|
[3, 5]
|
1,784,148
| 1,784,149
|
Android Limit EditText to Integer input only
|
<p>I am trying to apply some kind of verification to an edittext. A user should only be able to enter integers between 1 and 60. I am wondering whether I should let them type whatever they like and when they focus off of the edittext check the contents and if it is out of bounds change the value to a default, say 0.</p>
<p>Or is there a way to limit the keyboard to only allow integers?</p>
<p>UPDATE:
I am doing everything programmatically. So far I have been able to limit to only numeric input and have a maximum of 2 characters by implementing the following. I am still struggling to limit only values between 0 and 60 though.</p>
<pre><code> editText.setInputType( InputType.TYPE_CLASS_NUMBER );
InputFilter[] FilterArray = new InputFilter[1];
FilterArray[0] = new InputFilter.LengthFilter(2);
editText.setFilters(FilterArray);
</code></pre>
|
java android
|
[1, 4]
|
5,189,683
| 5,189,684
|
Make sound cut itself off rather than play over itself
|
<p>My 1st app is an audio sampler. A button starts an audio loop and other buttons play different sounds over the top.</p>
<p>If I hit a button multiple times, the sound will play over itself.
I want the last click to cut off any audio still playing from the same button. But I don't want it to interfere with any audio started from a different button.</p>
<p>(For a button that plays audio of someone rapping "my name is", 3 quick clicks of the same button should result in "my-my-my name is". But a loop should remain playing in the background).</p>
<p>I'm using SoundPool and OnTouchListeners.</p>
<p>Thanks.</p>
|
java android
|
[1, 4]
|
5,265,102
| 5,265,103
|
javascript elements is undefined
|
<p>When I load vote.php on my web browser instead of index.php, I was able to vote and display user statistic. However I decided to implement the poll system by adding include('vote.php') to index.php, my document.forms[0] from vote.js can detect how many radio buttons in vote.php but I having problem getting this code working that appear to be "undefined" or not able to response, I did not modify any code all time:</p>
<p>JS code:</p>
<pre><code>var objForm = objForm.elements['vote[' + pollId + ']'];
</code></pre>
<p>pollId is an integer type with value of '1' which is Poll question 1;</p>
<p>When I tried to trace using <code>objForm.elements</code>, it could show exact numbers of radio buttons I have implemented in HTML in the poll.</p>
<p>I need the solution to be "objForm.elements.vote[1]" before I could loop and detect which option did the user select.</p>
|
php javascript
|
[2, 3]
|
2,180,551
| 2,180,552
|
Reset all checkboxes on page without looping
|
<p>I was wondering if it was possible to reset all the checkboxes (mark them unchecked) on the page without looping using jQuery?</p>
|
javascript jquery
|
[3, 5]
|
2,870,574
| 2,870,575
|
How can I hook up to a parent's event?
|
<p>I've got an aspx file, and rendered within it is an ascx control.</p>
<p>The aspx file has a button, that, when clicked, fires an event.</p>
<p>I've got a button in the ascx control that I'd like to hook up to that same event...but I'm not clear on how to do it. I'm obviously missing something fairly elementary.</p>
<p>I was thinking it would be something like this:</p>
<pre><code>myButton.Click += new EventHandler(btn_Click);
...
void btn_Click(object sender, EventArgs e)
{
<some way to get ahold of the parent aspx>.btn_Click(sender, e)
}
</code></pre>
<p>But, I've had no luck thus far, which makes me wonder if I'm barking up the wrong tree.</p>
<p>Ideas?</p>
|
c# asp.net
|
[0, 9]
|
3,788,217
| 3,788,218
|
Error message Nullable object must have a value
|
<p>I have a null error on my DTO object at runtime:</p>
<p><img src="http://i.stack.imgur.com/XSsbH.png" alt="enter image description here"></p>
<p>I didn't understand because column is nullable: </p>
<pre><code>[DataContract]
public class SearchParametersCompanyDTO
{
public SearchParametersCompanyDTO();
[DataMember]
public CompanyColumnsEnumDTO? Column { get; set; }
[DataMember]
public int PageIndex { get; set; }
[DataMember]
public int PageSize { get; set; }
[DataMember]
public string Term { get; set; }
}
[DataContract]
public enum CompanyColumnsEnumDTO
{
[EnumMember]
CompanyName = 0,
[EnumMember]
City = 1,
[EnumMember]
PostCode = 2,
}
</code></pre>
<p>It must be a conversion problem because null is accepted on Column:</p>
<pre><code> var dto = new SearchParametersCompanyDTO
{
PageIndex = pageIndex,
PageSize = defaultPageSize,
Term = term,
Column = null
};
</code></pre>
<p>Any idea?</p>
|
c# asp.net
|
[0, 9]
|
1,385,228
| 1,385,229
|
Implement a short pause before jquery animation
|
<p>Im writing a simple jquery menu system that shows / hides a DIV on mouse over a text link.</p>
<p>I want to implement a short pause before the slide happens, so that the menue doesnt drop down if the mouse just flies over the menu link.</p>
<p>this is how i currently activate the menu:</p>
<pre><code><script type="text/javascript"><!--
$('#aboutLink').mouseover(function() {$('#aboutMenu1').slideDown('fast');
$('#aboutLink').css("color", "#ff297b");});
--></script>
</code></pre>
<p>So in effect what i need to do is on mouseover, wait say 300ms, then, IF the mouse is STILL over the link, do the animation.</p>
|
javascript jquery
|
[3, 5]
|
3,483,998
| 3,483,999
|
Convert string to Date in java
|
<p>I'm trying to parse a string to a date field in an android application but I can't seem to get it correct. Here is the string I'm trying to convert to a date "03/26/2012 11:49:00 AM". The function I'm using is:</p>
<pre><code>private Date ConvertToDate(String dateString){
SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss aa");
Date convertedDate = new Date();
try {
convertedDate = dateFormat.parse(dateString);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return convertedDate;
}
</code></pre>
<p>But I keep getting 3/1/112 11:49AM as the result.. Any help I would really appreciate. thanks</p>
|
java android
|
[1, 4]
|
2,540,370
| 2,540,371
|
Does jQuery do any initial processing?
|
<p>Simple question. If you include jQuery in a page of HTML, is there any initialization overhead before one uses any jQuery functions.</p>
|
javascript jquery
|
[3, 5]
|
1,032,718
| 1,032,719
|
How can I preselect a radio button using javascript or jquery?
|
<p>I know this is probably easy, but I just can't figure it out.</p>
<p>I am working with a SAAS shopping cart solution so I can't adjust the form code or use PHP, so I need to use javascript or jquery. </p>
<p>In this cart, I have a form.... </p>
<pre><code><form method="post" action="cart.php" id="productDetailsAddToCartForm">
Please Select a Bottle Size:
<ul>
<li><label><input name="variation[1]" type="radio" class="RadioButton" value="30" /> 11oz</label></li>
<li><label><input name="variation[1]" type="radio" class="RadioButton" value="31" /> 33oz </label>
</li>
</ul>
</form>
</code></pre>
<p>And I need to preselect the first radio button using jquery or javascript. </p>
<p>Can you help?</p>
|
javascript jquery
|
[3, 5]
|
1,316,248
| 1,316,249
|
JQuery get input text when using .each() function
|
<p>I am using JQuery .each() on a list and am wondering how to retrieve the text from an input field within the list item, the code looks like:</p>
<pre><code><ul id="foo">
<li id="1">
<input type="text" />
</li>
<li id="2">
<input type="text" />
</li>
</ul>
</code></pre>
<p>I then need to get the id and text to send to an AJAX call</p>
<pre><code>$(#foo li).each( function() {
id = this.id; // Works fine
mytext = ???; // The bit i'm stuck with
...
});
</code></pre>
<p>There is only one input control per list item.</p>
|
javascript jquery
|
[3, 5]
|
3,615,339
| 3,615,340
|
put content of div1 into div2 onclick event
|
<p>I have two divs as follows: </p>
<pre><code><div id='div1'>
<p>Hello world!</p>
</div>
<div id='div2'>
</div>
<a id='test' href='javascript:void()'>Click me to fill in div2</a>
</code></pre>
<p>I have been wondering what should be the best way to fill in div2 with the content of div1 onclick using jquery in order to have </p>
<pre><code><div id='div1'>
<p>Hello world!</p>
</div>
</code></pre>
|
javascript jquery
|
[3, 5]
|
758,064
| 758,065
|
c# display doc/docs in exactly format in website
|
<p>Below is my code to read a doc/docs file. </p>
<p>it can read, but the output format not exactly as in the docs, if that any way to display exactly format in aspx?</p>
<pre><code>protected void Button2_Click(object sender, EventArgs e)
{
var wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
string strFilePath = @"C:\Users\Roy\Desktop\News.doc";
object objFile = strFilePath;
object objNull = System.Reflection.Missing.Value;
object objReadOnly = true;
//Open Document
Microsoft.Office.Interop.Word.Document Doc
= wordApp.Documents.Open(ref objFile, ref objNull,
ref objReadOnly, ref objNull,
ref objNull, ref objNull, ref objNull,
ref objNull, ref objNull, ref objNull,
ref objNull, ref objNull, ref objNull,
ref objNull, ref objNull, ref objNull);
int i = 1;
foreach (Microsoft.Office.Interop.Word.Paragraph objParagraph
in Doc.Paragraphs)
{
try
{
Label1.Text += Doc.Paragraphs[i].Range.Text;
}
catch (Exception ex)
{
throw ex;
}
i++;
}
wordApp.Quit(ref objNull, ref objNull, ref objNull);
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
724,060
| 724,061
|
Adding Back button for web page loaded within another web page
|
<p>I have an <code>index.php</code> with two major sections: the <code>navbar</code> and the <code>main-content</code>. The <code>navbar</code> contains links which will load another webpage to the <code>main-content</code> through this <code>jQuery</code> code:</p>
<pre><code>jQuery('#main-content').load('sampleurl');
</code></pre>
<p>Some of these web pages contain links to another web page, so I want to add a back button.
I tried using the <code>history.back()</code> and <code>history.go(-1)</code>, as well as the <code>$_SERVER['HTTP_REFERER']</code>, but they don't really work in my case.</p>
<p>How will I add the back button in this situation?</p>
|
php javascript jquery
|
[2, 3, 5]
|
13,233
| 13,234
|
Javascript disabling my postback
|
<p>I have an ASP.NET checkbox, and I want to run some javascript before it posts back.</p>
<p>Something like:</p>
<pre><code><asp:CheckBox ID="chkSelected" runat="server" AutoPostBack="True" OnCheckedChanged="chkSelected_CheckedChanged" />
</code></pre>
<p>but I want to run a JS confirm dialog when the user click it, and if they were UNCHECKING it, I'd like to ask them if they're sure, and if so, postback and run my serverside code. If they say No, don't postback at all.</p>
<p>Anyone know of an 'easy' way to do this?</p>
|
asp.net javascript
|
[9, 3]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.