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 |
---|---|---|---|---|---|
1,472,116 | 1,472,117 |
dynamic DOM masonry jQuery plugin
|
<p>I am creating <code>dom</code> elements by parsing <code>tumblr</code>'s json file.<br/>
After the images are loaded, i would like to apply a <a href="http://masonry.desandro.com/docs/intro.html" rel="nofollow">jQuery plugin Masonry</a> to tighten up the image grid.<br/><br/>
Heres my attempt but it doesnt seem to be responding<br/>
Any help would be greatly appreciated, thank you.</p>
<pre><code>var container = $('#output');
$.getJSON("http://mydomain.tumblr.com/api/read/json?callback=?", function(data) {
$.each(data["posts"], function(i){
var img = data["posts"][i]["photo-url-400"];
container.append('<div class="box"><a href="temp.php?var='+i+'"><img src="'+img+'" alt="" /></a></div>');
});
});
//container.live('imagesLoaded', function(){
container.imagesLoaded( function(){
container.masonry({
itemSelector: '.box',
columnWidth : 400
});
});
</code></pre>
<p>or this</p>
<pre><code>var container = $('#output');
$.getJSON("http://mydomain.tumblr.com/api/read/json?callback=?", function(data) {
$.each(data["posts"], function(i){
var img = data["posts"][i]["photo-url-400"];
container.append('<div class="box"><a href="temp.php?var='+i+'"><img src="'+img+'" alt="" /></a></div>', function(){
container.imagesLoaded( function(){
container.masonry({
itemSelector: '.box',
columnWidth : 400
});
});
});
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,969,173 | 1,969,174 |
Create an app where I can physically write things out with my finger
|
<p>I am trying to create an app where I can physically write things out with my finger and erase them? Something like a big sticky note that you can just write on?</p>
<p>How Would do this, i am really new to programming so i would really appreciate your help.</p>
<p>My question is similar to a question asked here, so i just edited it his question</p>
<p><a href="http://androidforums.com/android-applications/104361-notepad-app-widget-actually-lets-you-write-notes.html" rel="nofollow">http://androidforums.com/android-applications/104361-notepad-app-widget-actually-lets-you-write-notes.html</a></p>
<p>any code, books, would be much appreciated.</p>
|
java android
|
[1, 4]
|
2,183,672 | 2,183,673 |
use jQuery instead of long listed < SELECT > box?
|
<p>Right now I have an app that allows a user to pick a ring from a drop down (select) box. There can be many to choose from and it creates a long drop down that isn't very nice to use. I would like to maybe use jQuery to make this a little nicer. Like maybe have a tab on the top where they can choose "white gold", "yellow gold", etc. to narrow the options I am not sure. I have never used jQuery and not sure what it can do for me here, so I am open to any suggestions. I only have one requirement, right now each < option > has a value attribute indicating the stock number for the selected item, so when the submit button is clicked my processing page receives the stock number of the item they want; I need to keep that functionality.</p>
<p>Can anyone tell me a cool solution for this?</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
3,972,981 | 3,972,982 |
POST asp.net form username and password to an external HTTPS login
|
<p>I am new to asp.net c#. I have created a login form that when the user submits will POST their username and password to a secure external login form outside of my application. I tried doing this by setting up a httprequest but it did not work. What is the best way of doing this with c# in asp.net. </p>
|
c# asp.net
|
[0, 9]
|
1,736,050 | 1,736,051 |
How to Search for a file in the drive with asp.net and C#
|
<p>In my Asp.net and C# web application ,i want to search for a file with file name or a wildcard in the hard drive (say C:\ for example) and display the results in a tree view.How can we achieve this ?</p>
|
c# asp.net
|
[0, 9]
|
4,331,889 | 4,331,890 |
SelectedIndexChanged event isn't fired after onchange
|
<p>I am trying to validate a Dropdown list on client side for its selected index/value.
I want a function that alerts when the selected index is 0 or it should execute the <code>SelectedIndexChandged</code> method in the code behind..</p>
<p>I have written the following code..</p>
<pre><code>function validateDropDown() {
var indexService = document.getElementById('<%= ddlService.ClientID>').selectedIndex;
var indexTower = document.getElementById('<%= ddlManager.ClientID>').selectedIndex;
if (indexTower == 0) {
document.getElementById('<%= ddlService.ClientID%>').disabled = true;
document.getElementById('<%= ddlDate.ClientID%>').disabled = true;
alert("Please select a Tower");
return false;
}
else{
document.getElementById('<%= ddlService.ClientID%>').disabled = false;
document.getElementById('<%= ddlDate.ClientID%>').disabled = false;
_doPostBack('<%= ddlManager.ClientID%>');
}
}
</code></pre>
<p>This line is throwing an error on runtime.</p>
<pre><code>_doPostBack('<%= ddlManager.ClientID%>');
</code></pre>
<p>the error is : </p>
<blockquote>
<p>Javascript Runtime error : Object required.</p>
</blockquote>
<p>Note : I Have a master page in the application and the DDL is in the content page.</p>
<p>Can Anyone help me on that.. Thanks is advance.</p>
|
javascript asp.net
|
[3, 9]
|
1,478,014 | 1,478,015 |
Select child of earlier clicked item in jQuery
|
<p>I have clicked on a div. In this div is an image:</p>
<pre><code><div class="grid_2 shareContent" id="facebook_45">
<a href="#">
<img class="facebook"
src="http://roepingen.kk/skins/admin/default/images/social/facebook.png"
alt="Facebook not shared" width="32px" height="32px" />
</a>
</div>
</code></pre>
<p>How can I change the image in the div?
I have the clicked item saved in the variable 'clicked'.
If possible I'd like to delete the link around the image also.</p>
|
javascript jquery
|
[3, 5]
|
1,593,926 | 1,593,927 |
jQuery load file function triggers only in one situation
|
<p>My jQuery script below works perfectly on all devices and PC except Windows Phone. I think it's a pretty standard coding but it gives me a problem. The <code>#feed</code> with the engine.php in it, does not update when I press refresh. ( only on Windows Phone)</p>
<p>A workaround I found is that if I <code>cap +=1;</code> on the <code>#refresh</code> click function then it works.</p>
<p>I am using the latest jQuery.</p>
<p>How can I fix this? Is there anything special about Windows Phone to make use of it ? It seems that there is something like cache, because when I refresh the page it does not chaneg. When I close the tab and open it again it takes me to the updated page.</p>
<pre><code><script type="text/javascript">
var cap = 18;
$(function() {
function loadfeed() {
$('#feed').load('engine.php?cap=' + cap, function() {
$("#loadmore").val('Show More');
});
}
loadfeed();
$("#refresh").click(function() {
loadfeed();
});
});
</script>
<div id="nav_bar">
<a href="#" id="refresh">refresh</a>
</div>
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,982,693 | 3,982,694 |
How do i select an element with certain ID and a certain rel
|
<p>I looked at selectors and has attribute seems to be the closes choice however i cant seem to make it work.</p>
<p>what i am trying to do i select an element with certain id that also has a certain rel value..</p>
<p>for example:</p>
<pre><code><input value="Needthisvalue" rel="15" value=wahtever" id="pickthisID" type="hidden">
</code></pre>
<p>to find out that input with that id and that rel. what I've tried so far is :</p>
<p>TabID contain the 15.</p>
<pre><code>$('#pickthisID[rel="'+TabID+'"]').val();
</code></pre>
<p>Thanks in advanced.</p>
|
javascript jquery
|
[3, 5]
|
4,619,474 | 4,619,475 |
passing parameter on jquery onclick function from html onclick event
|
<p>I want to pass parameters to onclick jquery function from html onclick event.</p>
<p><strong>html statement rendering in PHP</strong></p>
<pre><code>$name = "abcd";
for ($i=0;$<10;$i++){
$text .= '<tr>
<td>'.$i.'</td>
<td><div id="name">'.$name.'/div>
<a class="href" onclick="callJSFunc($i,\''.$name.'\')" ></a>
</td>
</tr>';
}
</code></pre>
<p><strong>javascript..</strong></p>
<pre><code>function callJSFunc(i , name){
alert(i+" "+name);
}
</code></pre>
<p><strong>I want to convert it into someting...</strong></p>
<pre><code>$(".href").click(function(i,name,event){
alert(i+" "+name);
});
</code></pre>
|
php javascript jquery
|
[2, 3, 5]
|
1,975,730 | 1,975,731 |
Android app for a web application without an API
|
<p>Is it possible to create an Android app for an existing web application which doesn't provide any API? </p>
<p>Webview just provides a crude view of the same web app in Android, but interface with webview looks crappy.</p>
|
java android
|
[1, 4]
|
465,204 | 465,205 |
Changing input element value in the fly
|
<p>I'm trying to create a voting system. So when the user clicks the "Vote" button, I want to display the vote count alongside which reflects the count in real time.</p>
<p>I'm using a code something like</p>
<p>HTML</p>
<pre><code><div class='left'>
<input id='vote' name='voteCount' type='button' value='1' />
</div>
</code></pre>
<p>JavaScript</p>
<pre><code>$.ajax({
type: "POST",
url: "vote.php",
data: dataPass,
cache: false,
success: function(html){
$("#vote").val() = count;
}
});
</code></pre>
<p>I'm using the input button to display the vote count since I think it's easier for me to get the button value using jQuery <code>.val()</code> (which is going to be the vote count at present) then increment it when a user votes it and display the vote count simply by setting the new value as the value of the button.</p>
<p>However, the above codes doesn't seen to work. The value doesn't update after setting it.
So can anyone tell me what's the best way to display the vote count in real time?</p>
|
javascript jquery
|
[3, 5]
|
3,888,592 | 3,888,593 |
iframe and save content
|
<p>Hi i have working script saving content from editor works in iframe to input hidden, and geting data from post array. But if i want send in framework, not working. </p>
<p>I tried to insert a hidden field with formlarza model, using the concatenating and outside the function. unfortunately does not work, but if you send out PHP framework, it works.</p>
<pre><code>window.onload = function()
{
document.forms[0].onsubmit = function(){
var text = document.getElementById('text'); text.value = Editor.body.innerHTML; }
}
<iframe id="textbox" name="textbox"></iframe><br />
<input type="hidden" id="text" name="text" />
</code></pre>
<p>Editor is defined in window.onload function, is fine but dont work when i use index.php and router. i sending form to adress admin.php?module=news&action=add</p>
<p>Script site: <a href="http://cstruter.com/blog/45" rel="nofollow">http://cstruter.com/blog/45</a></p>
|
php javascript
|
[2, 3]
|
5,751,525 | 5,751,526 |
Read numbers from edit text and display it on the "textview" in android
|
<p>I want to develop an application in Android SDK, but I am facing a problem in reading a number from <code>editText</code> and making some calculations, after calculation display the result in textView.
can any one help??</p>
|
java android
|
[1, 4]
|
3,692,322 | 3,692,323 |
Loads external php file with javascript src
|
<p>I'm currently using below method to call an external php file with some variables using javascript</p>
<pre><code><script src="http://www.domain.com/function.php?param=A" type="text/javascript"></script>
</code></pre>
<p>And the code in the function.php file will return data in Javascript format, something like</p>
<pre><code><?php Header("content-type: application/x-javascript");
$p = $_GET['param'];
$r = mt_rand(0, 10);
echo "document.write('" . $p . $r . "');";
?>
</code></pre>
<p>This is just a simple example. My problem is on Google Chrome (v19), if the page had not finished loaded, the random number will not be random when I keep refreshing. It will become truly random only when I hit the refresh button AFTER the page finished load. Why is this happen and how can I solve it?</p>
<p>I tested on Firefox 12 and IE8, even if I refresh the page before it finished load, the random number will always be regenerated.</p>
|
php javascript
|
[2, 3]
|
3,535,433 | 3,535,434 |
How to convert a currency string to a double with jQuery or Javascript?
|
<p>I have a text box that will have a currency string in it that I then need to convert that string to a double to perform some operations on it. </p>
<p>"$1,100.00" -> 1100.00</p>
<p>This needs to occur all client side. I have no choice but to leave the currency string as a currency string as input but need to cast/convert it to a double to allow some mathematical operations. </p>
|
javascript jquery
|
[3, 5]
|
3,952,226 | 3,952,227 |
not understood working js code
|
<p>Please see this:
<a href="http://jsfiddle.net/Muj3d/8/" rel="nofollow">http://jsfiddle.net/Muj3d/8/</a></p>
<p>suppose mouse cursor is on <code>div_1</code>, now drag mouse from <code>div_1</code> to <code>div_2</code>, as we see, first time happened action <code>mouseout</code> and after <code>mouseover</code>. Ok, now remove <code>alerts()</code> from js code and repeat mouse drag again, as we see, <code>div_2</code> not removed, question: why?</p>
|
javascript jquery
|
[3, 5]
|
3,499,320 | 3,499,321 |
Jquery .Stop() slowdown
|
<p><a href="http://jsfiddle.net/332tS/" rel="nofollow">http://jsfiddle.net/332tS/</a>
When Using ".stop()" in Jquery, is it possible to make it slow to a halt THEN continue? instead of stopping on the spot.</p>
|
javascript jquery
|
[3, 5]
|
5,949,772 | 5,949,773 |
JavaScript to jQuery (function to add row to table)
|
<p>Can anyone help me to convert JavaScript to jQuery? The JavaScript code is:</p>
<pre><code>function addRow()
{
var table = document.getElementById("table2");
var numOfRows = table.rows.length;
var numOfCols = table.rows[numOfRows-1].cells.length;
var newRow = table.insertRow(numOfRows);
for (var j = 0; j < numOfCols; j++) {
newCell = newRow.insertCell(j);
newCell.innerHTML = "add";
}
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,201,621 | 1,201,622 |
jQuery add target="_blank" for outgoing link
|
<p>I need some help to create jquery script :)<br>
I have some of link like this on my HTML.</p>
<pre><code><a href="http://google.com">Google</a>
<a href="/">Home</a>
<a href="http://www.gusdecool.com/">Home</a>
<a href="contactus.html">Contact Us</a>
</code></pre>
<p>And now i want jQuery to check all of the link on my page. if that link is outside of my server (my server is <code>gusdecool.com</code>). Then add <code>target="_blank"</code>. and the result will be like this </p>
<pre><code><a href="http://google.com" target="_blank">Google</a>
<a href="/">Home</a>
<a href="http://www.gusdecool.com/">Home</a>
<a href="contactus.html">Contact Us</a>
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,768,440 | 1,768,441 |
jQuery.map - Practical uses for the function?
|
<p>I am trying to get a better understanding of the <a href="http://docs.jquery.com/Utilities/jQuery.map">jQuery.map</a> function.</p>
<p>So in general terms .map takes a array and "maps" it to another array of items.</p>
<p>easy example:</p>
<pre><code>$.map([0,1,2], function(n){
return n+4;
});
</code></pre>
<p>results in [4,5,6]</p>
<p>I think I understand what it does. I want to under why would someone need it. What is the practical use of this function? How are you using this in your code?</p>
|
javascript jquery
|
[3, 5]
|
4,760,799 | 4,760,800 |
Browser detection
|
<p>I need to separate IE and FF browsers from others</p>
<p>it's a pseudo-code :</p>
<pre><code>If (CurrentBrowser == IE(6+) or FF(2+) )
{
...
}
else
{
...
}
</code></pre>
<p>in protected void Page_Load() event (think so)</p>
<pre><code> if ((Request.Browser.Type == "IE") || (Request.Browser.Type == "FF"))
{
WebMsgBox.Show("1111");
}
</code></pre>
<p>no effects :-/ what is IE and FF types ?</p>
|
c# asp.net
|
[0, 9]
|
3,484,171 | 3,484,172 |
Building a Datetime Object for SQL database insert
|
<p>I'm working on a small web form that requires the user to input (among other things), the scheduled backup time of whatever server they're adding to the system. The problem is, I'm struggling to find out the best way to take the user input and build a DateTime object (which is what the database requires).</p>
<p>I only really care about the Day of Week, Time of Day (12 or 24 hour clock).</p>
<p>I thought about just creating an empty DateTime object and then just adding my input values from the user, but you can only get, not set, the day of week, time of day, etc.</p>
<p>I've been looking at the Calender asp control, which would work for the day of the week selection, but I can't seem to find any support of time of day.</p>
<p>Thanks.</p>
|
c# asp.net
|
[0, 9]
|
124,324 | 124,325 |
Some @Override shows errors in Oracle Java but not in OpenJDK
|
<p>In a repository that was created in Ubuntu Linux and compiled under OpenJDK 6, when implementing LocationListener and SensorListener, adding the <code>@Override</code> tag above the inherited methods compiles fine.</p>
<p>But when the repo is cloned onto a Windows system with Oracle Java, some of the <code>@Override</code> generates errors. Example below:
<code>The method onAccuracyChanged(Sensor, int) of type ExpeditionActivity must override a superclass method</code></p>
<p>It seems that this error occurs only when you add <code>@Override</code> above a method that is inherited from implementing an interface. Adding <code>@Override</code> above a method inherited from a base class does not generate the error. This actually makes sense, because you are actually overriding the logic of the original method.</p>
<p>SO, is it syactically correct to write <code>@Override</code> above inherited interface methods?</p>
|
java android
|
[1, 4]
|
3,484,996 | 3,484,997 |
using python class methods inside java
|
<p>I have three different classes written in python. They contain several methods which I want to use them inside my java program (creating objects from these python classes and use these objects to call the methods). Actually my level in java might be intermediate. However, i am absolutely new in python. I have read that it is possible to use Python class methods inside java but there is no clear way that is well explained. So, please help me with a script or a tutorial or any advice that can help understanding using python classes methods in java. </p>
|
java python
|
[1, 7]
|
576,458 | 576,459 |
Problem with post in MVC
|
<p>I have a troubleshoot with my MVC project. I'm trying to do this:</p>
<p>On a view i'm loading some data on a jqgrid, and based on some selections of the user, i save those selections on a javascript VAR, and i passed it via $post to a Action of the controller, that action is supposed to call it's own view and load the data i passed previously.</p>
<p>Passing the data is working fine, but when the data reaches the new View (the second one), it simply don't load; i made a debug to confirm that the data is reaching the second view, but the page doesn´t shows.</p>
<p>Here is the code of my javascript:</p>
<pre><code>$.post("/MyController/MyAction", { strParams: myParam });
</code></pre>
<p>Here is my Controller</p>
<pre><code> public ActionResult MyAction(string[] strParams){... return View(myobject);}
</code></pre>
<p>Here is my second view header:</p>
<pre><code><%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteIC.Master" Inherits="System.Web.Mvc.ViewPage<object[]>" %>
</code></pre>
<p>...</p>
<p>I don't see where is the problem, everything passed OK except for the second view that doesn't shows.</p>
|
c# asp.net jquery
|
[0, 9, 5]
|
1,823,716 | 1,823,717 |
Why javascript "write() function" isn't working when referring to an element by jquery?
|
<p>Hey guys,
My array is printing it's values on page when:</p>
<pre><code>document.write(unsorted[i]+"<br/>");
</code></pre>
<p>but not when trying to put it in a div referring the element by jquery</p>
<pre><code>$("#no1").write(unsorted[i]+"<br/>");
</code></pre>
<p>Here's my code: </p>
<pre><code>$(function(){
var unsorted = new Array();
function randomNumber(x,y) { //gives a random number
return Math.floor((Math.abs(y - x) + 1) * Math.random()) + Math.min(x, y);
}
for(i=0; i<=33; i++){
unsorted[i]=randomNumber(0,33); //populates the array with random numbers
$("#no1").write(unsorted[i]+"<br/>"); //#no1 is a div
}
});
</code></pre>
<p>Jquery library is tested and works fine whatever is it's my code!
Any suggestions why my approach is wrong appreciate any help
10x</p>
|
javascript jquery
|
[3, 5]
|
926,980 | 926,981 |
Only run code when variable is not equal to null
|
<p>I'm having a problem. I have this code:</p>
<pre><code>setInterval(function() {
$.ajax({ url: url, success: function(data, count){
var obj = jQuery.parseJSON(data);
var content = obj.results[0].content;
}})
}, 2000)
</code></pre>
<p>Now this code is running every 2 seconds and making an ajax call. I keep getting the error that obj is null on this line: </p>
<pre><code>var content = obj.results[0].content;
</code></pre>
<p>I'm pretty sure it's because parseJson hasn't finished when the parser reaches this line. I need a way to say while <strong><em>obj = null</em></strong> don't run the <strong><em>var content = obj.results[0].content</strong>;</em> code.</p>
<p>Hope this makes sense. </p>
|
javascript jquery
|
[3, 5]
|
2,329,011 | 2,329,012 |
pdf and rar files not uploading but images do
|
<p>I have been playing around with asp.net webforms controls to learn how to use them better and I seem to have gotten myself in some trouble with the fileupload control. I noticed that when I upload img's the code I wrote works but when I try to upload a PDF or a RAR file I get an error saying that</p>
<blockquote>
<p>the connection to localhost has been interupted</p>
</blockquote>
<p>This is my code:</p>
<pre><code><div id="center">
<asp:FileUpload ID="FileUpload1" runat="server" />
<br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</div>
protected void Button1_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile) {
try
{
string filename = FileUpload1.FileName;
FileUpload1.SaveAs(Server.MapPath("~/Files/") + filename);
Label1.Text = "File has been uploaded";
}
catch (Exception ex) {
Label1.Text = "The file could not be uploaded";
}
}
}
</code></pre>
<p>What is the problem? Why can't I upload other file types?</p>
|
c# asp.net
|
[0, 9]
|
4,538,859 | 4,538,860 |
Change property on jQuery element
|
<p>I'm not a very skilled javascript programmer, so i don't know how to do this the correct way.</p>
<p>I have this script</p>
<pre><code><script type="text/javascript">
jQuery(function() {
jQuery("#brand-select").jMyCarousel({
visible: '100%' ,
auto: true,
speed: 1000,
});
});
</script>
</code></pre>
<p>Which i working properly, but i want to change the property 'auto: true' to 'auto: false' when the mouse is over the ul element 'brand-select'</p>
<p>I want to do something like this (pseudo-code)</p>
<pre><code>jQuery('#brand-select').mouseover(function() {
brand-select-carousel.auto = false;
});
</code></pre>
<p>Does anybody know how to do this?</p>
|
javascript jquery
|
[3, 5]
|
6,031,610 | 6,031,611 |
Javascript: Find numbers of keywords in textarea
|
<p><strong>Input:</strong></p>
<pre><code>var text = $('#id_textarea').val();
var keywords = $('#id_keywords').val().split(',');
</code></pre>
<p><strong>Output:</strong> Number of <code>keywords</code> in <code>text</code></p>
<p><strong>Example:</strong></p>
<pre><code>text = "jquery javascript js jquery-js js django python, blah blah blah...";
keywords = ['jquery', 'js'];
// so result = 3
</code></pre>
<p>Thanks for any help :)</p>
<p>UPDATE: I need a function to get the result as output. Thanks!</p>
|
javascript jquery
|
[3, 5]
|
797,452 | 797,453 |
ASP.NET or PHP? Soft for Real Estate Agencies
|
<p>Soon I begin create CRM for Real Estate Agencies sphere.
In my backround 2 years of PHP-programming & then 5 years of ASP.NET (intranet applications).
& I think maybe ASP.NET (i write code on C#) have good IDE (VS 2010), but this is monster :)</p>
<p>My application will be multiplayer webapplication for different real estate agencies (it is now fashionable to talk SAAS).
Interaction over SSL via web browser.</p>
<p>What situation with developing of web applications now?</p>
<p>What language prefer for start new project?
Pluses & Minuses of each?
Or maybe choose another language?</p>
<p>Maybe now exist standarts of data structure & exchange in real estate at this moment? </p>
|
php asp.net
|
[2, 9]
|
1,668,333 | 1,668,334 |
Parse Starcraft 2 replays using Java?
|
<p>I want to create an app for android which will parse Starcraft 2 replays in the format MQP.</p>
<p>There was an old project called WARP - but I think it has died... if there was a c# or c++ implementation, I may be able to use that by natively calling it from Java / Android but that would not be ideal.</p>
<p>Can anyone support me in finding a way to parse a sc2 replay mqp file using Java</p>
|
java android
|
[1, 4]
|
5,366,203 | 5,366,204 |
Is it possible send data in realtime in iPhone app to an php aplication?
|
<p>I want to make an iPhone app that sends some data to a PHP web site, I know it can be done with a web service, but how? Can be done in realtime? If I got several iPhones how can I make my app?</p>
|
php iphone
|
[2, 8]
|
5,629,347 | 5,629,348 |
javascript doesn't work in firefox
|
<p>JavaScript:</p>
<pre><code>$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
$('#footer').show();
}
});
</code></pre>
<p>CSS:</p>
<pre><code>#footer {
display: none;
}
</code></pre>
<p>This is supposed to reveal a hidden <code>div</code> at the bottom of a page when scrolled all of the way down to the bottom. For some reason, the hidden <code>div</code> never gets shown in Firefox. Is there another method using jQuery to create the same effect?</p>
<p>EDIT: Here's the page where it's not working correctly in Firefox</p>
<p><a href="http://safe.tumblr.com/theme/preview/34069" rel="nofollow">http://safe.tumblr.com/theme/preview/34069</a></p>
|
javascript jquery
|
[3, 5]
|
3,897,419 | 3,897,420 |
The process cannot access the file because it is being used by another process while deleting image
|
<p>I am trying to delete original image after thumbnail create but original image cannot be deleted. It throws the exception </p>
<blockquote>
<p>The process cannot access the file because it is being used by another process.</p>
</blockquote>
<p>Here is my code </p>
<pre><code>public static string deleteImage(string imagename,string rootpath)
{
try
{
string completePath = HttpContext.Current.Server.MapPath(rootpath + "Images/") + imagename;
if (File.Exists(completePath))
{
File.Delete(completePath);
}
}
catch (Exception e)
{
throw e;
}
}
</code></pre>
<p>Any idea, I am using Visual Studio 2008, thanks</p>
|
c# asp.net
|
[0, 9]
|
1,066,885 | 1,066,886 |
Parse error: syntax error, unexpected T_ECHO in
|
<p>all code is:</p>
<pre><code>$(document).ready(function(){
$('#sub').click(function() {
var r = confirm("سلام")
if (r==true){
var in_code=document.getElementsByName("code")[0].value;
var echo="<?php
include ('conect.php');
$res2=mysql_query("select * from products where code=".echo('document.write(in_code);');." ");
$row2=mysql_fetch_array($res2);
echo $row2['name'];
?>"
alert(echo); }
else {
document.getElementById("frm1").reset();
}
</code></pre>
<p>in this line error:</p>
<pre><code>$res2=mysql_query("select * from products where code=".echo('document.write(in_code);');." ");
</code></pre>
<p>echo('document.write(in_code);'); is not work</p>
<p>how to fix t his or It did better?</p>
|
php javascript
|
[2, 3]
|
692,012 | 692,013 |
show loading image using c# code behind
|
<p>I am working on a web application where I want to show a loading image (busy indicator) when my code create a xml file and download it I want to show the image in a div. I should use c# code only not update panel nor the jquery ajax technique. My code looks like:</p>
<pre><code>protected void lb_DownloadXML_Click(object sender, EventArgs e)
{
this.imgLoading.Visible = true;
//all my code
this.imgLoading.Visible = false;
}
</code></pre>
<p>my image is </p>
<pre><code><img src="Images/loading_big.gif" width="50" height="40" runat="server" id="imgLoading"
visible="false" />
</code></pre>
<p>but its not working. Can anybody explain me how can I achieve this task.</p>
<p>thanks in advance.</p>
|
c# asp.net
|
[0, 9]
|
4,499,303 | 4,499,304 |
PHP to Java (using PtoJ)
|
<p>I would like to transition our codebase from poorly written PHP code to poorly written Java, since I believe Java code is easier to tidy up. What are the pros and cons, and for those who have done it yourselves, would you recommend <a href="http://www.numiton.com/products/ntile-ptoj/ptoj-overview.html" rel="nofollow">PtoJ</a> for a project of about 300k ugly lines of code? Tips and tricks are most welcome; thanks!</p>
|
java php
|
[1, 2]
|
3,769,172 | 3,769,173 |
create a new element as much as the value of the input
|
<p>How can I create element dynamically, and the amount of the element is based on the input text
Thanks before..</p>
|
javascript jquery
|
[3, 5]
|
4,426,650 | 4,426,651 |
Canvas not visible on particular device (One X)
|
<p>I think I am facing a small issue. My problem is that I am drawing a speedometer based on <a href="http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/" rel="nofollow">http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/</a>. And the needle is visible on all devices that I have but not on HTC One X. On checking, I found that the canvas density (canvas.getDensity()) is returned as 0. Could that be the reason it is not visible? Also tested on S3 which has the same OS (4.0.4). Works fine there.</p>
<pre><code> handPath = new Path();
handPath.moveTo(0.5f, 0.5f + 0.0f);
handPath.lineTo(0.5f - 0.010f, 0.5f + 0.0f - 0.00f);
handPath.lineTo(0.5f - 0.002f, 0.5f - 0.22f);
handPath.lineTo(0.5f + 0.002f, 0.5f - 0.22f);
handPath.lineTo(0.5f + 0.010f, 0.5f + 0.0f - 0.00f);
handPath.lineTo(0.5f, 0.5f + 0.0f);
handPath.addCircle(0.5f, 0.5f, 0.05f, Path.Direction.CW);
private void drawHand(Canvas canvas) {
// if (handInitialized) {
float handAngle = degreeToAngle(handPosition);
// float handAngle = 0;
canvas.save(Canvas.MATRIX_SAVE_FLAG);
canvas.rotate(handAngle, 0.5f, 0.5f);
canvas.drawPath(handPath, handPaint);
canvas.restore();
float scale = getScaled(canvas,canvas.getWidth());
canvas.scale(scale, scale);
canvas.drawCircle(0.5f, 0.5f, 0.01f, handScrewPaint);
// }
}
</code></pre>
|
java android
|
[1, 4]
|
2,683,664 | 2,683,665 |
ASP MS chart control
|
<p>I am doing reporting on MS chart Control. I have 5 Series in Chart1 which all are having different values. I want to sort those series in descending order, so I used the multiple sort series method</p>
<pre><code>Chart1.DataManipulator.Sort(PointsSortOrder.Descending,
"Sereis1,Series2,Series3,Series4,Series5");
</code></pre>
<p>This is not working. Can anyone tell me how to sort these series?</p>
|
c# asp.net
|
[0, 9]
|
5,479,803 | 5,479,804 |
How do I add text to the span after some action is perform?
|
<p><a href="http://jsfiddle.net/nwT6v/1/" rel="nofollow">http://jsfiddle.net/nwT6v/1/</a></p>
<p>That's my script basically. How come? </p>
<p>I want to add text after clicking download to the <code>span</code>.</p>
|
javascript jquery
|
[3, 5]
|
2,945,218 | 2,945,219 |
if statement OR logic oddity
|
<p>I'm calling this function from a jUnit test case with the following information:</p>
<pre><code>// abbr = "US";
// Countries = array of two objects one with iso2 = "us"
public Country getCountryFromAbbr(String abbr) {
abbr = abbr.toLowerCase();
for (int i = 0; i < Countries.size(); i++) {
Country country = Countries.get(i);
String iso2 = country.ISO2.toLowerCase();
String iso3 = country.ISO3.toLowerCase();
if (iso2.equals(abbr) || iso3.equals(abbr)) {
return country;
}
}
return null;
}
</code></pre>
<p>When I debug, the second object with <code>ISO2</code> of <code>us</code> <code>iso2.equals(abbr)</code> is true and the other is <code>false</code>. However, country is not returned and the debugger finishes the loop and returns <code>null</code>. </p>
<p>I'm confused as true || false is true. Am I missing something?</p>
<p>Here's the mock of the countries:</p>
<pre><code> List<Country> Countries = new ArrayList<Country>();
Country country = new Country();
country.CountryId = 1;
country.CountryName = "Great Britian";
country.ISO2 = "GB";
country.ISO3 = "GBR";
Countries.add(country);
Country usa = new Country();
usa.CountryId = Studio.USA_COUNTRY_ID;
usa.CountryName = "United States of America";
usa.ISO2 = "US";
usa.ISO3 = "USA";
Countries.add(usa);
return Countries;
</code></pre>
<p><hr/>
EDIT:
I'm using Eclipse and debugging using my Droid X 2.3.3</p>
|
java android
|
[1, 4]
|
3,316,668 | 3,316,669 |
Get a performance metric for certain Android devices?
|
<p>I'm working on an app that has some performance intensive pieces. I can easily scale this to provide a smoother experience while showing less precise information. I'm wondering if there is a good way to determine the capabilities of a given device? The goal is to provide the highest level of precision while keeping the user experience smooth. This only becomes an issue with older or low powered devices.</p>
|
java android
|
[1, 4]
|
4,302,739 | 4,302,740 |
How to select all elements except the ones with a given class, using jQuery?
|
<p>I want to select all elements in my page except those with the class "searchBox".</p>
<p>How can I do that?</p>
<p>I want to disable text selection on all elements except input elements</p>
|
javascript jquery
|
[3, 5]
|
1,246,381 | 1,246,382 |
Alternative to passing data in onClick?
|
<p>I have a web page which lists all database records from a certain server.
Along side each row are a few buttons which allow you to rename or delete records.</p>
<pre><code>INPUT( _value='Rename', _type="button", _class='appbutton', _onclick='renameApplication({0},"{1}")'.format(app.id,app.name))
</code></pre>
<p>Which generates something like:</p>
<pre><code><input class="appbutton" type="button" value="Rename" onclick="renameApplication(3,"My Application")"></input>
</code></pre>
<p>(The backend templating engine is web2py, but that's not really important.)</p>
<p>I am generating these buttons dynamically. Currently I pass the data each button needs through onClick.</p>
<p>According to <a href="http://stackoverflow.com/questions/12627443/jquery-click-vs-onclick">jQuery.click() vs onClick</a> I shouldn't be doing this anymore. But if that is the case, how should I be passing data so that each button click can use dynamic data written server side (the application ID and name in this instance.)</p>
<p>I can't do dom traversal through the record to grab the data because the row structure might change.</p>
<p>I can't use custom attributes because I need to support less than HTML 5, and I'm not going to modify the doctype! (<a href="http://stackoverflow.com/questions/1735230/can-i-add-custom-attribute-to-html-tag">Can I add custom attribute to html tag?</a>)</p>
<p>The only thing I can think of is to put data in the id attribute then parse it, but that seems very hackish.</p>
<p>Is there a better way?</p>
|
javascript jquery
|
[3, 5]
|
1,944,766 | 1,944,767 |
Drop down box selectedIndex property
|
<pre><code>$.fn.fillSelect = function (data) {
return this.clearSelect().each(function () {
if (this.tagName == 'SELECT') {
var dropdownList = this;
$.each(data, function (index, optionData) {
var option = new Option(optionData.Text, optionData.Value);
if ($.browser.msie) {
dropdownList.add(option);
} else {
dropdownList.add(option, null);
}
});
// code for access "selectedindex"
}
});
};
</code></pre>
<p>Above is the code snippet for dynamically generating a drop down using jQuery.</p>
<p>I need to set <strong>selectedIndex</strong> property value dynamically for the purpose of showing the saved value earlier. I am going to insert that code into <code>// code for access "selectedindex"</code> place inside above code. So how can I set <strong>selectedIndex</strong> property for the <code>dropdownList</code>?</p>
|
javascript jquery
|
[3, 5]
|
3,003,742 | 3,003,743 |
RegisterStartupScript fire at open popup
|
<p>I am trying to check the class of an object in the parent() of a popup. This check will determine the UI (ASP form elements of the popup). For Instance:</p>
<p>Pseudo Code: (JQUERY) I want this executed when the popup is opened and pass in whether or not the specific class was found</p>
<pre><code>if($(document).find('.specificClass'))
{
//send boolean value to the new popup window
//if false execute the following
var labelToHide = document.getElementById('<%= Label.ClientID %>');
var textBoxToHide = document.getElementById('<%= TextBox.ClientID %>');
labelToHide.style.display = 'none'
textBoxToHide.style.display = 'none'
//else take the textbox value and pass it back to the parent
}
</code></pre>
<p>Also I want to take a value from one of the TextBox elements and pass it back to the parent
to change a height value of the parent element. I've been working on this for a while and I think my issue involves my selection and where I am trying to call the DOM elements.</p>
<p>Any help or suggestions help.. From what I read I don't think ClientScript.RegisterStartupScript will help but I could be wrong. </p>
<p>Thanks in advance!
-Mitch</p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
119,299 | 119,300 |
How to show the progressbar when upload the video file using multipartentity
|
<p>i am upload video file and data using multipartentity .How to show the progressbar and upload the Array values in one key value?</p>
<p>I am using the following code:</p>
<pre><code> DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(Call_Server.REPLAY_VIDEO);
MultipartEntity mpEntity = new MultipartEntity(
HttpMultipartMode.STRICT);
mpEntity.addPart("FILE_UPLOAD", new FileBody(videofile));
mpEntity.addPart("message_id", new StringBody(recipient_id));
mpEntity.addPart("recipient_email", new StringBody(recipient_email2));
totalSize = (int) mpEntity.getContentLength();
System.out.println(totalSize + ":::::totalSize");
httppost.setEntity(mpEntity);
HttpResponse response = httpclient.execute(httppost);
HttpEntity resEntity = response.getEntity();
</code></pre>
|
java android
|
[1, 4]
|
3,663,611 | 3,663,612 |
How to setup javascript redirect to send user to back page? see code
|
<p>with <code>onclick="history.go(-1);return false;"</code> user can navigate to back pages. but if I want to put a confirm method before it takes user to the back.. how would I do that?</p>
<p>I think it can be achieved by doing something like below but I am not sure how to redirect user to back page? </p>
<pre><code>$('.clickme').click(function() {
if(confirm("Are you sure you want to navigate away from this page?"))
{
//window.close();
// how to redirect to history.go(-1) ??
}
return false;
});
</code></pre>
<p>Any ideas?</p>
<p>Thank you.</p>
<p><strong>UPDATE</strong></p>
<p>Also is there any way I can check if history has some values in it or is empty?? so that I can alert user if is empty??</p>
|
javascript jquery
|
[3, 5]
|
1,172,834 | 1,172,835 |
Permanently Closeable jQuery pop-up
|
<p>I have a moveable and closable jquery pop-up notification box. It works well aside from the fact that it pops up every time the page is loaded. What method would I need to implement to allow a user to permanently (or at least semi permanently) close the pop-up box?</p>
<p>If I need to use cookies how would I tie a cookie to a specific action like closing the div?</p>
|
php javascript jquery
|
[2, 3, 5]
|
2,762,095 | 2,762,096 |
Data attribute not rendering in the desired format when added dynamically ,not escaping double quotes
|
<p>Im trying to add a div tag dynamically with some data attributes but the data attributes are not rendering in the right format.Please find the code below</p>
<pre><code>$('<a href="#" id="opendialog2" data-role="button">Open Dialog2</a><div id="inlinecontent2" style="display:none" data-options="{"mode":"blank","headerText":"Yo","headerClose":true,"blankContent":true}"><ul data-role="listview"><li>Some</li><li>List</li><li>Items</li></ul><a rel="close" data-role="button" href="#">Close</a></div>').appendTo('#myDiv')
</code></pre>
<p>The div inlinecontent2 is rendered as </p>
<pre><code><div mode":"blank","headertext":"yo","headerclose":true,"blankcontent":true}"="" data-options="{" style="display: none;" id="inlinecontent2">
</code></pre>
<p>The data options attributes renders all messed up</p>
<p>Im wish to get it rendered like below</p>
<pre><code><div id="inlinecontent" style="display:none" data-options='{"mode":"blank","headerText":"Yo","headerClose":true,"blankContent":true}'>
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,213,789 | 4,213,790 |
Half Hidden Div
|
<p>Ive got a interesting problem. I am using google vis to place guages inside a div. These gauges are updated on dropdownmenu selections from JS functions. The div which hosts the gauges is activated by clicking an image,</p>
<pre><code> <a title="Asset List View" target="_blank" class="header" target="_parent">
<img id="bgLogoo" style="opacity:0.7 "
src="********" width="40" height="28" align="absmiddle"
onclick="showhideG('gauge');" /> </a>
</code></pre>
<p>Then it runs through a JS function that turns the visibility of that div on.</p>
<pre><code>var stateG = 'none';
function showhideG(layer_ref)
{
if(stateG == 'block')
{
stateG = 'none';
}
else
{
stateG = 'block';
}
if(document.all)
{
//IS IE 4 or 5 (or 6 beta)
eval("document.all." +layer_ref+ ".style.display = stateG");
}
if (document.getElementById &&!document.all)
{
var pos = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(0,45));
pos.apply(document.getElementById(layer_ref));
map.getContainer().appendChild(document.getElementById(layer_ref));
hza = document.getElementById(layer_ref);
hza.style.display = stateG;
}
}
</code></pre>
<p>The problem is, The div is turning on and off but the gauges inside of it are being are not there. I know they are being created because I can see them at the bottom of the page. They begin to show up in the correct div if you click the image then change your dropdown selection. Any ideas?</p>
|
javascript asp.net
|
[3, 9]
|
5,688,470 | 5,688,471 |
Server not reading jquery
|
<p>I created an application using PHP, mysql, and jquery. It's working fine on my localhost,m however after uploading it to the server, everything works fine but jquery, I believe it's not reading it.</p>
<p>Using firebug, I get the following error when trying to read the .js file in the browser: </p>
<blockquote>
<p>Uncaught syntax error: Unexpected
token.</p>
</blockquote>
<p>Here's how i include my scripts:</p>
<pre><code><script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="js/autoresize.jquery.js"></script>
<script type="text/javascript" src="js/customSelect.jquery.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script type="text/javascript" src="js/jquery.validate.password.js"></script>
</code></pre>
<p>I did check my files and they exist in /js/ . What could be wrong?</p>
<p><strong>UPDATE</strong></p>
<p>It is working when I read :
<a href="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" rel="nofollow">https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js</a></p>
<p>But it's not working when reading from server?</p>
|
php jquery
|
[2, 5]
|
4,479,143 | 4,479,144 |
Starting service from intent in another service gets a run time error
|
<p>I'm getting an error when trying to start a service with an intent from another service in an Android 2.3.3 project. The error is: Unable to start service with Intent{ act=(class name) cmp=(class name)/.(android name) }: java.lang.IllegalArgumentException:provider==null</p>
<p>Method Call:</p>
<pre><code>private void startLocationService(){
intent = new Intent("com.example.Android.LocationService");
intent.setClass(MainService.this.getApplicationContext(), LocationService.class);
startService(intent);
}
</code></pre>
<p>Manifest:</p>
<pre><code><service android:name=".LocationService">
<intent-filter>
<action android:name="com.example.Android.LocationService"/>
</intent-filter>
</service>
</application>
</code></pre>
|
java android
|
[1, 4]
|
207,722 | 207,723 |
Why can't i run a javascript function from c# code?
|
<p>This is a part of the C# code where i want to insert the network graph:</p>
<pre><code>DetailsBody3.Text = "<tr class=\"space\">";
DetailsBody3.Text += "<td>" + "<div id=\"center-container\"><div id=\"infovis\"></div> />";
DetailsBody3.Text += "</div></td>";
DetailsBody3.Text += "</tr>";
</code></pre>
<p>In the "infovis" div in the graph code, the graph exists.
And in the graph javascript file:</p>
<pre><code>function init1(){
// init data
}
var fd = new $jit.ForceDirected({
//id of the visualization container
injectInto: 'infovis',
// some other code,
}
</code></pre>
<p>I want to call the int1() function and draw the graph in the table created in C# above.</p>
|
c# asp.net
|
[0, 9]
|
1,022,659 | 1,022,660 |
How to attach hover to SVG path?
|
<p>I'm dynamically drawing svg shapes and I need to attach hover and click listeners to the elements. For some reason I can't get it to work.</p>
<p>I'm creating the svg like this:</p>
<pre><code>function svgCreator(){
var objectName = this.name;
$('#container').append('<svg><path class="overlay" id="path_' +objectName +'"d="M5,723,5,716,205,612,226,717" /></svg>')
}
</code></pre>
<p>later I try to attach hover and click events:</p>
<pre><code>function svgHover(){ //svgHover is a method of a generic object
var hotspotObject =this; //hotspotObject is storing the current object as a variable
this.hotspotSvg.hover( //hotspotSvg is simply $('#path_' +this.name);
function() {
alert('hovering');
},
function() {
$("#outlines").hide();
}
).click(function() {
alert('You clicked me');
});
};
</code></pre>
<p>EDIT:
The problem got solved, it wasn't because of the svg at all but because I was attaching the event listener incorrectly. I made the mistake of blaming the svg since that is something totally new I'm trying. </p>
|
javascript jquery
|
[3, 5]
|
3,715,310 | 3,715,311 |
jQuery form action change
|
<p>Normally to change the action attribute of a form in jQuery I would do the following:</p>
<pre><code><form id="removeLightboxForm" action="">
...
</form>
$('#removeLightboxForm').attr("action", "view/#close");
</code></pre>
<p>But I usually use this for when the action attribute is empty on the HTML form tag itself. I'm now trying to use this on a form where the action attribute already contains a default URL and is causing problems.</p>
<p>In this example, the form action is present:</p>
<pre><code><form id="removeLightboxForm" action="view/">
...
</form>
</code></pre>
<p>But when I do this:</p>
<pre><code>$('#removeLightboxForm').attr("action", "view/#close");
</code></pre>
<p>I end up with the new URL/action being added to the original URL/action, for example:</p>
<pre><code><form action="view/view/#close" ...
</code></pre>
<p>Is this how it's supposed to work or am I doing something wrong?</p>
|
javascript jquery
|
[3, 5]
|
1,529,766 | 1,529,767 |
jquery hooks for finger swype?
|
<p>so, i've built this site to put up some of my photos:</p>
<p>pics.nicecomeback.com</p>
<p>it's not using any standard jquery photo gallery .. implemented my own by capturing arrows and swapping page background to show next/previous photo. </p>
<p>to my surprise, this thing mostly just works when viewed on an android or iphone. </p>
<p>what i'd like to add, is mimic the arrows functionality when a user swypes left/right. </p>
<p>all i need is some way to capture the side swyping event. does JQuery have some utility for that ? </p>
<p>need something as light weight as possible. taking a look at <a href="http://jqtouch.com/" rel="nofollow">jQTouch</a>.. This is nice but kind of overkill for what i need. </p>
|
javascript jquery
|
[3, 5]
|
1,847,662 | 1,847,663 |
Uncaught SyntaxError passing multiple values to function
|
<p>I am trying to call a function, but am running into some struggles with properly escaping the values and passing it properly. I currently have:</p>
<pre><code>function selectdone(sel, title_id, status_type) {
...
}
$(function() {
$("td.status-updates").click(function() {
if ($(this).find('#sel').length == 0) {
var before = $(this).text();
var title_id = $(this).parent().attr('id');
var status_type = $(this).attr('class');
$(this).html("<select id='sel'
onchange='selectdone(this," + title_id + "," + status_type +");'...
<option>NS</option></select>");
}
});
</code></pre>
<p>The error I keep getting from this is <code>Uncaught SyntaxError: Unexpected identifier</code>. </p>
<p>However, if I pass it as <code>'selectdone(this," + title_id + ");...</code> it works, but if I try and pass three it raises that error.</p>
<p>Note: there are spaces in the <code>status_type</code> variable (multiple classes).</p>
|
javascript jquery
|
[3, 5]
|
4,642,991 | 4,642,992 |
declaring serviceintent in androidmanifest
|
<p>I have a class which extends serviceintent called bluepostservice. In another class in the same package which extends activity i call</p>
<pre><code>Intent selectIntent = new Intent(this, bluepostservice.class);
this.startService(selectIntent);
</code></pre>
<p>I have this in my manifestxml </p>
<pre><code><service android:name="BluePostService" />
</code></pre>
<p>However i get </p>
<p>Unable to start service Intent { cmp=org.anddev.android.parsingxml/.BluePostService }: not found</p>
<p>Clearly I've declared something wrong in the manifest or started the service improperly.</p>
<p>How do you properly declare a service intent in the androidmanifest?</p>
|
java android
|
[1, 4]
|
3,191,084 | 3,191,085 |
currently selected month in asp.net calendar control
|
<p>How do I know which month is selected when no date is selected.</p>
<p>For eg, on page load, the calendar will show december. The user click ">" button to show January. </p>
<p>How do I know that he has selected January?</p>
<p>Tkz</p>
|
c# asp.net
|
[0, 9]
|
639,064 | 639,065 |
Strange behavior in JavaScript
|
<p>I have 2 elements - "span" (named "divLikedX") and "a" (named "aLikeX"). I have the following javascript (occurs clicking by "a"):</p>
<pre><code> function CommentLike(CommentID, aLink) {
if (CommentID != null && CommentID > 0)
$.post("/Home/LikeComment", { CommentID: CommentID },
function () {
//alert($("#divLiked" + CommentID).is(':visible'));
/*alert($(aLink).text());*/if ($("#divLiked" + CommentID).is(':hidden')) {
$("#divLiked" + CommentID).show();
$("#aLike" + CommentID).text('Unlike');
} else {
$("#divLiked" + CommentID).hide();
$("#aLike" + CommentID).text('Like');
}
});
};
</code></pre>
<p>If I remove <code>$("#aLike" + CommentID).text('Unlike');</code> and <code>$("#aLike" + CommentID).text('Like');</code> strings I get the correct behavior. But with these strings it works correctly only first 2 clicks, after it <code>alert($("#divLiked" + CommentID).is(':visible')) == "true"</code> always. Why?</p>
|
javascript jquery
|
[3, 5]
|
4,531,423 | 4,531,424 |
Javascript + Click all divs
|
<p>I trying to have a javascript function to click all divs that has an id of 'divResults' in my form but apparently it doesn't work, no errors but nothing buldges. Please advice. Thanks.</p>
<pre><code> <a href="javascript:clickAllDivs()">Expand All</a> | <a href="javascript:clickAllDivs()" >Collapse All</a>
</code></pre>
<p>JavaScript :</p>
<pre><code> function clickAllDivs() {
var els = document.getElementsByTagName('div');
var i = els.length; while (i--)
if (els[i].id == 'divResults' ) {
//alert("I am in"); //Check if div is eating this function
els[i].click();
}
}
</code></pre>
|
javascript asp.net
|
[3, 9]
|
3,691,348 | 3,691,349 |
Is there an equivalent of ucwords in java
|
<p>In php, the method <code>ucwords</code> converts any string in a string where each words first character is in uppercase, and all other characters are lower case. </p>
<p>I always end up making my own implementation, and I'm wondering if a standard method exists. </p>
|
java php android
|
[1, 2, 4]
|
1,006,155 | 1,006,156 |
Subscribing to "childrenAdded" event in jQuery
|
<p>Is there currently a way to subscribe to an event of a wrapped set, that will trigger when any element is appended to it as a child element? </p>
|
javascript jquery
|
[3, 5]
|
4,368,453 | 4,368,454 |
JQuery: get current selector
|
<p>I have a form with multiple <code>select</code> dropdown menus that start with the id: package which are added dynamically by the user. My goal is to put all the selected values from these <code>select</code> dropdowns into an array. Here is the code I have so far. </p>
<pre><code>$(document).ready(function() {
arr = new Array();
$(document).on('change', 'select[id ^="package"]', function() {
arr.push($(this).val());
alert(arr.join('\n')); //for testing
});
});
</code></pre>
<p>Currently all I am doing is pushing the selected values onto the array rather than setting the values for a specific index. Therefore if I keep switching the value for a specific <code>select</code>, I will keep pushing values onto the array. How can I determine which selector I am currently in so I can get an index into the array to modify the array accordingly?</p>
|
javascript jquery
|
[3, 5]
|
5,216,129 | 5,216,130 |
datetime string formatting in usercontrol
|
<p>I want to formatting a Date field in user control.</p>
<pre><code><asp:Repeater ID="rptList" runat="server">
<ItemTemplate>
<asp:Label ID="lblDate" runat="server" Text='<%# ((DateTime)Eval("Date")).ToString("MMM dd") %>'></
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>
</code></pre>
<p>This output is like these ; <code>Jan 15</code>, <code>Oct 23</code>
But I want to set Turkish culture these. So want to take results turkish lang opposite.</p>
<p>How to do this?
Best regards...</p>
|
c# asp.net
|
[0, 9]
|
3,949,657 | 3,949,658 |
onbeforeunload not working within unload
|
<p>I have wrote the following code to run the onbeforeunload within unload. However, this doesn't seem working. Does anyone know what's wrong about my code and anyway to make it work?</p>
<pre><code>$(window).unload(function () {
if ($('.submitAction').val() == "" && isChange) {
window.onbeforeunload = confirmExit;
}
});
function confirmExit() {
return "If you have made any changes to the fields without clicking the Save button, your changes will be lost. Are you sure you want to exit this page?";
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,472,261 | 3,472,262 |
Creating classes and using them into project
|
<p>I have a lot of button inside my application and for every button i need to create onClickListener, this will incerase line of code's.</p>
<p>So i create a class for onClickListener below:</p>
<pre><code> import android.app.Activity;
import android.content.Intent;
import android.view.View;
public class OnClickListener implements android.view.View.OnClickListener{
Activity current;
Class<?> goTo;
public OnClickListener(Activity arg0, Class arg1){
this.current = arg0;
this.goTo = arg1;
}
@Override
public void onClick(View v) {
Intent intent = new Intent(current, goTo);
}
}
</code></pre>
<p>and now i want to go to next activity when button click's but when i put this line <code>startActivity(intent);</code> compiler shows error <code>The method startActivity(Intent) is undefined for the type OnClickListener</code></p>
<p>I dont know where i am going wrong and what i am missing. Please help me to solve this problem</p>
|
java android
|
[1, 4]
|
5,104,511 | 5,104,512 |
jQuery code lines from array
|
<p>This works ok:</p>
<pre><code>$('#icon1').live("hover", show_popup, hide_popup);
$('#icon2').live("hover", show_popup, hide_popup);
$('#icon3').live("hover", show_popup, hide_popup);
</code></pre>
<p>But this does not works and has no error:</p>
<pre><code>var icons = ['#icon1', '#icon2', '#icon3'];
for (icon in icons)
$(icon).live("hover", show_popup, hide_popup);
</code></pre>
<p>What is wrong with that code?</p>
|
javascript jquery
|
[3, 5]
|
1,430,639 | 1,430,640 |
Web Crawling and inbound link extracting
|
<p>I'm searching for a c# function that takes a Url as a parameter and returns all the inbound url related to that url.</p>
|
c# asp.net
|
[0, 9]
|
2,589,669 | 2,589,670 |
add/remove class at same time in java script (php module)
|
<p>i am developing a module in PHP and i need to add/remove class at the same time using event onclick in javascript.
Please suggest.</p>
<p>Below is the code but it is not working,</p>
<pre><code>jQuery("#cat-block-id").show();
//jQuery("#product-block-id").hide();
jQuery(".fme_layered_attribute").click(function() {
jQuery("#product-block-id").show();
//jQuery("#cat-block-id").show();
})
</code></pre>
<p>Thanks,</p>
|
php javascript
|
[2, 3]
|
1,646,456 | 1,646,457 |
org.apache.axis2.databinding.ADBException: Unexpected subelement contentType at org.apache.axis2.AxisFault
|
<p>I am getting below exception when trying to create Proxy and consume service from ASP.NET, C#</p>
<p>Web service was created in apache.axis2
org.apache.axis2.databinding.ADBException: Unexpected subelement contentType at org.apache.axis2.AxisFault.</p>
|
c# asp.net
|
[0, 9]
|
2,454,842 | 2,454,843 |
Get previous and next siblings from jQuery
|
<pre><code><ul>
<li>
<img src="a">
</li>
<li>
<img src="b">
</li>
<li>
<img src="c">
</li>
<li>
<img src="d">
</li>
</ul>
</code></pre>
<p>This is just an example, this above structure belongs to a carousel and IMG "b" is focused to the screen. I just want to know how to get the height of the previous image (that is "a") and the next image height (that is "c").</p>
<p>I tried with <code>.closest</code> and <code>.siblings()</code> but that didn't work.</p>
|
javascript jquery
|
[3, 5]
|
1,365,386 | 1,365,387 |
How do you name your classes when it comes to JavaScript vs CSS?
|
<p>There are some classes that are there for css, and there are some classes that are there for JavaScript.</p>
<p>What naming convention do you use to denote "look for this class in the JavaScript file(s)" as opposed to: "Look for this class in the css file(s)" as opposed to "Look for this class everywhere".</p>
|
javascript jquery
|
[3, 5]
|
1,709,606 | 1,709,607 |
how to randomly change the color of every pixel on the screen
|
<p>I want each pixel on the screen to flash between red, blue, green, white, and black but independently of each other. Is this possible? I have been searching everywhere with out any luck. Any help on where to start would be greatly appreciated.</p>
|
java android
|
[1, 4]
|
5,018,460 | 5,018,461 |
Send some HTML data into a php file using javascript
|
<p>Example: I have two php files (<code>phpfile_1.php</code> , <code>phpfile_2.php</code>). I have a <code>div</code> with <code>id = "content_Div"</code> in the <code>phpfile_1.php</code> file. I want to send all HTML content that the <code>content_Div</code> has to another <code>div</code> which is in <code>phpfile_2.php</code> using Javascript/jQuery (as like redirect HTTP).</p>
<p>When I click a button the Javascript/jQuery will get the HTML data from the <code>content_Div</code> and send it to <code>phpfile_2.php</code> div and reload that <code>phpfile_2.php</code> file into browser window with showing those html data.</p>
<p>How can this be done?</p>
|
php javascript
|
[2, 3]
|
2,970,010 | 2,970,011 |
What does IsPostBack actually mean?
|
<p>I am interested to know what specifically Page.IsPostBack means. I am fully aware of it's day to day use in a standard ASP.NET page, that it indicates that the user is
submitting data back to the server side. See <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback.aspx" rel="nofollow">Page:IsPostBack Property</a> </p>
<p>But given this HTML</p>
<pre><code><html>
<body>
<form method="post" action="default.aspx">
<input type="submit" value="submit" />
</form>
</body>
</html>
</code></pre>
<p>When clicking on the Submit button, the pages Page_Load method is invoked, but the Page.IsPostBack is returning false. I don't want to add <code>runat=server</code>.</p>
<p>How do I tell the difference between the pages first load, and a Request caused by the client hitting submit?</p>
<p><strong>update</strong><br />
I've added in <code><input type="text" value="aa" name="ctrl" id="ctrl" /></code> so the Request.Form has an element, and Request.HTTPMethod is POST, but IsPostBack is still false?</p>
|
c# asp.net
|
[0, 9]
|
2,983,718 | 2,983,719 |
Help me with setTimeout() please
|
<p><br />I guess I need help on this one.<br />I'm not new to Javascript but then I realize I don't know how to use <a href="https://developer.mozilla.org/en/window.setTimeout" rel="nofollow">setTimeout()</a>.</p>
<p>I have tried this:</p>
<pre><code>$(document).ready(function(){
setTimeout('changeit()',1000); // I have also tried setTimeout('changeit',1000);
// var t = setTimeout('changeit()',1000); <--- tried also something like this.
// changeit(); <-- works when i do this.
function changeit(){
$('#hello').html('Hello World - this was inserted using jQuery');
// #hello is <p id="hello">Hello World</p>
}
})
</code></pre>
<p>Can anyone help me with this one.<br />Please make me realize something.<br />Thanks.</p>
|
javascript jquery
|
[3, 5]
|
319,458 | 319,459 |
Event which triggers when stylesheets, not only the DOM, are loaded on the page
|
<p>I tried to use the <a href="http://api.jquery.com/ready/" rel="nofollow">http://api.jquery.com/ready/</a> callback for executing a code, which I would like to get started only when the page is fully loaded. However, this triggers when the DOM is loaded, and it can often happen that the stylesheets are not loaded fully.</p>
<p>How can I ensure that a particular code is loaded after DOM and also the stylesheets (or even everything) are loaded? I found some similar questions (like <a href="http://stackoverflow.com/questions/8681440/is-there-event-that-triggers-after-dom-was-loaded-but-before-any-external-assets">this one</a>), but they are not about stylesheet loading, which I am particularly interested in.</p>
<p>Thanks for suggestions.</p>
|
javascript jquery
|
[3, 5]
|
419,004 | 419,005 |
jQuery UI Tab returns first tab
|
<p>I've an asp:Button control in tabs-2. I'm inserting database something in onClick method, then it returns first tab but i want to open current tab. Also, page must be reload. How can i do ?</p>
<pre><code><asp:Button ID="btnAddContactKnowledge" CssClass="ButtonDefault" runat="server" Text="add" OnClientClick="ValidateContactKnowledge();" Width="120px" OnClick="btnAddContactKnowledge_Click" />
</code></pre>
|
c# jquery asp.net
|
[0, 5, 9]
|
2,475,637 | 2,475,638 |
Change table border color using JQuery
|
<p>I have a user control that conatins HTML, like this:</p>
<pre><code><table id="tblProgramInfo" runat="server" cellpadding="0" cellspacing="0" class="ProgramInfo">
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%" class="tblProgram" abc="def">
<tr>
<td>
Some data
</td>
</tr>
</table>
</td>
</tr>
</code></pre>
<p></p>
<p>Since its a user control, their could be multiple table with same class "ProgramInfo" and "tblProgram". Now I have attached mouseover and mouseout event for "ProgramInfo" class using Jquery. What I want is, <strong>to change the border color of inside table containing class "tblProgram" on mousemove and mouseout</strong>.
<br/>
My mousemove and mouseevent are:</p>
<pre><code>$(document).ready(function()
{
$(".ProgramInfo").mouseover(function()
{
// Code here?
});
$(".ProgramInfo").mouseout(function()
{
// Code here?
});
});
</code></pre>
<p>Also, <strong>I want to change the width and height of upper table through JQuery</strong>. When I tried this, I get width:auto.</p>
|
asp.net jquery
|
[9, 5]
|
4,094,696 | 4,094,697 |
Cant combine PHPfreechat and Jquery
|
<p>Im trying to implement an onscreen jquery keyboard into my PHPfreechat client.</p>
<p>Everything works fine except when i try to link to the jquery script file. then the chat wont load.</p>
<p>im loading the jquery from my CDN but i have also tried local.</p>
<p>if i create a blank page with the jquery and keyboard scripts everything works fine.</p>
<p>not sure why this is blocking for the rest of the scripts and php on my chat.</p>
<p>any suggestions?</p>
<p>edit: furthermore i have also tried moving the load of the script files from top to bottom of the other scripts. if i load the jquery at the end of my scripts the keyboard works but the chat wont load. if i load it at the start the keyboard doesnt load but the chat works</p>
|
php javascript jquery
|
[2, 3, 5]
|
4,186,615 | 4,186,616 |
How to call a PHP class member function from a Java file?
|
<p>I am using PHP/Java bridge to run PHP scripts on the Tomcat server. Can someone point me to an example as to how to call my PHP scripts from a Java file. </p>
<pre><code><?php
class X{
//variables
//functions
}
?>
</code></pre>
<p>Now I want to call the member functions of class X using its object via a Java file. How do I do this? I want to implement multithreading using the Java file and call multiple PHP functions on separate thread.</p>
|
java php
|
[1, 2]
|
15,669 | 15,670 |
record mouse movements, clicks and keyboard input with Java or C++
|
<p>I want to be able to record mouse movements, clicks and keyboard input from a user. It would be great if it was a cross platform solution.</p>
<p>I'd like to get back something like this (pseudo code):</p>
<p>mouse moved to 500, 500
mouse double clicked
mouse moved to 800, 300
mouse left clicked
keyboard typed "Hello World"</p>
<p>Does either C++ or Java have any classes that can do this? If I was using C++, I would probably working with the QT framework. </p>
<p>Edit:</p>
<p>I should have said this originally, but I want to record the movements and clicks outside of the applications gui, so on the desktop too.</p>
|
java c++
|
[1, 6]
|
2,414,982 | 2,414,983 |
How to highlight specific row in a DetailsView?
|
<p>I am a new ASP.NET developer. I am using a DetailsView now to dispaly some data from the database. I have the need to highlight certain two rows from the DetailsView. Both rows are VARCHAR data type.
<strong>SO HOW TO DO THAT?</strong></p>
|
c# asp.net
|
[0, 9]
|
2,077,968 | 2,077,969 |
How to pass textbox value to JavaScript?
|
<p>How to pass two textbox values to a javascript function on a button click event.I have tried it like this but it is not working.here is my code</p>
<pre><code><asp:LinkButton ID="lnkBTNSubmit" runat="server" CssClass="buttonlink"
OnClientClick="checkDateRange(GetTextBoxValue('<%= txtATrendStartDate.ClientID %>'.value),GetTextBoxValue('<%= txtATrendEndDate.ClientID %>'.value))">Submit</asp:LinkButton>
</code></pre>
<p>and</p>
<pre><code>function checkDateRange(start, end)
{
}
</code></pre>
<p>Any Suggestion?</p>
|
javascript asp.net
|
[3, 9]
|
2,847,222 | 2,847,223 |
comparing and sorting javascript arrays
|
<p>This might get a bit confusing and I'm not sure if it's possible, but I would appreciate any help.
I have the following arrays (the items and number of lists might change, this is just an example):</p>
<pre><code>var list_1 = ["A - 2" , "E - 5" , "C - 7"];
var list_2 = ["D - 2" , "A - 2" , "E - 3"];
var list_3 = ["C - 1" , "E - 8" , "A - 7"];
</code></pre>
<p><strong>My expected output is:</strong></p>
<pre><code>var final = ["A - 2" , "C - 1" , "D - 2" , "E - 3"];
</code></pre>
<p><strong>What I'm trying to do:</strong></p>
<p>I'm trying to figure out how to go through each array item, see if the letter in the beginning of the item exists in the previous array and if the number in the item is lower than the previous item, replace it in the 'final' list.</p>
<p>Any ideas, or is this not possible?</p>
<p>jQuery is acceptable</p>
|
javascript jquery
|
[3, 5]
|
3,616,020 | 3,616,021 |
How to select all body elements except first div
|
<p>I have this HTML:</p>
<pre><code><body>
<div id="switcher" class="switcher">
<h3>Style Switcher</h3>
<button id="switcher-default">
Default
</button>
<button id="switcher-narrow">
Narrow Column
</button>
<button id="switcher-large">
Large Print
</button>
</div>
<p>asdfasdfasdfas dsadf</p>
<p>asd'lfkasdf</p>
<script src="jquery.js"></script>
<script src="test.js"></script>
</body>
</code></pre>
<p>I want to add a class to all body elements except my first <code>div</code> (which has the <code>id</code> called switcher), when I click on the Large print <code>button</code>.</p>
<p>I have tried </p>
<pre><code> $(document).ready(function(){
$("#switcher-large").bind("click", function(){
$("body:not(:first-child)").addClass("large");
});
});
</code></pre>
<p>and </p>
<pre><code>$(document).ready(function(){
$("#switcher-large").bind("click", function(){
$("body:not(div)").addClass("large");
});
});
</code></pre>
<p>and</p>
<pre><code>$(document).ready(function(){
$("#switcher-large").bind("click", function(){
$("body").not("#switcher").addClass("large");
});
});
</code></pre>
<p>but none seem to work (the class applies to all elements).</p>
<p>I don't want to find an alternate way like selecting only <code>p</code> elements. I just want to understand why the selectors I used don't work...</p>
|
javascript jquery
|
[3, 5]
|
442,912 | 442,913 |
error in fix the position of navigation when scroll the page
|
<p>I wanna to fix the position of navigation at the top when the navigation position and scroll position are equal. Please let me know how can I get the position of navigation and page scroll position? I wanna like this site page <a href="http://new.livestream.com/live-video-tools" rel="nofollow">http://new.livestream.com/live-video-tools</a>
I'm using the following script</p>
<pre><code> <script language="javascript">
$(function() {
// grab the initial top offset of the navigation
var sticky_navigation_offset_top = $('#main-heading').offset().top;
// our function that decides weather the navigation bar should have "fixed" cs s position or not.
var sticky_navigation = function(){
var scroll_top = $(window).scrollTop(); // our current vertical position from the top
// if we've scrolled more than the navigation, change its position to fixed to stick to top,
// otherwise change it back to relative
if(scroll_top > sticky_navigation_offset_top) {
$('#fixed_nav').css({ 'position': 'fixed', 'top':6, 'left':0, 'width':'100%', 'z-index':999, 'height':80, 'background':'#fff' });
} else {
$('#fixed_nav').css({ 'position': '','overflow': 'visible', 'display':'block','height':80});
}
};
// run our function on load
sticky_navigation();
// and run it again every time you scroll
$(window).scroll(function() {
sticky_navigation();
});
</code></pre>
<p>});
</p>
|
javascript jquery
|
[3, 5]
|
4,068,762 | 4,068,763 |
How to get available scroll x amount
|
<p>I am looking to figure the amount available to scroll right. If a user has a smaller screen, the content that is appended will look cut off and I would like to just scroll for them in a smoother fashion. I have used </p>
<pre><code>scrollTo(99999, y);
</code></pre>
<p>but that just jumps. I think my best bet would be something along the lines of:</p>
<pre><code>var inter = setInterval(function(){
if(available_amount_x > 0){
scrollBy(10, 0);
}else{
clearInterval(inter);
}
}, 100);
</code></pre>
<p>In short, how do I get available_amount_x</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
5,260,419 | 5,260,420 |
I am looking forward to call some javascript method from a java class
|
<p>i want to call a javascript method from a servlet... is it possible??</p>
<p>i have heard of something called mozila rhino but cannot understand its use, do any 1 has any idea???</p>
|
java javascript
|
[1, 3]
|
6,028,749 | 6,028,750 |
Most efficient jquery show/hide Toggle
|
<p>Simple question:</p>
<p>What is the most efficient way of showing/hiding 2 divs based on a select control using jquery?</p>
<pre><code><div id="div1">DIV 1 BRO</div>
<div id="div2" style="display:none;">THIS BE DIV 2 CUZ</div>
<select id="blablabla">
<option value="div1">div1</option>
<option value="div2">div2</option>
</select>
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,939,029 | 3,939,030 |
how to show .pdf file in asp.net web application using c#?
|
<p>i have fileUpload control on web page and a button to show .pdf file in a rich text box. but i dont know how to open apdf file ? can i use some pdf library?</p>
|
c# asp.net
|
[0, 9]
|
4,287,183 | 4,287,184 |
Will calling base on an inherited method call return also?
|
<p>Say my base method looks like:</p>
<pre><code>public int GetCount() {.....}
</code></pre>
<p>Now I inherit from GetCount's class, and do:</p>
<pre><code>public new int GetCount()
{
int count = base.GetCount();
count += 1;
return count;
}
</code></pre>
<p>Will calling base.GetCount() cause a return before my increment? (that seems to be what I am experiencing)</p>
|
c# asp.net
|
[0, 9]
|
4,138,503 | 4,138,504 |
Block popup windows settings give error to close popup window in javascript
|
<p>I have one web page, on which when user click on button(for calculation purpose) one popup window open(its an aspx page as popup) .</p>
<p>When user done calculations on popup then automatically popup is close. </p>
<p>But when user block popup windows through browser setting then popup open but cant close.</p>
<p>I want to close this popup window even when user block popup windows.</p>
<p>If you have any solution for this then plz give reply.</p>
<p>Code for open popup window:</p>
<pre><code>window.open('frmSelection.aspx?form=' + formname + '&controlname=' + controlname + '&caption=' + caption + '&control1=' + control1 + '&control2=' + control2 + '&control3=' + control3 + '&Filter=' + filter + '', null,
'height=500,width=562,status=yes,toolbar=no,menubar=no,location=center');
</code></pre>
<p>Code for close popup window:</p>
<pre><code> protected void dgrdSelection_ItemCommand(object source, DataGridCommandEventArgs e)
{
if (e.CommandName == "Select")
{
StringBuilder strScriptBuilder = new StringBuilder();
strScriptBuilder.Append("<script language='javascript' type=text/javascript> ");
strScriptBuilder.Append(" window.close(); ");
strScriptBuilder.Append(" </script> ");
}
}
</code></pre>
<p>Thanks in adv.
Pallavi</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
5,194,589 | 5,194,590 |
Triggering mouseenter several times on changing height for block
|
<p>There is problem with absolute positioned blocks - when I use $('.my-block').mouseenter() and change height in its handler - mouseenter triggers as many as it crosses other such blocks.</p>
<p>for example some thing like this:</p>
<pre><code>.items{position:relative;}
.item{position:absolute;}
</code></pre>
<pre><code><div class="items">
<div class="item item1" style="top:0; z-index:1"></div>
<div class="item item2" style="top:50; z-index:2"></div>
<div class="item item3" style="top:100; z-index:3"></div>
<div class="item item4" style="top:150; z-index:4"></div>
</div>
</code></pre>
<pre><code>$('item').hover(function(event){
console.log("mouseenter triggered");
$(this).stop().animate({
height:400px; // it should to grow up direction
},{
step=function(now, fx){
//changing previous items position by some magic with fx.pos and some logic
}
});
event.stopPropagation();
},function(){/*...*/})
or
$('item').mouseenter(function(){
console.log("mouseenter triggered");
event.stopPropagation();
});
</code></pre>
<p>so when i make mouse enter on item3 in browser in log i see the string "mouseenter triggered" twice and if item4 thrice! What can I do here for preventing this?</p>
|
javascript jquery
|
[3, 5]
|
5,443,214 | 5,443,215 |
Are object parameters passed as references in Javascript to functions?
|
<p>I have the following javascript code:</p>
<pre><code>var oLink = {
title: $link.attr('title') || '',
row: $link.attr('data-row') || '',
$modal: ''
}
</code></pre>
<p>I now call a function like this:</p>
<pre><code>oLink.$modal = accessModalOpen(oLink, content);
</code></pre>
<p>Do I need to return oLink.$modal or could I just set it inside accessModalOpen? In other words is the parameter oLink passed as a reference in javascript? </p>
<p><strong>Update:</strong></p>
<p>Added $modal to the oLink declaration </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.