Unnamed: 0
int64 302
6.03M
| Id
int64 303
6.03M
| Title
stringlengths 12
149
| input
stringlengths 25
3.08k
| output
stringclasses 181
values | Tag_Number
stringclasses 181
values |
|---|---|---|---|---|---|
5,355,982
| 5,355,983
|
Subtract value at a set interval?
|
<p>I'd like to have a php function which will deduct a value, say, 50 from an initial integer of say, 500 at a set interval.</p>
<p>For example: Every 30 days, deduct 50 from 500. So after 90 days, you are left with 350, etc.</p>
<p>I can do subtractions, it's the interval routine that I can't figure out.</p>
<p>If not PHP, JS is great too. This is used to count down a value from the beginning of the year, to the end.</p>
|
php javascript
|
[2, 3]
|
3,046,618
| 3,046,619
|
jquery function is not called on single click rather gets called on double click
|
<p>I have a problem with my application. Here is my code:</p>
<pre><code>$("#imgphonemain").toggle(addphonerows, "romove funtion");
$("#imgsms").toggle(addsmsrows, "romove funtion");
function addphonerows(event) {
removesmsrowsbyphone("imgsms");
addrowsbyphone("imgphone");
}
function addsmsrows(event) {
removephonerowsbysms("imgsms");
addrowsbysms("imgphone");
}
</code></pre>
<p>This basically adds a row into HTML, if I click the <code>imgsms</code> button it removes the phone row and inserts the SMS row, and if click on the <code>imgphonemain</code> button it removes the SMS row and inserts the phone row. This function does not work on a single click. It should called on double click. Can you help?</p>
|
javascript jquery
|
[3, 5]
|
4,813,343
| 4,813,344
|
Use C# to trigger java script code inside an html page
|
<p>If I have an html page with all the scrips in it, how can feed this html to some sort of egine in .NET and use C# could to simulate user interaction with that page (like problematically presses a buttom or cause the web page to request a next page of a grid inside the html file) which would cause the page to to do whatever server interaction it would have done if it was inside the browser and get the C# engine to recieve the respose from the server? </p>
<p>Does such engine exist that could host html file and be sent events programtically? What does such approach called? </p>
|
c# javascript
|
[0, 3]
|
4,331,291
| 4,331,292
|
Javascript single element dropdown
|
<p>I am fairly new to javascript and have been trying to fathom how to make each element in my code drop down as it is clicked.</p>
<p>At first glance I thought I would need to add $(this). to each of the events but refreshing my page did not affect the behavior, all divs would continue to animate down upon one click.</p>
<p>Here is the script </p>
<pre><code> function slideDiv(elem) {
if ($(".slidePanel").is(":visible")) {
$(".contentFade").animate(
{
opacity: "0"
},
600,
function(){
$(".slidePanel").slideUp();
}
);
}
else {
$(".slidePanel").slideDown(600, function(){
$(".contentFade").animate(
{
opacity: "1"
},
600
);
});
}
}
</code></pre>
<p>I have uploaded the current code here <a href="http://jsfiddle.net/alexmk92/z59p8/" rel="nofollow">http://jsfiddle.net/alexmk92/z59p8/</a> so you see the problem I am trying to convey...</p>
<p>Could anybody point me in the right direction as to how to solve this?</p>
|
javascript jquery
|
[3, 5]
|
4,486,957
| 4,486,958
|
Csharp code to check Java script disabled in browser
|
<p>i am having a application in which java script is must. but i am facing problem when at any client browser has java script disabled. i want a code using which i can check the browsers java script enabled/ disabled property so that the user cannot login until he enables javascript. can anyone help me in this code</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
792,466
| 792,467
|
javascript comparing strings (for date purposes)
|
<p>Ive only ever done absolute comparisons before, so Im a bit stuck as to how to deal with this...</p>
<p>I have two strings returned from PHP (format is DATE_ATOM i.e 2012-01-20)</p>
<p>What I need to do is compare one string (date) against another - however, I need to return true on the following three conditions</p>
<ul>
<li>The first date matches the second date (== got this one...)</li>
<li>The first date matches the second date +1 day </li>
<li>The first date matches the second date +2 days</li>
</ul>
<p>Anything over that will return false.</p>
<p>How can I do this in as 'clean' a way as possible..</p>
<p>P.S This can be done in either PHP or Javascript - just the cleanest way possible would be prefered!!!</p>
<p>Many thanks in advance!</p>
|
php javascript
|
[2, 3]
|
2,502,899
| 2,502,900
|
Weird int comparison bug in onContextItemSelected
|
<p>I'm facing a weird bug in my onContextItemSelected event handler. Here is the code -</p>
<pre><code>@Override
public boolean onContextItemSelected(MenuItem item) {
// Handle item selection
int itemIntegerId = item.getItemId();
if(itemIntegerId == 0)
{
// Edit
return true;
}
else if(itemIntegerId == 1)
{
// Delete
return true;
}
else
{
return super.onContextItemSelected(item);
}
}
</code></pre>
<p>All this is placed inside a ListActivity class. The event is firing as it should, but even though the item with id 0 is selected, </p>
<pre><code> int itemIntegerId = item.getItemId();
if(itemIntegerId == 0)
{
// Edit
return true;
}
</code></pre>
<p><strong>is failing</strong></p>
<p>I've spent over half hour trying to find a solution. Any help would be appreciated. I've attached <em>relevant images</em>.</p>
<p><img src="http://i.stack.imgur.com/dlUOv.png" alt="0 == 0 Failing">
<img src="http://i.stack.imgur.com/LvW7h.png" alt="else getting executed"></p>
|
java android
|
[1, 4]
|
175,649
| 175,650
|
How would I stop the click method from working more than once?
|
<p>I have a click method on a button + link that animates stuff as a result of the click. However, I want it so that it only works once. I managed to disable the button after it's clicked, so that's good. But I tried <code>.disabled = true</code> on the link and it didn't work. Is there some way I could prevent it from being clicked more than once?</p>
<p>JS</p>
<pre><code>$('#frontbutton, #loginlink').on('click', function(){
$('.popup').hide();
usernameInput.val('');
emailInput.val('');
passwordInput.val('');
confirmInput.val('');
$('.intro').animate({opacity: '0.5'}, 1000).delay(800).animate({
left: "+=300px"
});
setTimeout(function(){
$('.formholder').show()}, 2000);
$('.toppic').animate({opacity: '0.5'}, 1000).delay(800).animate({
top: "+=300px"
});
document.getElementById('frontbutton').disabled = true;
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,293,594
| 3,293,595
|
How to disable a certain radio button in a RadioButtonList in Javascript
|
<p>I'm at my wit's end when it comes to this. JavaScript definitely isn't my strong suit and I've been trying to google for a solution. Here's the code I have:</p>
<pre><code><asp:RadioButtonList ID="Group1Most" onClick="disable('Group1Most', 'Group1Least')" runat="server" >
<asp:ListItem Value="1"> |</asp:ListItem>
<asp:ListItem Value="2"> |</asp:ListItem>
<asp:ListItem Value="3"> |</asp:ListItem>
<asp:ListItem Value="4"> |</asp:ListItem>
</asp:RadioButtonList>
<asp:RadioButtonList ID="Group1Least" runat="server" >
<asp:ListItem Value="1"> This and That</asp:ListItem>
<asp:ListItem Value="2"> Fire and Ice</asp:ListItem>
<asp:ListItem Value="3"> Black and Tan</asp:ListItem>
<asp:ListItem Value="4"> Smith and Wesson</asp:ListItem>
</asp:RadioButtonList>
</code></pre>
<p>And here's the JavaScript:</p>
<pre><code>function disable(index, control)
{
var selected=($("[ID$=_"+index+"] input[type=radio]:checked").val());
//The rest of the stuff that I can't figure out
}
</code></pre>
<p>What I want to do is whenever you click a radio button on the <code>Group1Most</code> RadionButtonList, it will disable the corresponding radio button on the <code>Group1Least</code> RadioButtonList. The problem is I can't figure out how to select an individual radio button within the RadioButtonList. Can anybody help me?</p>
|
javascript asp.net jquery
|
[3, 9, 5]
|
588,227
| 588,228
|
Basic jQuery: what is the point of a wrapper?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2937227/what-does-function-jquery-mean">What does (function($) {})(jQuery); mean?</a><br>
<a href="http://stackoverflow.com/questions/3090284/for-the-function-function-ive-seen-it-with-the-word-jquery-in-it-why">For the function (function($){})(), I've seen it with the word jQuery in it, why is that?</a> </p>
</blockquote>
<p>I've seen this used in many places, and I understand that some code ill not work without it... but I have no idea what it does: what is the purpose of this wrapper? </p>
<pre><code>(function($){
...
})(jQuery);
</code></pre>
<p>An explanation and/or direction to some good resources would be greatly appreciated!</p>
|
javascript jquery
|
[3, 5]
|
4,215,669
| 4,215,670
|
JavaScript include declaration fails to find file
|
<p>There has to be something utterly simple I'm overlooking here, but for the life of me I can't get a JavaScript file to include properly from my master page. My declaration in the <code><head></code> element looks normal enough:</p>
<pre><code><head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="/_private/scripts/jquery-1.2.6.min.js"></script>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
</code></pre>
<p>But when the page loads, the js file is simply missing. Instead, what we get in Firebug when trying to expand that script element is just the page's HTML all over again.</p>
<p>I've included js files like this successfully countless times before and as far as I can tell, I've done it the exact same way again. It's hardly rocket science, so I must be overlooking something blindingly obvious but damned if I can figure out what it is.</p>
<p>In desparation, I turn to you. Any ideas?</p>
<p>One final point as well: viewing the source of the page shows a very unlikely form action. Even when browsing directly to the default page, there is a ReturnUrl being included on the form action and that ReturnUrl is the location of the missing script:</p>
<pre><code><form name="aspnetForm" method="post" action="default.aspx?ReturnUrl=%2f_private%2fscripts%2fjquery-1.2.6.min.js" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">
</code></pre>
|
asp.net javascript
|
[9, 3]
|
4,880,568
| 4,880,569
|
How to read the head section of a web page?
|
<p>On my web page, when the user types in a URL in the text field, I wan to get some information about that page, like title or link information. </p>
<p>Is there way to do it? On the client (JavaScript) or on the server (PHP)? And how?</p>
|
php javascript
|
[2, 3]
|
131,658
| 131,659
|
Javascript app in Android
|
<p>I am new to Android programming, and looking for some general knowledge. I am considering writing logic of my application in javascript so that the same code could be executed in a webapp and in a desktop application. Would it be possible to also have it working on Android? I know that:</p>
<ul>
<li>SL4A is marked as alpha-quality, and user would need to install it to make such an app work. Still it provides access to Android API. SL4A scripts also cannot go to Android Market, as far as I know.</li>
<li>A simple webapp doesn't have access to most Android API.</li>
</ul>
<p>Would it be possible to write a simple Java app that would embed an HTML widget with javascript code and provide some wrapper to access necessary API?</p>
<p>I am not looking for a fully portable thing--I intend to adapt UI to each environment manually. I just would like to have the internal logic common to all ports.</p>
|
javascript android
|
[3, 4]
|
663,166
| 663,167
|
jQuery: load response Document into div
|
<p>I get an asyc response from the server that contains an HTML that I would like to display:</p>
<pre><code> $( document ).ready( function ()
{
var options =
{
success: showResponse,
error: errorHandler,
type: 'post'
};
// bind to the form's submit event
$('#captureForm').submit(function()
{
$(this).ajaxSubmit(options);
return false;
});
});
function showResponse(responseDoc, statusText)
{
$('#output').html( responseDoc );
}
</code></pre>
<p>Where #output is a div where I would like the response document to be injected. The above code does not do the trick.</p>
<p>Any suggestions will be greatly appreciated.</p>
<p>Thanks.</p>
<p>-Raj</p>
|
javascript jquery
|
[3, 5]
|
4,019,098
| 4,019,099
|
Help With Scalable JavaScript Application Architecture and Chaining
|
<p>I'm currently trying to roll my own javascript application architecture based off of the recommedations by <a href="http://yuilibrary.com/theater/nicholas-zakas/zakas-architecture/" rel="nofollow">Nick Zakas</a> and I am using jQuery as the base library. I have everything pretty much working but it dawned on me that I have lost the ability to chain methods togeather since you ask the sandbox for methods using the dot notation. Is there a good solution to this? See below for more details.</p>
<pre><code>...register module...
sandbox.click('p', function(){..});
....
</code></pre>
<p>Each module gets an instance of the sandbox which is created when the module is registered. The Class is just a thin piece of code that translates module requests into core actions. </p>
<pre><code>Sandbox.prototype = {
click : function(el,cb){
return Core.click(el,cb);
}
}
</code></pre>
<p>In the core I'm returning a bunch of available methods.</p>
<pre><code>... Private members above
return {
click : function(el, cb){
$(el).click(cb);
},
... more public methods
}
</code></pre>
<p>So currently I have no means of chaining methods together because the accessor will not have any of the other methods I want to chain to it. If anyone has any ideas that would be great.</p>
|
javascript jquery
|
[3, 5]
|
622,323
| 622,324
|
How to allow only english,numeric and special chars in textbox using jquery or javascript?
|
<p>I want to allow only English,numeric and special characters to be typed in my web page. i want to apply this thing using jquery or javascript. Actually my application is in 2 languages so for that i want to do this. I want to do the same thing with Arabic language too.. please help me.
How can I do that?</p>
|
javascript jquery
|
[3, 5]
|
5,011,668
| 5,011,669
|
how does your custom class relate to the database
|
<p>Okay, so i've studied c# and asp.net long enough and would like to know how all these custom classes i created relate to the database. for example. </p>
<p>i have a class call Employee</p>
<pre><code>public class Employee
{
public int ID { get; set; }
public string Name { get; set; }
public string EmailAddress { get; set; }
}
</code></pre>
<p>and i have a database with the following 4 fields:</p>
<pre><code>ID
Name
EmailAddress
PhoneNumber
</code></pre>
<p>it seems like the custom class is my database. and in asp.net i can simple run the LINQ to SQL command on my database and get the whole schema of my class without typing out a custom class with getter and setter.</p>
<p>so let's just say that now i am running a query to retrieve a list of employees. I would like to know how does my application map to my Employee class to my database?</p>
|
c# asp.net
|
[0, 9]
|
3,783,928
| 3,783,929
|
Help understanding jQuery
|
<pre><code>jQuery(function ($) {..}
</code></pre>
<p>I am trying to learn jQuery and came across some code that started like the above statement. What does that mean?</p>
|
javascript jquery
|
[3, 5]
|
386,244
| 386,245
|
Proper way to escape characters from RegisterStartupScript
|
<pre><code>ScriptManager.RegisterStartupScript(page,
page.GetType(),
"KEY",
"updateDockTitle('" + ClientID + "', '" + string.Format(format, ChartName, "No Data To Display") + "');".Replace("-", "\\-"),
true);
</code></pre>
<p><code>ChartName</code> has the ability to contain special characters (e.g. Someone's Chart). If allowed as is this causes an error the code hits the <code>'</code> when it was not expecting it.</p>
<p>What's the proper way to handle this scenario? Do I need to know all characters that could cause issues and replace them with escaped out versions?</p>
|
c# javascript
|
[0, 3]
|
3,717,510
| 3,717,511
|
How to get a name of browser by using JavaScript?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4213222/reliable-browser-detection-with-javascript">Reliable browser detection with javascript?</a> </p>
</blockquote>
<p>How to get a name of browser by using JavaScript? </p>
<p>I expected to see only the name like this Firefox, Chrome, Safari etc.</p>
|
javascript jquery
|
[3, 5]
|
3,934,999
| 3,935,000
|
adding .live to click functions in jquery
|
<p>We have an app that uses a lot of jquery stuff and we're adding up all our scripts in an init.js file which has a lot of <code>.live("click"), .live("hover")</code> etc, stuff plus some <code>if($(".classname").length)</code> etc.</p>
<p>I have a suspicion it MIGHT be slowing down our pages unnecessarily(some pages don't need some scripts). But what is a more elegant solution to this? We certainly won't like a separate file for each page that needs it, that's a pain to maintain. Is there any other way to achieve this?</p>
|
javascript jquery
|
[3, 5]
|
1,901,482
| 1,901,483
|
javascript dynamic function call undefined
|
<h1>The function savefromtextarea() & varialbe globe is undefined wen called on click of save button...</h1>
<p>This one part of my code...I need to access the save from texarea method when clicked on the save text button...when I try to invoke the saveFromTextArea method its throws globe is undefined but globe variable is global variable ...</p>
<pre><code> ME.ZFP.annotaion.Text = function () { //function to annotate the text
var canvas = myscreen.getTempCanvas().ele;
var context = canvas[0].getContext('2d');
var global = this;
$(canvas).mousedown(function(e){ //on mouse down event
if ($('#textAreaPopUp').length === 0) {
var mouseX = e.pageX - this.offsetLeft + $(canvas).position().left;
var mouseY = e.pageY - this.offsetTop;
//append a text area box to the canvas where the user clicked to enter in a comment
var textArea = "<div id='textAreaPopUp' style='position:absolute;top:"+mouseY+"px;left:"+mouseX+"px;z-index:30;'><input type='text' id='textareaTest' ></input>";
//Click on save buttom global.saveTextFromArea undefined
var saveButton = "<input type='button' value='save' id='saveText' onclick='global.saveTextFromArea("+mouseY+","+mouseX+");'></div>";
var appendString = textArea + saveButton;
$("#container").append(appendString);
}
});
//Function to be called
this.saveTextFromArea = function(y,x){
//get the value of the textarea then destroy it and the save button
var text = $('textarea#textareaTest').val();
$('textarea#textareaTest').remove();
$('#saveText').remove();
$('#textAreaPopUp').remove();
}
}
</code></pre>
<p>Thanks
Ajain</p>
|
javascript jquery
|
[3, 5]
|
1,158,208
| 1,158,209
|
Jquery how to make continious functions?
|
<p>I am doing a click function, in that function i am creating a new <code><div></code> and wrapping no.of other div's inside as children. Once the children are added, I need to calculate each child's width and apply to the parent (what I created), is it possible to do as chain function?</p>
<pre><code>$('.thick-gallery-slide').wrapAll('<div id="tAllSlides" />')
</code></pre>
<p>There is no.of <code>.thick-gallery-slide</code> added to <code>#tAllSlides</code>, but how do I find the childrens and apply the total width to the parent <code>('#tAllSlides')</code> ?</p>
<p>Any help? I am looking on continuous functionality.</p>
|
javascript jquery
|
[3, 5]
|
86,609
| 86,610
|
Website in PHP to Python: framework/database/scalability
|
<p>I've been working on a somewhat large website written in PHP. It's around 7,500 lines from start to finish. Recently, me and a few friends were throwing around the idea that before we move any further along in its expansion in PHP, we should take a step back (temporarily), convert it to Python, and overall, it will be structurally better off – cleaner, faster, easier to maintain, etc. Note, the website is not launched, but nevertheless, it's certainly underway and significantly developed in PHP. I am, for the most part, unfamiliar with Python frameworks, and I am skeptical as to how a framework may or may not hinder/improve scalability. (Needless, to say, as far as web-development goes, I have only ever done the "old-fashioned" method of opening up a text-editor and starting to type...no frameworks, nothing.) Also, I am accustomed to working with MySQL. Does Python and whatever framework I would end up choosing integrate easily with MySQL, or is there a far better option I have not yet considered?
My questions are then:</p>
<ul>
<li><p>What are the advantages of Python (with a framework) over PHP?</p></li>
<li><p>Would the performance/maintainability be worthwhile to justify this<br>
conversion?</p></li>
<li><p>What framework would be most advantageous in this situation? (I've
heard good things about Tornado, TurboGears, Webpy, Django...)</p></li>
<li><p>When using a framework and Python, what is the best alternative to MySQL, or is MySQL perfectly acceptable?</p></li>
</ul>
<p>Prior experience is what I am lacking in this regard, so if you have any please feel free to share. Thank you!</p>
|
php python
|
[2, 7]
|
4,805,590
| 4,805,591
|
aspx submit form error
|
<p>Im working with asp.net framework 4.0 and I have this code:</p>
<p>form id="form1" runat="server" method="get" action="Profile.aspx"</p>
<pre><code> // some code
</code></pre>
<p>asp:Button runat="server" ID="SubmitButton" Text="Submit"</p>
<p>Each time i click the submit button i get this error:</p>
<p><strong>Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.</strong> </p>
<p>any idea how to fix it ???</p>
|
c# asp.net
|
[0, 9]
|
2,623,221
| 2,623,222
|
Best way to access server side method from client side?
|
<p>I am using webmethod and AjaxPro, to access server side method from client side .Is any other ways to access to server side method,better than these.</p>
|
c# asp.net
|
[0, 9]
|
5,497,764
| 5,497,765
|
differece between for loops in Java and foreach loop in PHP
|
<p>In PHP we use....</p>
<pre><code>foreach ($array as $value) {
echo $value;
}
</code></pre>
<p>In Java the same thing can be done using</p>
<pre><code>for (int e : array) {
System.out.println(e);
}
</code></pre>
<p>is there any difference between the above 2 code segments</p>
|
java php
|
[1, 2]
|
1,711,530
| 1,711,531
|
Using other web app App_GlobalResources resorces asp.net C#
|
<p>I cant't figure out how can i use other web app App_GlobalResources resources file in my webapp</p>
<p>both are in same server.</p>
<p>Thanks! </p>
|
c# asp.net
|
[0, 9]
|
556,610
| 556,611
|
a compilling issue using the android virtual device
|
<p>I have a question about the android virtual device(avd)... as what you already know, that you can test your android application through avd in eclipse, and i'm getting a boring repeted thing with that.</p>
<p>each time I want to test my application and when I make a small change to my application, I have to run the avd again and wait for a long time till the application run(switch the device on and wait for the system to boot and then wait for the application to start,this takes approx. 15 sec)... as I said, each time I make whatever change to the program I have to go through these boaring time consuming loop :( ...</p>
<p>So, is there is a way to avoid these issue, and makes the avd run only for the first time and any changes can take effect quickly and only needed to restart the application without needed to stop and run the project again ??</p>
<p>I hope there is a way for that...</p>
<p>Thanks alot...</p>
|
java android
|
[1, 4]
|
1,705,126
| 1,705,127
|
string.Format did not work for string line type parameter?
|
<p>I have to pass two parameters to CallSome() </p>
<pre><code>string.Format("CallSome({0},'{1}');", someId, someName);
</code></pre>
<p>But someName did not work for this kind of values which is having space. like</p>
<p>Its working for '123', 'name'</p>
<p>But not for this 'My Name' Its given an error of this After 'My</p>
|
javascript jquery
|
[3, 5]
|
1,957,177
| 1,957,178
|
Select n:th child from the bottom with jQuery?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4617634/jquery-select-the-last-4-items-in-the-list">jquery: select the last 4 items in the list</a> </p>
</blockquote>
<p>jQuery has the nth-child psuedo-class, but is there a way to select the say 3:rd to last child ?</p>
|
javascript jquery
|
[3, 5]
|
1,427,371
| 1,427,372
|
Client side href lost, can I send it back on postback?
|
<p>I'm losing client side href. Is it possible to send it back to the server on the button submit using a variable or something?</p>
|
javascript asp.net
|
[3, 9]
|
3,945,585
| 3,945,586
|
How to stop soft keyboard appear by default in android
|
<p>I am writing an android application with two EditText on the main activity. My problem is that once the main activity starts the soft keyboad automatically appears. I want the soft keyboard to appear only when the user clicks on the EditText component. How can I accomplish this? </p>
|
java android
|
[1, 4]
|
1,779,755
| 1,779,756
|
Deleting from an array based on a string value
|
<p>I have defined an array like so : </p>
<pre><code>var myArray = {myNewArray: ['string1' , 'string2' , 'string3']};
</code></pre>
<p>I want to iterate over the array and delete an element that matches a particular string value. Is there a clean way in jQuery/javascript to achieve this ?</p>
<p>Or do I need to iterate over each element, check its value and if its value matches the string im comparing, get its id and then use that id to delete from the array ?</p>
|
javascript jquery
|
[3, 5]
|
3,354,633
| 3,354,634
|
find texbox value using javascript?
|
<p>hear is my HTML:</p>
<pre><code> <div>
<input type='text' />
<input id='mybutton' type='button' value='button'/>
</div>
</code></pre>
<p>I want to find text box value when button is clicked:</p>
|
javascript jquery
|
[3, 5]
|
1,107,690
| 1,107,691
|
jQuery statements which interact with the DOM not working on 'soft' refresh only, but console log statements are
|
<p>I feel like I am banging my head against a wall right now; I know it has been reported, in jQuery 1.8.0, that the <code>document.ready</code> function is firing too early in IE 9 & 10. However I have the following snippet of code running under jQuery latest (1.9.1):</p>
<pre><code><script type="text/javascript">
$(document).ready(function() {
window.ie = (function(){
var undef, v = 3, x = 9, div = document.createElement('div'), div2 = document.createElement("div"), all = div.getElementsByTagName('i'), bs = div2.getElementsByTagName("b");
while ( div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->', all[0] );
while ( div2.innerHTML = '<!--[if lte IE ' + x + ']><b></b><![endif]-->', bs[0] ) {
$("body").addClass("lteie" + x--);
}
if(v > 4) $("body").addClass("isie" + v);
return v > 4 ? v : undef;
}());
});
</script>
</code></pre>
<p>This works when I refresh from server but it is not working when I use <code>ctrl + R</code> or <code>f5</code>. I am running this app locally. Not sure if this is important but I have tried setting it to always refresh from server via dev tools, refreshed once with success and then disabled this setting and it still doesn't run this script fully - it seems that if I put an alert in there, or console.log, it works fine (doesn't add the classes but does alert or write to the console even when put <em>within</em> the while loop). If it refreshes from server or using <code>ctrl + f5</code>, surely the cached copy should be replaced, right?</p>
<p>Thanks in advance,
Regards,
Richard</p>
|
javascript jquery
|
[3, 5]
|
1,883,089
| 1,883,090
|
Jquery How to use history plugin?
|
<p>In my web application I am using ajax and now I'd like the back and forward browser buttons to work. So I went looking for a jquery history plugin and found this one: <a href="http://stilbuero.de/jquery/history/" rel="nofollow">http://stilbuero.de/jquery/history</a></p>
<p>In my code I use a function to load a page:</p>
<pre><code>function loadDocument(id, doc) {
$("#DocumentContent").show();
// Clear dynamic menu items
$("#DynamicMenuContent").html("");
$("#PageContent").html("");
// Load document in frame
$("#iframeDocument").attr("src", 'ViewDoc.aspx?id=' + id + '&doc=' + doc + '');
// Load menu items
$("#DynamicMenuContent").load("ShowButtons.aspx");
}
</code></pre>
<p>As you can see I want my pages to load within an Iframe. Can someone tell me how I can use a history plugin so that the brwoser buttons will work? I don't really care which plugin it is, as long as the browser buttons work. I prefer an easy to use plugin.</p>
|
javascript jquery
|
[3, 5]
|
733,493
| 733,494
|
change image size on click using javascript
|
<p>I'm using ASP.NET,C# to develop my web app, I have a button (created as an image), when user clicks on this button, its size should be decreased for a small fraction of time and then it should return to its normal size again, how can I perform this effect? I've created a javascript function for button click and I want to do this effect using Javascript</p>
<p>thanks</p>
|
javascript asp.net
|
[3, 9]
|
508,476
| 508,477
|
how to set text in Bold Before " | "
|
<p>This is my code :</p>
<pre><code>for (int i = indexRowStart; i < indexRowEnd; i++) {
Element e = (Element) nl.item(i);
// adding each child node to HashMap key => value
map = new HashMap<String, String>();
map.put("RowID", String.valueOf(RowID));
String Heading = parser.getValue(e, KEY_NAME).replace("|","|\n").replace("|","");
map.put(KEY_NAME, Heading);
}
</code></pre>
<p>Output:</p>
<blockquote>
<p>30 | Section 120 of the Income-tax Act, 1961 – Jurisdiction of</p>
</blockquote>
<p>After Parsing I am getting this data, I want to print the string Before <code>|</code> in BOLD letter, in this case I want to print <code>30</code> in BOLD letter.</p>
<p>Any help will be appreciated.</p>
|
java android
|
[1, 4]
|
1,724,352
| 1,724,353
|
Need Javascript to open a web page in full screen after logging in
|
<p>I have one login.aspx page one master page(Master.master). When I click on login button, my web page should view in full screen mode.This should happens automatically when user credentials are correct.Master page should open in full screen mode.</p>
<p>I don't want it in new window(pop up window). I don't want to ask user press F11.It should work</p>
<p>in all browsers.(mainly in firefox and Internet Explorer)</p>
<p>I tried with below codes. But it is not working fine. Please correct my code or suggest me new code.</p>
<pre><code><script language="javascript">
function fullscreen()
{
window.open('page.php','kyscorp','width='+screen.width+',height='+screen.height+',top=0,left=0');
}
</script>
</code></pre>
<p> </p>
<p>I wrote in Master.master aspx page.</p>
<p>Regards,</p>
<p>nj</p>
|
javascript asp.net
|
[3, 9]
|
5,111,746
| 5,111,747
|
How to download jQuery js plugin?
|
<p>I am confused about js file of jQuery which one i have downloaded just now.</p>
<p>downloaded a zipped folder contains a lot of folder and files inside it. How can i know which one js file exactly is for particular plugin?</p>
<p>Lets say, i have to downloaded for <strong><em>Dialog</em></strong> and i <a href="http://jqueryui.com/download" rel="nofollow">download from this page by selecting</a> Model under Widget section. It downloads a zip folder and has many folder and files inside it.</p>
|
javascript jquery
|
[3, 5]
|
1,447,324
| 1,447,325
|
Add to ArrayList
|
<p>This is a part of my code:</p>
<pre><code>int n= random.nextInt(images.length - 1);
iv.setImageResource(images[n]);
</code></pre>
<p><code>Int n</code> choose one of the indexes randomly and then I used <code>ImageResource</code> to show pictures according to the the random indexes. Now I want to add <code>n</code> to <code>ArrayList</code>. How should I do it? Is there any better way to save a value in memory in android?</p>
|
java android
|
[1, 4]
|
70,002
| 70,003
|
Unable to install Android SDK
|
<p>I had a Windows XP. I also had JDK6. I downloaded "Android installer r11" for windows. When I click the installer, the error message is displayed as alert Java SE development kit is not found, Then the installation cannot happen.</p>
<p>But in my system I had a Java SE 6. I cannot find why it is not take the Java.</p>
|
java android
|
[1, 4]
|
1,381,783
| 1,381,784
|
How to populate list view with three array?
|
<p>I have three String[] populated with JSon data. So I need list view with all three String[] ,for example : String[] name to be on the top, then String[] address and on the bottom String[] phone. I found few tuts about custom array adapter but I didn't understand them so well. So, to repeat I already have all data in String[] name, String[] address and String[] phone just I need to put them in right adapter.
Can anyone help me.
Thanks. </p>
|
java android
|
[1, 4]
|
4,685,849
| 4,685,850
|
Loop through all childs of GroupView?
|
<p>Here is my code:</p>
<pre><code> Typeface font = Typeface.createFromAsset(getAssets(), "fonts/choco.ttf");
ViewGroup rootView = (ViewGroup) findViewById(android.R.id.content).getRootView();
for(int i = 0; i < rootView.getChildCount(); i++)
{
View child = rootView.getChildAt(i);
Log.d("menfis", child.toString());
if(child != null)
if(child.getClass() == TextView.class)
((TextView) child).setTypeface(font);
}
</code></pre>
<p>Here is my XML for this page:</p>
<pre><code><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_page"
android:gravity="center_horizontal" >
<ImageView
android:id="@+id/imgApplicationIcon"
android:src="@drawable/logo"
android:layout_width="fill_parent" android:layout_height="wrap_content"/>
<TextView
android:layout_marginTop="40dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:textColor="@color/red"
android:lines="2"
android:layout_marginRight="30dip"
android:text="test1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginRight="30dip"
android:textColor="@color/red"
android:lines="2"
android:text="test2" />
</LinearLayout>
</code></pre>
<p>The problam is that i only get that on the LogCat console:</p>
<pre><code>09-20 14:34:27.264: DEBUG/menfis(12251): android.widget.LinearLayout@40523820
</code></pre>
<p>Why i'm not getting references to the TextViews ?</p>
|
java android
|
[1, 4]
|
3,129,739
| 3,129,740
|
question-suggestion list
|
<p>i have a asp.net page. i m writing some words in a question textbox named txtTitle, after moving to another txtbox named txtbox2, i want that it should open a question-suggestion page based on that keyword typed in txtbox1 in the space before txtbox2. i hv tried this but it is not working. can anyone provide me the all the codes which are required to do this function.</p>
<pre><code><script type="text/javascript">
$(function() {
$("#txtTitle").blur(function() { QuestionSuggestions(); });
});
function QuestionSuggestions() {
var s = $("#txtTitle").val();
if (s.length > 2) {
document.title = s + " - ABC";
$("#questionsuggestions").load("QuestionList.aspx?title=" + escape(s));
}
}
</script>
</code></pre>
|
c# asp.net jquery
|
[0, 9, 5]
|
1,095,203
| 1,095,204
|
make Row in gridview asp.net clickable?
|
<p>I create gridview and remove the select button to make all row clickable but I want to redirect the user for selected item detail<br>
Note: I remover the CommandField select Visible="False"</p>
<pre><code> int rowCount = 0;
protected void gv_TasksProjectForUser_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//var taskID = gv_TasksProjectForUser.SelectedDataKey.Value;
e.Row.Attributes.Add("onclick", "location='TaskDetail.aspx?taskID=" + e.Row.RowIndex + "'");
e.Row.Attributes.Add("onmouseover", "JavaScript:this.style.cursor='pointer';");
}
rowCount++;
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
750,967
| 750,968
|
setInterval then update page title depending on the outcome
|
<p>I am using this code to retrieve notifications automatically </p>
<pre><code>setInterval(function(){
$('.user_drop_down_num_notifications').load('some url');
$('.num_messages').load('some url');
$('.num_notifications').load('some url');
},3000);
</code></pre>
<p>But what I would like to do is if there is any NEW number retrieved from the .load() function to update the title with a (1) or whatever number of notifications is retrieved.</p>
<p>Like Facebook - when you get a new notification and Twitter when there is a new story to read.</p>
|
javascript jquery
|
[3, 5]
|
4,737,428
| 4,737,429
|
converter application
|
<p>i've realized an application that converts a decimal number to binary, hexadecimal and octal. this program converts all the number that i write in the EditText thanks to three buttons, one for binary, one for hexadecimal and octal, but if i delete the number from the EditText, and i push one of this button, the program continues to convert the number that i've just deleted. so in which way can i avoid this? when i launch the program for the first time, in the space in which appears the converted number is written "Number Converted", and if i push one of the three buttons before digit a number in the EditText, appears a Toast in which is written Insert a number. So i want that also if i delete a number after previously converted, appears "Number Converted" like the first launch</p>
<p>this is the code of the binary button</p>
<pre><code>Editable stringEditable = numero.getText();
nuovo = stringEditable.toString();
if(nuovo.equals(""))
{
Toast t = Toast.makeText(convertitore.this, "Insert a number", Toast.LENGTH_SHORT);
t.show();
display.setText("Numero Convertito");
}else numero2= Integer.parseInt(nuovo);
nuovo=Integer.toBinaryString(numero2);
display.setText(nuovo);
}
</code></pre>
|
java android
|
[1, 4]
|
3,992,443
| 3,992,444
|
How to intercept the onclick event
|
<p>I'd like to intercept the onclick event of a button (not submit) before the page posts back from the onclick.</p>
<p>I'm having some trouble:</p>
<pre><code>$(document).ready() { function() {
function validate() {
...
}
var oldOnClick = $("input[value=OK]").attr("onclick");
$("input[value=OK]").attr("onclick", "if(!validate()) { return false; }" + oldOnClick));
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
84,909
| 84,910
|
scrollTop going back top before scrolling
|
<p>I have a function which scrolls the page to a given offset. I'm using the parallax effect, so all my elements (and pages, or "slides") are positioned depending on the scroll bar location.</p>
<p>My little problem is that when I click a link to another slide, it scrolls the page to the desired offset, but the event binded is triggered. Which should be OK, to keep the smooth effect. But there's a little glitch, it seems that the <code>scrollTop</code> function goes back to top for a millisecond before executing correctly. So it lookes like theres another page displaying for a millisecond every time I click on a link before scrolling to the right place.</p>
<p>Here is my code: </p>
<pre><code> for(var i=1;i<8;i++)
{
(function(slideNum) {
var tempName = 'slide'+slideNum;
//console.log(defaultPositions["slide"+i].top);
$('a.slide'+i).bind('click', function() {
$.scrollTo((defaultPositions[tempName].top/slidesScrollSpeed)+1+'px', 800);
});
})(i);
}
</code></pre>
<p>I know it might be hard to find the problem in this code, but it's all I could find that is related to that. Do you know what's wrong?</p>
<p>Thanks!</p>
<p>PS: <code>scrollTo</code> is a jQuery plugin but has the same glitch as <code>scrollTop</code>...</p>
|
javascript jquery
|
[3, 5]
|
143,619
| 143,620
|
How do I create a dynamic key for a key/value pair in JavaScript?
|
<p>Just now my code is: </p>
<pre><code>data = {'field_name':"some value",'name':$(this).val()};
</code></pre>
<p>However, I'd like to change the name key so it is dynamic, e.g something like: </p>
<pre><code>var name = $(this).attr('id');
data = {'field_name':"some value",name:$(this).val()};
</code></pre>
<p>Is that possible? </p>
|
javascript jquery
|
[3, 5]
|
3,392,549
| 3,392,550
|
Is there any callback function on click?
|
<p>Let's say I have the following link: </p>
<pre><code><a href="#shippingaddress" onclick="return validateBillingAddress(document.addressInput,'ADDR_CONTINUE_ACTION',event);" >
</code></pre>
<p><strong>EDIT</strong><br>
<strong>i am using multi page approach to show different section(divs) as a page</strong>
in that validate function I am validating the form and if everything is ok then displaying a hidden <code><div></code> and after the <code><div></code> is visible <code><spans></code> are getting applied by jquery mobile framework, untill and unless that div is hidden there is no <code>span,</code> but as that div become visible jquery mobile gets applied on it and appended some spans..i need to access this spans :</p>
<pre><code><span>blah</span>
</code></pre>
<p>So I want to change the text of this <code><span></code> after the <code>click</code> event, because the <code><span></code> is displayed after the <code>click</code> event.</p>
<p>So is there any way to do this?</p>
|
javascript jquery
|
[3, 5]
|
5,845,542
| 5,845,543
|
Php code to receive a StringBody from android?
|
<pre><code>entity.addPart("uploadedImage", new ByteArrayBody(data,"Image.jpg"));
</code></pre>
<p>To use the above image file I sent from android to php I use <code>$_FILES['uploadedImage']['name'];</code></p>
<p>Can Anyone show me an example of how to do the same with a StringBody sent from android -</p>
<pre><code>entity.addPart("ImageTitle", new StringBody(caption.getText().toString()));
</code></pre>
|
php android
|
[2, 4]
|
1,380,644
| 1,380,645
|
Resolving Description Resource Path Location Type errors
|
<p>I am using android 2.2 and if I run my project these errors occur. I am new to programming android applications. Can anyone help me?</p>
<p>1) Description Resource Path Location Type: The project was not built since its build path<br>
is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then
try building this project </p>
<p>Java Problem</p>
<p>2) Description Resource Path Location Type: Unable to resolve target 'android-5' </p>
<p>Android Target Problem</p>
<p>3) Description Resource Path Location Type: Unable to resolve target 'android-5' until the
SDK is loaded. </p>
<p>Android Target Problem</p>
<p>4) Description Resource Path Location Type: The type java.lang.Object cannot be resolved.
It is indirectly referenced from required .class files </p>
<p>VirtualKeypad.java /MojoGBAMulti/src/com/momojo/gba/input line 1 </p>
<p>Java Problem</p>
|
java android
|
[1, 4]
|
350,002
| 350,003
|
Return (T)Request[key];
|
<p>I have this existing code which works very well.</p>
<pre><code>public static T SessionGet<T>(string key)
{
if (Session[key] == null)
return default(T);
else
return (T)Session[key];
}
</code></pre>
<p>I wanted to make a version that works for Request. I realise that Request is string based. So how can I change the code so that error, as in the comment below, does not occur without having to place a large switch based on typeof(T).</p>
<pre><code>return (T)Request[key]; // Cannot cast expression of type 'string' to type '(T)'
</code></pre>
<p>Here is the function....</p>
<pre><code>public static T RequestGet<T>(string key)
{
if (Request[key] == null)
return default(T);
else
return (T)Request[key];
}
</code></pre>
<p>thank you</p>
|
c# asp.net
|
[0, 9]
|
5,432,539
| 5,432,540
|
how to read file, split record line by line and save them to database
|
<p>A.O.A</p>
<p>I want to split the following code and save it into database:</p>
<pre><code>31201011281853000100000000710003
</code></pre>
<p>The format of splitting is</p>
<pre><code>31
(2010-11-28,18 53) yyyy-mm-dd,hr-min
0001
0000000071
0003
</code></pre>
<p>first I have to upload a file containing these codes and then read each record line by line, split each line in the format I mentioned above, and then save it to database.</p>
|
c# asp.net
|
[0, 9]
|
1,903,628
| 1,903,629
|
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]
|
4,255,648
| 4,255,649
|
2 tables, need to set the rows with the maximum height for each matching row
|
<p>I have 2 html tables, I need to have each row with the same height.</p>
<p>So if table#1's 3rd row has a height of 25, then table#2's 3rd row should have a height of 25.</p>
<p>Whichever matching row has the largest height, then both rows should have the same height.</p>
<p>How can I do this?</p>
<p>I know how to traverse the rows like:</p>
<pre><code>$("table1 tr").each(function() {
});
$("table2 tr").each(function() {
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,744,986
| 2,744,987
|
How to Add Data Contents to Data Grid in the Same Page without any Database Connectivity?
|
<p>Say, I have a TextBox - When the User enters contents into TextBox and Click on Add the Content Should Populate in the DataGrid Without any db connectivity. The User Can add repeated items in the TextBox and Click on Add, So Every Value gets Popluated in the Grid.
How do I achieve this?</p>
|
c# asp.net
|
[0, 9]
|
247,488
| 247,489
|
Java Android issue: keyword -- new
|
<p>I am new to Android. I am really confused about this problem. For example, there are two java files.</p>
<pre><code>One.java
Two.java
</code></pre>
<p>I want to use some functions or parameters from Two.java, so I do this.</p>
<pre><code>Two two = new Two();
two.something;
</code></pre>
<p>or either I can do like this:</p>
<pre><code>public class One(){
private Two two;
public One(Context context){
two = (Two) context;
}
public void func(){
two.something;
}
</code></pre>
<p>or maybe like:</p>
<pre><code>public class One(){
Two two;
public void func(){
two = new Two();
two.something;
}
}
</code></pre>
<p>What's the difference between these ways or are there any other ways? Thanks!</p>
|
java android
|
[1, 4]
|
1,267,151
| 1,267,152
|
Outputting data with JQuery & PHP
|
<p>I have a general question regarding quality of writing code ...</p>
<p>I'm working on website, that outputs data from MySQL with PHP and it is being called with <code>$.get() / $.ajax()</code> with jQuery....</p>
<p>Now my question is .. the data I´m exporting for example: an array of comments (from class Comments) for a specific post, and this array is being returned from PHP as a string with its HTML manipulation (<code>return '<div id="this->$data"> this->$data</div>';</code>) and with the JQuery manipulation, I´m adding all the comments as list elements or anything else to a specific html element.</p>
<p>Is it useful to do this? Or it is better to send the array in a variable to jQuery, and then work with its elements and make the dynamic html code directly in JavaScript/jQuery..</p>
<p>If that was confusing, is it better to generate the html code in PHP when returning /echoing, or to generate the html code in jQuery after receiving the core data from the php? </p>
<p>I know there are other methods like XML JSPN, I'm just asking here about the efficient with generating HTML to manipulate core data (example: Array or Core Json data)</p>
|
php jquery
|
[2, 5]
|
3,449,989
| 3,449,990
|
How to read mails of particular mail id
|
<p>Is there any way to read mails of particular mail id.</p>
<p><strong>ex:-</strong> i want to read mails coming from <strong>xyz@gmail.com</strong> in my inbox, and show only those mails.</p>
<p>Thanks in advance.</p>
|
java android
|
[1, 4]
|
4,601,780
| 4,601,781
|
nullreferenceexception when trying to update text in a label, and working with threads
|
<pre><code>public partial class _Default : System.Web.UI.Page
{
private static Stopwatch timer = new Stopwatch();
Thread timeThread = new Thread(timeKeeper);
private static int min = 0, sec = 0;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void startstop_Click(object sender, EventArgs e)
{
timeThread.Start();
if(timer.IsRunning()) {timer.Stop}
else timer.Start();
}
private static void timeKeeper()
{
while (timer.IsRunning)
{
mydelegate();
}
}
private static void mydelegate()
{
_Default temp = new _Default();
temp.Update();
}
private void Update()
{
min = timer.Elapsed.Minutes;
sec = timer.Elapsed.Seconds;
time.Text = min + ":" + sec;
}
}
</code></pre>
<p>what i want to do is have a button that controls the a stopwatch, when you click it it starts, click it again it stops. I figured the best way to do it is with a thread if i want the time.text display to continue update and to be able to click the button still. when i run the above program it gets to time.text = min + ":" + sec; and throws a nullreferenceexception. Any help on how to fix this would be greatly appreciated. I am semi new to programming in C#/asp.net.</p>
<p>Is there a better way of working with delegates then this. I have spent hours looking up how to use them with not many usual/easy to understand tutorials or blogs</p>
|
c# asp.net
|
[0, 9]
|
1,778,422
| 1,778,423
|
jquery full width carousel
|
<p>I'm looking for a really light, full width jcarousel plugin that can animate a collection of divs, either in an ordered list, or simply inside a parent container.</p>
<p>It seems all the plugins out there have lots of unnecesary options or extra cruft which needs to be removed. Does anyone know of any simple full width plugin please?</p>
<p>I'm happy to make my own, but I guess there must be something available out there...</p>
<p>Thanks,</p>
|
javascript jquery
|
[3, 5]
|
716,618
| 716,619
|
Animated sliding divs on click button jQuery
|
<p>Im trying to write a simple script that slides the next 'slide' div in on a button click, I have 3 divs all inline, left alligned. theyre all set to a width, on 'next' button click id like the next slide to slide in, ive made the following fiddle only I cant seem to get it working...</p>
<p>Can anybody see where im going wrong?</p>
<p><a href="http://jsfiddle.net/x2qk7/" rel="nofollow">http://jsfiddle.net/x2qk7/</a></p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
1,405,751
| 1,405,752
|
how to create a GCM to send notification using Android phonegap and php
|
<p>I need the code to send push notification to android device from the php server. i am using phonegap technology. i need the gcm code for android phonegap and php.</p>
<p>Thanks in advance..</p>
|
php android
|
[2, 4]
|
84,075
| 84,076
|
Putting an angle on image view
|
<p>I'd like to set an angle on an image view and have that angle be generated randomly, and set the ancho point of the image view to the center of the android screen. After that I'd like the computer to generate a spot from a certain distance of the middle to the end of the screen on that angle and set a button to appear there. I'm not sure if eclipse has a quick automatic way to do that. </p>
<p>Thanks.</p>
<p>I've added a picture to help. I'd like the arrow to point to a random angle and then a button to appear on that angle but outside of the circle (the circle is imaginary just showing that it needs to appear outside of a certain distance from the center.<img src="http://i.stack.imgur.com/BXVTl.jpg" alt="enter image description here"></p>
|
java android
|
[1, 4]
|
4,968,837
| 4,968,838
|
Small bug when selecting text on focus
|
<p>i have a <code>input[type=text]</code> containing the short url for a post. i want to select the short url so users can easily copy the short url into clipboard. i used</p>
<pre><code>$(".shorturl input").focus(function() {
this.select();
});
</code></pre>
<p>but i noticed the 1st time it works fine then the next time it will blick (i see the text selected then deselected). it seems when like it try to select a selected text and ends up deselecting? </p>
<p>then to enhance this, how can i copy text to the clipboard? hopefully without flash? i see jQuery plugins to copy text but they use flash. </p>
<p>my site using that is <a href="http://jiewmeng.tumblr.com" rel="nofollow">http://jiewmeng.tumblr.com</a></p>
|
javascript jquery
|
[3, 5]
|
4,395,139
| 4,395,140
|
How can I create a popup that fits its content perfectly?
|
<p>I know this is very hard, and I also tried many "solutions" on the web, but none of those actually fit perfectly. I have a hard time calculating its outer frame's dimensions, but luckily I can sort of know what is the dimension of the content inside by making the <code>body</code> float left.</p>
<pre><code>body{ /*Or div*/
float: left;
}
ctnWidth = document.body.offsetWidth;
ctnHeight = document.body.offsetHeight;
</code></pre>
<p>Is there a perfect way (or a better way) to achieve it and fits it perfectly? (not necessarily cross browser) Since I can't find any answers on Google.</p>
<p>Thanks.</p>
|
javascript jquery
|
[3, 5]
|
5,162,717
| 5,162,718
|
addFooterView() - is it possible to add an entire XML layout using the function?
|
<p>I'm somewhat of a newbie with Android/Java, so I'm going to apologize in advance.</p>
<p>I have two XML files--one for my <code>activity</code> which contains a <code>ListView</code>, and another one which defines the layout of each item in <code>ListView</code>. I also have a .java file for the activity. At this point, I only have <code>onCreate</code> and <code>onStart</code>. onStart contains the code where I create an <code>adapter</code> for my items and then set the <code>ListView</code> adapter to that newly created <code>adapter</code>.</p>
<p>Anyway, long story short, I was wondering if it was possible to add an entire XML <code>layout</code> of <code>ImageButtons</code> to the bottom of <code>ListView</code> using <code>addFooterView()</code>? The way I have it now (after tinkering around with the activity's XML for a while) is using <code>RelativeLayout</code> and margins that basically leave the <code>ImageButtons</code> fixed at the very bottom of the screen, which is NOT what I want. I wanted the <code>ImageButtons</code> to show up at the very bottom of the list, side-by-side.</p>
<p>A link to an example, or posting an example itself would be really nice, as well.</p>
|
java android
|
[1, 4]
|
301,611
| 301,612
|
Parsing date string in Java of format [2012-07-15T20:55:33+00:00]
|
<p>Im trying to parse a String thats a date "2012-07-15T20:55:33+00:00", however I keep getting illegal argument exception. I don't know what I'm doing wrong.</p>
<pre><code>SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-ddzHH:mm:SS+00:00");
String date = "2012-07-15T20:55:33+00:00";
Log.e("res",sdf.format(date));
</code></pre>
<p>Throws</p>
<pre><code> 07-15 12:37:28.436: E/AndroidRuntime(20985): FATAL EXCEPTION: main
07-15 12:37:28.436: E/AndroidRuntime(20985): java.lang.IllegalArgumentException
07-15 12:37:28.436: E/AndroidRuntime(20985): at java.text.DateFormat.format(DateFormat.java:365)
07-15 12:37:28.436: E/AndroidRuntime(20985): at java.text.Format.format(Format.java:93)
</code></pre>
|
java android
|
[1, 4]
|
1,795,898
| 1,795,899
|
How to draw graph in java script?
|
<p>I want to draw graph in java script. Let me share my problem with simple example.</p>
<pre><code>Ind vs Aus cricket match.
X axis- Overs
Y axis- Runs
</code></pre>
<p>I want to show runs scored in each over by both teams in same graph. Can i show them together?</p>
<p>your experience will be useful to me. hoping for help.</p>
<p>would be grateful for help...thanks in advance,,</p>
|
javascript jquery
|
[3, 5]
|
1,679,618
| 1,679,619
|
jquery modal window in asp.net
|
<p>I want to open default.aspx with jquery pop-up when I click on a button. But jquery modalwindow doesn't work. When I click the button default.aspx page opens directly.</p>
<p>Script:</p>
<pre><code><script type="text/javascript">
$("#myElement").click(function (e) {
e.preventDefault();
$.get("Default.aspx", function (resp) {
var data = $('<div></div>').append(resp);
data.modal();
});
});
</script>
</code></pre>
<p>Html: </p>
<pre><code><a id="myElement" href="">Linkler</a>
</code></pre>
<p>or</p>
<pre><code><a id="myElement" href="default.aspx">Linkler</a>
</code></pre>
|
jquery asp.net
|
[5, 9]
|
1,578,883
| 1,578,884
|
jQuery content slider with start/stop/resume functionality
|
<p>Is there a jQuery content slider plug-in out there with start/stop functionality as well as an auto-resume functionality?</p>
<p>I basically want the plug-in to cycle through content and have the ability to pause it. After 5 minutes of it being paused I want the ability to auto-resume the sliding. </p>
|
javascript jquery
|
[3, 5]
|
486,615
| 486,616
|
Use arrayvalues to access (sub)arrays
|
<p>I have a page where I want to see if a certain value exists in one of the arrays I have defined, there is one main array and several "sub" arrays, they are defined like this:</p>
<pre><code>var main = ['header', 'firstname', 'surname', 'tel'];
var firstname_label = ['Hank', 'Dave', 'Erin', 'Jessica'];
var surname_label = ['Michaels', 'McHankering', 'Jameson', 'Lloydd', 'Eagon', 'Philips'];
var tel_label = ['mobile', 'landline'];
</code></pre>
<p>I want to check the sub arrays with a variable I have, I was thinking something along these lines:</p>
<pre><code>for (i=1;i<=mainCount;i++)
{
jQuery.inArray(var_x, main[i]_label)
}
</code></pre>
<p>Is something like this possible?</p>
|
javascript jquery
|
[3, 5]
|
3,680,419
| 3,680,420
|
How to get group of contacts list from Phone Contacts
|
<pre><code>btngal.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i=new Intent(Intent.ACTION_PICK,android.provider.ContactsContract.Contacts.CONTENT_GROUP_URI);
startActivityForResult(i,0);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// super.onActivityResult(requestCode, resultCode, data);
if (resultCode != RESULT_CANCELED) {
if (requestCode == 0) {
Uri selectContact=data.getData();
String[] filePathColumn={Contacts.CONTENT_URI.toString()};
Cursor cursor = getContentResolver().query(selectContact,
filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
filePath = cursor.getString(columnIndex);
cursor.close();
}
}
}
</code></pre>
<p>While doing this action I am getting below error:</p>
<pre><code>android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.PICK dat=content://com.android.contacts/contacts/group }
</code></pre>
|
java android
|
[1, 4]
|
2,276,514
| 2,276,515
|
How to check if an argument is an object?
|
<p>I know just about everything is considered an object in JavaScript. I am making a function which specifically requires the argument it accepts to be in this format:</p>
<pre><code>{
a: 'b',
c: 'd'
}
</code></pre>
<p>So this type of key value pair inside curly braces sort of object not the other type of objects. How to validate for this specifically?</p>
|
javascript jquery
|
[3, 5]
|
5,311,685
| 5,311,686
|
jquery gallerific preload conflict
|
<p>I'm unflashing a gallery using jquery-1.3.2, galleriffic and opacityrollover.</p>
<p>The goal is to display a large image in the gallery container only when one mouses over a thumb. <a href="http://dcostaging.net/clients/AHF/washington_mills.php" rel="nofollow">Example page here</a>.</p>
<p>Everything's working fine, but when the mouse hovers over the larger image for a period of time, there's a lot of pre-loading going on/flashing and cycling of all 8 images.</p>
<p>Any ideas on how I can stop this only in this ?</p>
<p>Thanks so much!</p>
|
php jquery
|
[2, 5]
|
3,551,377
| 3,551,378
|
asp.net: c#/javascript user needs to confirm before submitting
|
<p>i have a webform on asp.net c# page</p>
<p>the user enters data into the form. there are textboxes and there's a treeview</p>
<p>when the user presses the SUBMIT button, i would like all the data to be shown to him for his confirmation. the user should have the option to continue with the submit OR to go back to the form and edit the data.</p>
<p>is there an all ready out of the box way to do this>? if not, what is the easiest way to implement this?</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
458,097
| 458,098
|
ASP.NET Call C# Functions From JavaScript
|
<p>I Have a small working application on ASP.NET and C# and I would like to add some Javascript to it.</p>
<p>I know that for example I can use the Confirm button and then do something on yes or no.</p>
<p>What I would like to do is call some of the functions I have in the code-behind, depending on the answer to the Confirm Button.</p>
<p>How do I go about this?
Many Thanks!</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
3,794,662
| 3,794,663
|
How do I traverse this DOM with jQuery and retrieve the required text?
|
<p>I have one form on a page which has a bunch of sibling tags. I'd like to retrieve the text between each h5 tag using jQuery. I'd preferably like to have a callback or be able to do this in a simple looping construct where I can grab the text and make meaningful HTML of it, then insert the final string somewhere else.</p>
<p>How does one do this with jQuery?</p>
|
javascript jquery
|
[3, 5]
|
5,240,225
| 5,240,226
|
Display a 'View fence' button if exists but display 'No fence' button if it does not
|
<p>I have an object of markers, the key is the contacts name.
And an array of objects which has a 'contact' item which is also the contacts name.</p>
<p>I am trying to detect if the contact has an existing "geofence" from the array of objects and show a 'view fence' button, and display a 'No Fence' button if it does not.</p>
<p>The fences are stored in an array of objects called <code>fencesCookie</code></p>
<p>Code so far:</p>
<pre><code>function fenceButton(id) {
for (var key in markers) {
if (markers[key].id === id) {
$.each(fencesCookie, function (i, f) {
if (key === f.contact) {
menu.add(strings[strLang].viewfence, 'fence',
function(){
viewFence(f.lat, f.lng, f.radius);
menu.close();
});
} else {
console.log("No Fence : "+key+" "+f.contact)
}
});
if ($.isEmptyObject(fencesCookie)) {
menu.add('No Fence', 'nofence',
function(){
menu.close();
});
}
}
}
}
</code></pre>
<p>The console.log is spitting out all the unmatched items, so adding the 'No Fence' button code here results in multiple buttons, rather than just a View or No Fence button.</p>
<p>Am i going about this the wrong way?</p>
|
javascript jquery
|
[3, 5]
|
1,443,901
| 1,443,902
|
how to resize a picture programatically and add it to the web site
|
<p>Hi there
I am working with visual web developer and would a) like to know how I could programatcally add a picture to the website, instead of going to Website and then add existing item. The idea I have is to upload the picture using the file upload control but then I want to have it added so that it can be accessed using a gridview.
b)I would also like to know how to size the picture using C# code obviously so that is displayed at the correct size.</p>
<p>best regards
arian</p>
|
c# asp.net
|
[0, 9]
|
3,437,186
| 3,437,187
|
jQuery .val() work but content then doesn't display
|
<p>I have a method that returns data from the database, then creates a string in the form of a html list tag</p>
<pre><code>options.Append("<li value=\"" + reader["CIStatusID"].ToString() + "\"><a href=\"#\" class=\"filterOption checkable\">");
options.Append(reader["Status"].ToString() + "</a></li>");
</code></pre>
<p>then in my javascript i assign this to a ul tag named "filterType"</p>
<pre><code><div id="gearOptionsViewCaseFiles" style="display: none;">
<ul>
<li><a href="#">Filter by Status</a>
<ul id="filterType">
</ul>
</li>
</ul>
</div>
</code></pre>
<p>This is how I populate my ul tag with the dynamically generated list items:</p>
<pre><code>success: function (data) {
$('#filterType').val('<li value="0" class="filterOption checkable checked"><a href="#">All<img class="checkedimage" src="Images/tick.png" width="12" height="12"></a></li>' + data);
}
</code></pre>
<p>in the debugger, the "filterType"'s value is the generated list items, but on the website, the list never appear. I can't seem to figure out why it is not displaying if it is assigning the generated html items to the "filterType" ul tag</p>
<p><strong>EDIT :</strong>
what the li items looks like when it's being added to the ul:</p>
<pre><code><li value="0" class="filterOption checkable checked"><a href="#">All<img class="checkedimage" src="Images/tick.png" width="12" height="12"></a></li>
</code></pre>
|
javascript jquery asp.net
|
[3, 5, 9]
|
3,023,706
| 3,023,707
|
How can I extract ARGB from a Color and convert them to byte components?
|
<p>I'm working in Java/Android and I want to take the <code>0xFFFFFFFF</code> int color and break it into 4 bytes for red, green, blue and alpha. I know <code>Color</code> has methods for extracting specific color values, but it gives them as an <code>int</code>. I've gone through the SDK and found that the <code>Color.red(color)</code> method is the same as saying <code>(color >> 16) & 0xFF</code>, honestly I have no idea what this means but I think I can use this in some way.</p>
<p>I've tried doing</p>
<pre><code>byte red = (byte)Color.red(color);
</code></pre>
<p>but this doesn't seem to work. The whole point is so I can feed in the values into OpenGL with the method</p>
<pre><code>glColorPointer(4, GL_UNSIGNED_BYTE, 4, myColors);
</code></pre>
<p>myColors being a byte[].</p>
<p>Any help/tips/points would be greatly appreciated.</p>
|
java android
|
[1, 4]
|
4,600,874
| 4,600,875
|
jQuery wait till function is executed
|
<p>I'm trying to call 2 functions. The first function includes a jQuery effect. The second function (in this case is a jQuery effect), but may only execute if the first function is executed (and finished). Can someone help me out? Thanks!</p>
<p>Fox example: <a href="http://jsfiddle.net/fNH2u/1/" rel="nofollow">http://jsfiddle.net/fNH2u/1/</a></p>
<pre><code>function hideSecond(){
$("#second").hide("slow");
}
$("#first").click(function(){
hideSecond();
$(this).hide("fast");
});
</code></pre>
<p>and the HTML:</p>
<pre><code><div id="first">
first
</div>
<div id="second">
second
</div>
</code></pre>
<p>The function I want to call does more than just that jQuery effect. This is just an example. Putting the 2 functions together is not really what I'm looking for.</p>
|
javascript jquery
|
[3, 5]
|
547,409
| 547,410
|
Camera Preview Example
|
<p>I know this is really basic but it is a error that I cannot find a solution to.</p>
<p><a href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.html" rel="nofollow">http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.html</a></p>
<p>I have 2 errors and I dont know what Im doning wrong.</p>
<pre><code>public boolean onCreateOptionsMenu(Menu menu) {
// Inflate our menu which can gather user input for switching camera
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.camera_menu, menu);
return true;
}
</code></pre>
<p>Im getting an error at "menu" in "R.menue..."</p>
<p>error 2:</p>
<pre><code>public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {
case R.id.switch_cam:
// check for availability of multiple cameras
if (numberOfCameras == 1) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
/**builder.setMessage(this.getString(R.string.camera_alert))
.setNeutralButton("Close", null);*/
AlertDialog alert = builder.create();
alert.show();
return true;
}
</code></pre>
<p>Im getting an error on "id" in "case R.id..."</p>
<p>Thanks</p>
|
java android
|
[1, 4]
|
2,875,987
| 2,875,988
|
How to start the same activity in landscape and in portrait mode?
|
<p>I have a popup and I want to use it in two different activities. The problem is one activity is in landscape and another is in portrait mode. I know I could make two different popups for these activities but I wanted to know if there is a way to make the same layout start in landscape mode when I start it from landscape activity and also in portrait mode when I start it from portrait activity?</p>
|
java android
|
[1, 4]
|
3,071,598
| 3,071,599
|
Passing php variable to javascript
|
<p>I have a variable which stores the path of the file. I am using a pop up window to display that image. I am using following script</p>
<pre><code>function newPopup(url) {
popupWindow = window.open(
url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=no,toolbar=no,menubar=no,location=no,directories=no,status=yes')
</code></pre>
<p>Using it as</p>
<pre><code>echo '<td width="150"><a href="JavaScript:newPopup(\'ajax-loader.gif\');">ScreenShot</a></td>';
</code></pre>
<p>When I give the name not stored in variable as mentioned above, the script works fine. But when I try to give the variable $end_file, it is not working. I have tried following combinations</p>
<pre><code> echo '<td width="150"><a href="JavaScript:newPopup(\''.'$end_file'.'\');">ScreenShot</a></td>';
echo '<td width="150"><a href="JavaScript:newPopup(\'{$end_file}\');">ScreenShot</a></td>';
</code></pre>
<p>But none seems to work</p>
|
php javascript
|
[2, 3]
|
5,789,795
| 5,789,796
|
Time zone in Java
|
<p>This may be a very basic question, but i could'nt find any satisfactory answers.Hope my doubts gets clear on stackoverflow.</p>
<p>Q 1. <strong>Suppose i have time in a different timezone and i want to convert it to a different timezone, what is the way to do it in Java?</strong></p>
<p>Q 2. <strong>Is there any way to get timezone using Java Script?</strong></p>
<p>Q 3. <strong>A timezone is just the representation of time in a particular zone, but actually every zone is at the same time,just representation wise it may be different depending on geographical conditions.</strong> - <em>Is this understanding Correct</em>?</p>
<p>possible duplicate <a href="http://stackoverflow.com/questions/9867254/java-timezone-why-different-timezone-give-same-value-in-millisec">link</a></p>
|
java javascript
|
[1, 3]
|
1,825,346
| 1,825,347
|
Automatically fill username password into windows prompt using asp.net or jquery
|
<p>There's a third party site that many of our users access. I have the username and passwords already stored in our DB. Is it possible to programmatically enter the username and password once this site' URL prompts the user and click the submit button? Anyway of even doing this on the server side?</p>
<p>Thanks for any insight into this.</p>
|
c# jquery asp.net
|
[0, 5, 9]
|
5,792,563
| 5,792,564
|
Load external XML data file in a MOSS 2007 feature
|
<p>I am developping an ASP.NET application (SharePoint) and I have a feature that is creating and accessing folders. With the administrator account, no problem everything works well, but when I am connected with a different account of course it cannot create/access the folders. How can I "impersonate" the administrators rights ?</p>
<p>Thank you very much</p>
|
c# asp.net
|
[0, 9]
|
5,798,544
| 5,798,545
|
Count characters/sms using jQuery
|
<p>I count characters using <a href="http://tpgblog.com/noblecount/" rel="nofollow">NobleCount</a> and the following code:</p>
<pre><code>$('#message').NobleCount('#messageInfo',{
max_chars: getMaxChars(),
on_negative: function(t_obj, char_area, c_settings, char_rem){
}
});
</code></pre>
<p>I want a feature like counting SMS, if the limit is reached the next 160 chars are for the second sms and so on. I can use parameters like on_update, on_positive, on_negative and block_negative.</p>
<p>I tried something using modulo but it does not work. Any ideas?</p>
|
javascript jquery
|
[3, 5]
|
1,913,380
| 1,913,381
|
What is console.log in jQuery?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4539253/what-is-the-console-log-used-for-in-jquery">What is the console.log used for in jQuery?</a> </p>
</blockquote>
<p>What is <code>console.log</code>? What is it used for in jQuery?</p>
|
javascript jquery
|
[3, 5]
|
189,142
| 189,143
|
JavaScript if/elsif statment bug
|
<p>I have some sort of elsif statment bug I can't find:</p>
<p>My JSfiddle:</p>
<p><a href="http://jsfiddle.net/z3xV3/64/" rel="nofollow">http://jsfiddle.net/z3xV3/64/</a></p>
<p>Jquery:</p>
<pre><code>$('#slider1, #slider2, #slider3, #slider4, #slider5').bind('slide', function (event, ui)
{
var num = this.id.replace('slider','');
if(parseInt(num) == 1) {
$label = $('#boksTimer' + num).html( (ui.value / 31 * 60).toFixed(0) + ' GODT' );
}
elseif(parseInt(num) == 2) {
$label = $('#boksTimer' + num).html( (ui.value / 31 * 60).toFixed(0) + ' SUPER' );
}
else {
$label = $('#boksTimer' + num).html( (ui.value / 31 * 60).toFixed(0) + ' min pr. dag' );
}
$thumb = $(this).children('.ui-slider-handle');
$label.css({
top: $label.outerHeight(true),
left :$thumb.position().left - ( $label.width() - $thumb.width() ) / 2
});
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,805,053
| 2,805,054
|
Allow a web application to access a local file
|
<p>If I have a web application that needs to use a file, it presents the user with a standard open file dialog. But instead of uploading the file to server can it modify the file locally in a temporary location, while uploading in the background? That way the user does not have to wait for the upload before they can use my web app.</p>
|
php asp.net
|
[2, 9]
|
5,836,471
| 5,836,472
|
creating a list by parsing rss feeds using java
|
<p>Hiiii,
i want to create a list of articles by parsing the rss feeds from a website.Can anyone suggest me how to create such a list.</p>
|
java android
|
[1, 4]
|
4,801,919
| 4,801,920
|
how to refresh parent window by using Javascript in .cs
|
<p>How to refresh the parent window while closing the popup window(child window).</p>
<p>We are calling the java script functions in code behind to refresh the parent window by using page.ClientScript.RegisterStartupScript().But t is working fine in IE(internet explorer) but not working in Mozilla Firefox and Google Chrome.</p>
<p>In the Mozilla Firefox the pop up value is saving in the database but it is not updating into the parent page.If i did refresh manually the value is getting updating into the parent page. If i put debugger in RefreshPage()(javascript function) function in IE it is firing but not in Firefox.</p>
<p>The below code for call the javascript function in .cs class.</p>
<pre><code> page.ClientScript.RegisterStartupScript(this.GetType(), "PopupSave", "<script>javascript:alert('" + dsMessage.Tables[0].Rows[0]["ErrorMessage"].ToString() + "');window.open('','_self','');window.close();window.document.forms[0].submit();</script>");
</code></pre>
<p>The above code RefreshPage() is the javascript function to refresh the page</p>
<p>i.e.</p>
<pre><code>function RefreshPage() { window.document.forms[0].submit(); }
</code></pre>
<p>Please help me i tried with different scenarios but no output.</p>
<p>instead of RefreshPage() i used different functions</p>
<p>like reload(),</p>
<p>window.opener.forms[0].submit(),</p>
<p>likewise but still no output anyone knows please help me.</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
4,581,674
| 4,581,675
|
drag a textarea when the cursor is inside the control
|
<p>i am making a textarea draggable using jquery UI....basically im making a div draggable and in that div is my textarea. when u drag the div the textarea drags too. the problem is that if my mouse pointer is inside the textarea, and i try to drag the control, it fails. so basically when the pointer changes the shape from arrow to that symbol when u are writting text( i dont know wats the name of the shape) the dragging donot occur! i think i can understand that since the text area is in editable mode, and when u click inside, the jquery drag method might not be invoked...but i think there shud be a solution to this! </p>
<p>thanks!!</p>
|
javascript jquery
|
[3, 5]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.