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,664,776 | 5,664,777 |
reducing opacity of images on a repeater
|
<p>I have a repeater control that has one image and link button per item template.</p>
<p>What I would like to do is when a link button is clicked, each image except for the one related to the click goes to 50% opacity.</p>
<pre><code><asp:Repeater ID="Categories" runat="server" OnItemCommand="showSubCat_itemCommand">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<div class="catListing">
<img class="RepeaterImage" src="/images/<%#Eval("imageUrl").ToString() ?? "" %>"/>
<asp:LinkButton ID="showSubCats" runat="server" text='<%# Eval("Name") %>' CommandArgument='<%# Eval("id") %>'/>
</div>
</ItemTemplate>
<FooterTemplate></FooterTemplate>
</asp:Repeater>
</code></pre>
<p>This is my repeater, I was hoping that something like this would work:</p>
<pre><code><script type="text/javascript">
$('[ID*="showSubCats"]').click(function () {
debugger;
$(".RepeaterImage").not(this).stop().animate({ opacity: 0.4 }, 300);
$(this).stop().animate({ opacity: 1.0 }, 300);
});
</script>
</code></pre>
<p>Nothing happens when any of the showsubcats link buttons are clicked. I'm guessing i might be on the wrong track!</p>
<p>Any assistance would be great.</p>
|
jquery asp.net
|
[5, 9]
|
2,190,838 | 2,190,839 |
converting selected value from dropdownlist into int
|
<p>I have a drop down list and I want the selected value to put into an int variable, then in my aspx page I want to assign it to a rowspan. This is my C# code for getting the value and converting it:</p>
<pre><code>protected void drop_SelectedIndexChanged(object sender, EventArgs e)
{
int a = Int32.Parse(drop.SelectedValue.ToString());
</code></pre>
<p>And this is my aspx code where I'm trying to assign the variable a :</p>
<pre><code> <asp:TableHeaderRow>
<asp:TableHeaderCell RowSpan="<% a %>">Hostese</asp:TableHeaderCell>
</asp:TableHeaderRow>
</code></pre>
<p>I get the error: cannot create an object of type int32 from its string representation. Can anyone say why? It's an asp.net application with C#.</p>
|
c# asp.net
|
[0, 9]
|
3,345,517 | 3,345,518 |
Javascript/php: xmlHttpRequest or (excluding header change ideally)
|
<p>I have a php script which processes xml returned from an api call. What I hope to achieve is to be able set the javascript as a bookmark, or better yet to load every time a document.location value changes. (currently set as bookmark).</p>
<p>The problem I'm having is gettin' passed the xmlHttpRequest's same server policy. As the php script requires that it is hosted on an external domain I can't access the php script to generate the results.</p>
<p>I've seen several scripts on the internet that apparently do it but they either carry out no function or still require accessing an external php script as a proxy.</p>
<p>Any thoughts?</p>
<p>Thanks.</p>
|
php javascript
|
[2, 3]
|
1,396,095 | 1,396,096 |
DllImport method isn't receiving data
|
<pre><code>BYTE* pImageBuffer = NULL;
eResult res = PlayerLib::CreateImageSnapshot( iPlayerRef, eBMP, &pImageBuffer );
if( res > 0 )
{
.... // do something with the image
WriteFile(FileHandle, pBuffer, eRes, NULL, NULL);
ReleaseImageSnapshot( pImageBuffer ); // free the image buffer in not longer needed!
}
</code></pre>
<p>here i can receive the image data in pImageBuffer and i could do the some image process</p>
<p>the same way I have tryed in c# like</p>
<pre><code> [DllImport("PlayerLib")]
public static extern int CreateImageSnapshot(int iPlayerRef, eImageFormat imgFormat,byte[] ppImageBuffer);
byte[] bte ;
CreateImageSnapshot(iPlayerref,eImageFormat.ePNG,bte);
</code></pre>
<p>here its giving some unhandeld Exception..... hopefully the problem is in byte[] but i can't point out...
please help me to overcome it.... thanks in advance</p>
<p>here it shoud return the imagedata in ppImageBuffer... but here it's giving zero byte only</p>
|
c# c++
|
[0, 6]
|
3,478,979 | 3,478,980 |
files saved in External Cache do not delete on uninstall
|
<p><a href="http://developer.android.com/guide/topics/data/data-storage.html#ExternalCache" rel="nofollow">Here</a> is said that files saved on <code>getExternalCacheDir()</code> will be deleted on uninstall.</p>
<p>I have placed my downloaded files there.
Everything works fine with 3 devices.
But with one Samsung Galaxy S2 with Android 4.0 these files do not delete.
What can be the reason of this?</p>
|
java android
|
[1, 4]
|
1,911,460 | 1,911,461 |
I get EOFException while trying to get response from the server
|
<p>I use a PrintWriter out object. I write data out.println(some data) and close it with a out.close</p>
<pre><code>URL url = new URL(myurl);
URLConnection connection = null;
PrintWriter out = null; BufferedReader br = null; connection = url.openConnection(); connection.setDoOutput(true);
out = new PrintWriter(new OutputStreamWriter(connection.getOutputStream()),true);
while(iterations) {
//print data on writer
out.println(object);
}
//closig print writer
out.flush();
out.close();
//Response from server
br = new BufferedReader(new InputStreamReader(connection.getInputStream())); // Get Exception in //this line EOF Exception
String temp;
while(temp = br.readLine() !=null) {
//do something
}
br.close();
</code></pre>
|
java android
|
[1, 4]
|
5,504,618 | 5,504,619 |
Game Server Language Selection
|
<p>I am planning to make a online-multiplayer game with my friends.
The game is a browser card game (so, players act in turns) and players could host rooms in a lobby.
Flex + actionscript will be used to write for the client side.
We are discussing what should be used for the server side.</p>
<p>I suggested C#/Java and my friend suggested PHP.</p>
<p>I kw there are couple of questions asking for what language to use but I think it should depend on specific conditions.</p>
<p>Is there any suggestion for us? Thanks.</p>
<p>Additional infomation: most logic will be implemented by the server since we want to reduce the chance of cheating.</p>
|
c# java php
|
[0, 1, 2]
|
3,204,785 | 3,204,786 |
Why does onLongPress() not return a boolean like all other SimpleOnGestureListener?
|
<p>As the title states. The fact that I can't consume the event is causing a <code>click</code> event to occur immediately afterwards. Now I am manually keeping track of whether or not a longpress has occurred when handling a potential click.</p>
<p>Am I missing something here? I mean, I can't even get around this trying to implement the OnGestureListener interface because it expects a void for <code>onLongPress()</code>. What are my options?</p>
|
java android
|
[1, 4]
|
209,545 | 209,546 |
Using .hasClass() in if condition is not works
|
<p>I am having a div when user hover on it will insert a div <code>child</code> div.
But the problem is on every hover it added the same div repeatably. so i tried the below script for check if <code>child</code> div availabe in <code>MotherDiv</code> do nothing. else add the <code>Child</code> div. These all are happen on hover. So, What is the wrong with the below code?</p>
<p>Am i missing something? </p>
<pre><code>if ($('.MotherDiv').hasClass('Child'))
{
alert('alerady a div there!');//DO NOTHING
}
else
{
var Details= "<div class='MotherDiv'><table class='Special'><tr><td>Offers</td></tr><tr><td>CheckOut Now</td></tr></table></div>";
$(Child).insertAfter($(this));//This is insert the child div on hover
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,535,308 | 4,535,309 |
Find the URL of an application
|
<p>I am Working on an asp.net c# application.</p>
<p>I wish to find the url of the application. For example, my application is NRCME I want to return <a href="http://localhost:4833/NRCME/" rel="nofollow">http://localhost:4833/NRCME/</a> when running locally. From the server I want to return </p>
<p><a href="http://servername/NRCME/" rel="nofollow">http://servername/NRCME/</a></p>
|
c# asp.net
|
[0, 9]
|
468,850 | 468,851 |
Is there an equivalent for var_dump (PHP) in Javascript?
|
<p>We need to see what methods/fields an object has in Javascript.</p>
|
php javascript
|
[2, 3]
|
3,905,928 | 3,905,929 |
Is there a way to call [ScriptableMember] in Asp.Net via jQuery
|
<p>I know there's a way to call [WebMethod] via jQuery <code>($.ajax(...))</code>
I was wondering if it's possible to call [ScriptableMember] via jQuery.</p>
|
asp.net javascript jquery
|
[9, 3, 5]
|
3,297,691 | 3,297,692 |
I want both values before and after submitting a form
|
<p>I have a simple form and inside there are two input fields text type.
for example if input has initially value like "Hello" and later on I have changed it to "Hi" and then I submit this form. </p>
<p>I want to see this both values, anyone suggest me please </p>
<p>markup</p>
<pre><code> <form action="index_submit" method="get" name="anil" >
<label for="first_name">first name</label><input type="text" name="first_name" value="" id="first_name">
<label for="last_name">last name</label><input type="text" name="last_name" value="" id="last_name">
<label for="user_name">user name</label><input type="text" name="user_name" value="" id="user_name">
<input type="submit" name="submit" value="submit" id="submit">
<input type="reset" name="reset" value="reset" id="reset">
</form>
</code></pre>
<p>js </p>
<pre><code>$(document).ready(function(){
$('form #submit').click(function(){
var oldValue
var newValue
});
})
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,610,189 | 1,610,190 |
Server side script in C# return different time from what server clock is displaying
|
<p>I am facing typical issue.My dedicated server clock showing 11 Am and datetime function in asp.net script returns 4pm time.</p>
<p>Please help how to resolve the issue.I need the function to return the server clock time.I dont know if its common issue i am facing it for first time.</p>
<p>Automatically syncronize with an internet time server :: CHECKED TICK
ntp2.ja.net</p>
<p>GMT-05 eastern time (US & Canada)</p>
<p>PIECE OF CODE::</p>
<pre><code> if (DateTime.Now.Hour >= 12 && Convert.ToDateTime(txtShipDate.Text.Trim()) < DateTime.Today.AddDays(2))
{
flag = false;
}
if (DateTime.Now.Hour < 12 && Convert.ToDateTime(txtShipDate.Text.Trim()) < DateTime.Today.AddDays(1))
{
flag = false;
}
</code></pre>
<p>regards</p>
|
c# asp.net
|
[0, 9]
|
5,440,494 | 5,440,495 |
PHP controlling a finger print device
|
<p>I have to control access to a system based on fingerprint recognition in <code>PHP</code>.
But I do not know what would be the best approach to do this...</p>
<p>I was searching for a device and software, and maybe this will the one I'll use:</p>
<p><a href="http://www.digitalpersona.com/Biometrics/Hardware-Products/U-are-U-4500-Reader/4500-Reader/" rel="nofollow">U.are.U 4500 Fingerprint Reader digital persona</a></p>
<p>This software use somekind of SDK, so java must be used, Is there a way to make a bridge between <code>php</code> and <code>java?</code>.</p>
<p>I am not expert in java web services, but if this is the only way, How to control fingerprint?</p>
<p>Does the device returns an <code>image</code>, or a <code>md5 string</code>, or How does it work, how to read this in php?</p>
<p>What is your experience in this kind of thing...</p>
|
java php
|
[1, 2]
|
2,451,075 | 2,451,076 |
GridView Lostfocus in edit mode
|
<p>Can anybody let me know how to display a Pop up to confirm if he wants to save the changes ,when a record is in Edit mode in Gridview
and user Clicks or tabs away from the row.</p>
<p>Thanks in advance
Divya.</p>
|
asp.net javascript
|
[9, 3]
|
2,375,175 | 2,375,176 |
onClick does not work when user clicks "back"
|
<p>I have form elements that determine the action of the form like below. This works great EXCEPT when they click the back button in their browser and it forgets the action. What is the best way to fix this?</p>
<pre><code><label>
<input type="radio" name="proptype" id="RESI" value="RESI" checked="checked" onClick="this.form.action='?frame=TEST&base=fc';" />
Residential</label>
<label>
<input type="radio" name="proptype" id="LOTL" value="LOTL" onClick="this.form.action='?frame=TEST1&base=fc';" />
Land and Lots</label>
</code></pre>
|
php javascript
|
[2, 3]
|
406,668 | 406,669 |
Load JavaScript dynamically
|
<p>I have a web page and a canvas with Google Maps embedded in it. I am using jQuery on this site.</p>
<p>I want to load Google Maps API only if the user clicks on "Show me the map". Further, I want to take away the whole loading of the Google Maps from the header in order to improve my page performance.</p>
<p>So I need to load JavaScript dynamically. What JavaScript function I can use? </p>
|
javascript jquery
|
[3, 5]
|
4,231,715 | 4,231,716 |
Buzzbox SDK For Android
|
<p>Can anyone tell me what kinds of information that Buzzbox collects off of devices? I am very interested in the SDK as it looks really convienient but I am very concerned about how much data will be skimmed by Buzzbox. Any input would be greatly appreciated.</p>
|
java android
|
[1, 4]
|
4,870,205 | 4,870,206 |
How to unfocus the cuser from the input box in a confirmation box using Jquery?
|
<p>I am having a confirmation box with a input field requesting a date. When the confirmation box appears, the input box is in focus. How do I unfocus it? I need to drop down a calendar when I click on the input field. Here is my relevant code: </p>
<pre><code>$(".confirmLink").click(function(e) {
e.preventDefault();
var targetUrl = $(this).attr("href");
document.getElementById('dialog').focus();
$("#dialog").dialog({
buttons : {
"OK" : function() {
window.location.href = targetUrl+"/"+"deletedDate"+"/"+document.getElementById('deletedDate').value;
},
"Cancel" : function() {
$(this).dialog("close");
}
}
});
$("#dialog").dialog("open");
});
function datepicker(){
$( "#deletedDate" ).datepicker(
{
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
showAnim: "slideDown"
});
}
</code></pre>
<h1></h1>
|
javascript jquery
|
[3, 5]
|
1,885,056 | 1,885,057 |
Add/remove a list of items for a single object
|
<p>For my site, I have a list of users and a list of events. I will be assigning users to each event. I have a table named EventUsers to hold this data:</p>
<pre><code>------------------------
EventUsers
------------------------
EventID | UserID
------------------------
1 | 123
1 | 456
2 | 789
</code></pre>
<p>On my page, I want to be able to add and remove users for a certain event.</p>
<p>I could have a dropdown populated with users and an "Add" button next to it, then when I want to add a user, I pick one and click "Add". There would be a grid below it displaying all the users for the event, with "Delete" buttons for each one. The downside to this is that a database call is made for every Add and Delete.</p>
<p>Another option is to have two listboxes on the page - one on the left containing all users in the database, and another on the right which will contain users for the given event, and I can just add or remove from the list on the right. Then when I'm done, I click save, and it makes one database call. The only issue is that if I'm removing and adding, I'll have to delete every record in my EventUsers table for that event, and then add the changes.</p>
<p>I've run into this before, and I've always gone with the dropdown method. What's the preferred method here?</p>
|
c# asp.net
|
[0, 9]
|
3,229,765 | 3,229,766 |
HeadFirst Android Development code - nowhere to be found
|
<p>I would like to ask you all, guys, to give me a link or something similar to source code from Android Development HeadFirst series book.
Can you please appoint me to right address? I would really love to have it so I can continue coding.
I can't find it over the Web, is anyone who owns is locally willing to upload it so that I can get it?
Thank you </p>
|
java android
|
[1, 4]
|
19,957 | 19,958 |
How to prevent HREF (which calls JS function) from being triggered when "Enter" key is pressed?
|
<p>I am facing a problem.</p>
<p>I have a href which calls a javascript function "delete_element_on_page" when i click on it.</p>
<p>So when i click the HREF with my mouse, everything is fine and the function gets called.</p>
<p>However, because the HREF has focus, if keep hitting my enter key, the function gets called again and again and again leading to undesired outcomes.</p>
<p>How can i prevent this from happening?</p>
<p>I was thinking of
1. Blurring the focus on the href when my function is called
--> I could do this, but this will mean I have to manually do this for every single HREF because jquery.blur can only be triggered at an individual element level.
--> Alternatively, is there a javascript equivalent of where I can do a universal Blurring, regardless of which element is in focus? </p>
<p>OR</p>
<ol>
<li>Deactivate enter key from triggering clicking of a HREF
--> Is this even possible? And if so, worth my while in terms of code complexity / compatibility etc..</li>
</ol>
<p>Thanks so much :)</p>
|
javascript jquery
|
[3, 5]
|
3,854,618 | 3,854,619 |
Write to PDF using PHP from android device
|
<p>I am trying to write to a pdf file on php server. I have sent variables to the server, create the pdf document, then have my phone download the document to view on device. The variables seem not to write on the php file. I have my code below</p>
<pre><code> public void postData() {
try {
Calculate calc = new Calculate();
HttpClient mClient = new DefaultHttpClient();
StringBuilder sb=new StringBuilder("myurl.com/pdf.php");
HttpPost mpost = new HttpPost(sb.toString());
String value = "1234";
List nameValuepairs = new ArrayList(1);
nameValuepairs.add(new BasicNameValuePair("id",value));
mpost.setEntity(new UrlEncodedFormEntity(nameValuepairs));
} catch (UnsupportedEncodingException e) {
Log.w(" error ", e.toString());
} catch (Exception e) {
Log.w(" error ", e.toString());
}
}
</code></pre>
<p>And my php code to write the variable "value" onto the pdf document:</p>
<pre><code>//code to reverse the string
if($_POST[] != null) {
$reversed = strrev($_POST["value"]);
$this->SetFont('Arial','u',50);
$this->Text(52,68,$reversed);
}
</code></pre>
<p>I am just trying to write the variable in a random spot, but the if statement is always null and I do not know why. Thanks. Sorry if it is a little sloppy.</p>
|
php android
|
[2, 4]
|
5,200,060 | 5,200,061 |
Stack Overflow works best with JavaScript enabled banner
|
<p>I am trying to mimic this site's Javascipt required banner, and have the below divs which are being hidden if javascript is allowed/enabled, but I am getting a flash/glimps of it on page load.</p>
<pre><code><div id="Main_noJS">Craftystuff.com works best with JavaScript enabled</div>
<div id="PartOfMain_noJS"><br /></div>
</code></pre>
<p>CSS:</p>
<pre><code>#Main_noJS {
width: 100%;
height: 23px;
font-family: Arial;
font-size: 111%;
color: White;
font-weight: bold;
background: #AE0000;
text-align: center;
padding-top: 4px;
position: fixed;
z-index: 100;
}
</code></pre>
<p>JavaScript:</p>
<pre><code>// hide the "Craftystuff.com works best with JavaScript enabled" banner, if JavaScript is working
if ($("#Main_noJS")) {
$("#Main_noJS").hide();
// hide the spacer between the main content and banner...
$("#PartOfMain_noJS").hide();
}
</code></pre>
<p>So the banner is visible to start with, and only when javascript is enabled do I hide it</p>
<ul>
<li>but javascript must take a second to get to work to hide things...</li>
</ul>
<p>I would like to try to stop the glimps of the banner, when the page first loads, any help?</p>
|
asp.net javascript
|
[9, 3]
|
610,605 | 610,606 |
Using variables in object property names
|
<p>I have a variable called direction that stores either: <code>left</code>, <code>right</code>.</p>
<p>I need to change the affected margin based on that variable.</p>
<p>Right now I'm using conditions, is it possible to replace "left" with the output of the variable <code>direction</code>?</p>
<pre><code>$("#map").animate({"margin-left": "+=50px"}, 500);
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,096,914 | 5,096,915 |
Error with radiobuttons on ASP.NET
|
<p>Why does the below code show me an error? Please correct this:</p>
<pre><code> protected void Button1_Click(object sender, EventArgs e)
{
if (RadioButtonList1.SelectedIndex='0')
{
Response.Redirect("page1.aspx");
}
else if (RadioButtonList1.SelectedIndex='1')
{
Response.Redirect("page2.aspx");
}
else if (RadioButtonList1.SelectedIndex='2')
{
Response.Redirect("page3.aspx");
}
}
</code></pre>
<p>My design code is:</p>
<pre><code><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem>item1</asp:ListItem>
<asp:ListItem>item2</asp:ListItem>
<asp:ListItem>item3</asp:ListItem>
</asp:RadioButtonList></div>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
</form>
</body>
</html>
</code></pre>
|
c# asp.net
|
[0, 9]
|
5,833,168 | 5,833,169 |
Something is wrong with my javascript script with arrays
|
<p>so basically my javascript array script looks like -</p>
<pre><code>cars = $('#bike').val();
var priceone = document.documentElement.getAttribute('priceone');
var pricetwo = document.documentElement.getAttribute('pricetwo');
var pricethree = document.documentElement.getAttribute('pricethree');
var pricefour = document.documentElement.getAttribute('pricefour');
var pricefive = document.documentElement.getAttribute('pricefive');
var pricesix = document.documentElement.getAttribute('pricesix');
var priceseven = document.documentElement.getAttribute('priceseven');
var priceeight = document.documentElement.getAttribute('priceeight');
var pricenine = document.documentElement.getAttribute('pricenine');
var priceMatrix = {
cars: {
1: {
t1: priceone,
t2: pricetwo,
t3: pricethree
},
2: {
t1: pricefour,
t2: pricefive,
t3: pricesix
},
3: {
t1: priceseven,
t2: priceeight,
t3: pricenine
}
}
};
</code></pre>
<p>Maybe anyone have an idea, why the priceMatrix array, doesn't work? How should I insert all the variables into array, so it would work? The cars: is variable cars defined at top of the script and the priceone, pricetwo... pricenine are variables that are defined at top too. Hope you can help. If possible please write, how should I define var cars in javascript mode, so it takes the select fields value too. Here is the script, so you can cehck it - <a href="http://jsfiddle.net/tSsvb/2/" rel="nofollow">http://jsfiddle.net/tSsvb/2/</a> .</p>
|
javascript jquery
|
[3, 5]
|
2,273,587 | 2,273,588 |
How to find the last time execution of the loop while(dr.Read())?
|
<p>take a look at the below while loop.</p>
<pre><code>SqlDataReader dr;
while (dr.Read())
{
Response.Write("insert into test values(N'"+dr[0]+"', N'"+dr[1]+"'),<br>");
}
</code></pre>
<p>I am just printing something with a comma at the end (before that <br>). But For the last time when it gets printed, i dont want that comma.
How to find out that this loop is executing for the last time? so that i can avoid this comma getting printed by modifying it.</p>
|
c# asp.net
|
[0, 9]
|
857,705 | 857,706 |
Event after Create User - ASP.NET Membership
|
<p>I am going to use Create User Wizard in order to let a user create their account for this company web site. I'd like to add one more step after new account is created, but I can't find the way to do it. What I want to do is that verify the use as a current employee of this company. This is not open web site for everyone, so only current employee can create a user account in this site.
This is the step that I need to implement.</p>
<ol>
<li>Ask employee ID and Name to verify whether he or she is current employee or not.</li>
<li>If yes, the Create User Wizard step will start. I will show the Employee ID on top of this wizard.</li>
<li>When a user account is created successfully, I need to insert UserID from aspnet_Users table and Employee ID into additional table as a reference.</li>
</ol>
<p>I can't figure where I can do step 3 for coding.</p>
<p>I am guessing that I need to do it on "Create User" button event, But I also need to know whether a user account is successfully created or not.</p>
<p>Please, let me know.</p>
|
c# asp.net
|
[0, 9]
|
4,868,360 | 4,868,361 |
C# client and Java server
|
<p>I have developed a retail EPOS solution in C# which runs on tills. I would like this to interface with a back-end Java server. The Java server will be used for running all back-office tasks such as reports.</p>
<p>What is the best method to get a C# client and a Java server talking to each other? Of course, if this were a sole Java setup, then RMI would be used.</p>
<p>I have a gut feeling that a web service is best here, but I am lost to what type of web service I'd be looking for.</p>
<p>I had a crazy "bad" idea that I could put a php script on the server which the C# client could call using HTTP and Curl (or C#'s equivalent) and send arguments via GET or POST. However this would be put a total disconnection between the java "back-end" server and C# client.</p>
<p>Any ideas would be appreciated</p>
<p>Cheers</p>
|
c# java
|
[0, 1]
|
5,933,855 | 5,933,856 |
How can I hide this div while the animation is in progress?
|
<pre><code> $('body').animate({scrollTop: $('#content-display').offset().top}, function () {
$("#loading").hide();
}, 'slow');
</code></pre>
<p>JSHint likes it but I get an <code>Uncaught TypeError: Object #<Object> has no method 'slow'</code> in console.</p>
|
javascript jquery
|
[3, 5]
|
141,590 | 141,591 |
Passing functions in parameter, to be run on load
|
<p>This is the global function that runs on load:</p>
<pre><code>$.fn.loadfns = function(specificfns) {
$('#wrapper').hide();
$('#load').fadeIn(400);
$(window).load( function() {
$('#load').fadeOut(400, function() {
$('#wrapper').fadeIn(600, function() {
specificfns;
})
})
});
};
</code></pre>
<p>Problem is, some pages require additional functions to be run after load (like inserting events into glDatePicker), so I'm trying to pass them as parameters for loadfns, like</p>
<pre><code>$.fn.loadfns("alert('I won't be run');");
</code></pre>
<p>But nothing happens, it's not executed. If I do</p>
<pre><code>... rest of function ...
$('#wrapper').fadeIn(600, function() {
alert(specificfns);
})
</code></pre>
<p>It alerts "alert('I won't be run');" (without brackets) which should work as a function.</p>
|
javascript jquery
|
[3, 5]
|
4,736,607 | 4,736,608 |
Understanding javascript variables
|
<p>I am trying to better understand how variables are stored with JavaScript and jQuery.</p>
<p>Using the below code, a separate variable called default_value is created for each .default-value element. Is this correct? Can it only be accessed from within the anonymous function that created it? I've heard the term "namespace", and does it apply? Please provide any additional details so I can better understand what is going on.</p>
<p>Next, if I wanted to apply this to an element with a given ID instead of a group of a given class, then using each() appears unnecessary. How should it be modified?</p>
<pre><code>$('.default-value').each(function() {
var default_value = this.value;
$(this).focus(function() {
if(this.value == default_value) {
this.value = '';
}
});
$(this).blur(function() {
if($.trim(this.value) == '') {
this.value = default_value;
}
});
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,268,778 | 5,268,779 |
When user enters correct text, an image rollovers/changes
|
<p>I am designing a language learning site. I want to have it when someone enters text into the text box it starts to roll over certain images. Take a look at my sample below</p>
<p><a href="http://imageshack.us/photo/my-images/827/hiraganaquiz2.jpg/" rel="nofollow">http://imageshack.us/photo/my-images/827/hiraganaquiz2.jpg/</a></p>
<p>So, when the user enters "na" the first symbol highlights as you see in my sample. When he enters "ma" the second symbol should highlight/rollover. I want all the symbols to stay rolled over while the correct text is entered. so if the user types "nama" the first two symbols should be rolled over to show they got it correct and once the last correct text is entered all three will be rolled over. </p>
<p>Can this by done? I will accept advanced and simple methods.</p>
|
javascript jquery
|
[3, 5]
|
4,002,842 | 4,002,843 |
Access Master Page/Child Page Controls from My Class
|
<p>I have a div on my master page and I want to use it for showing page errors. I have an error display class and it works fine. My problem is that in some instances, the error gets displayed even before the tag resulting in (non)-display of the message. This is mostly with code that has response.redirect.</p>
<p>I want to counter this by having the error shown on a div within my master page (hoep it helps).</p>
<p>How can I access <code><div id="errorSegment" runat="server"></code>?</p>
|
c# asp.net
|
[0, 9]
|
4,927,081 | 4,927,082 |
Check all radio controls with a specific substring on an ASP.NET form
|
<p>I'm working on a .NET-powered questionnaire which contains several repeater controls, each row of which contains three radiobuttons. I'm trying to write a simple Javascript function to check all the controls on the page which contain the word "chkGreen" in the control name/id.</p>
<p>The page looks something like this:</p>
<pre><code>Repeater 1
Description 1 ( ) Green ( ) Yellow ( ) Red
Description 2 ( ) Green ( ) Yellow ( ) Red
Description 3 ( ) Green ( ) Yellow ( ) Red
Repeater 2
Description 1 ( ) Green ( ) Yellow ( ) Red
Description 2 ( ) Green ( ) Yellow ( ) Red
Description 3 ( ) Green ( ) Yellow ( ) Red
</code></pre>
<p>Here's the function so far:</p>
<pre><code> for (i = 0; i < document.Form1.elements.length; i++) {
var _control = document.Form1.elements[i].id
if (_control.indexOf("chkGreen") > 0) {
eval(_control.checked = true);
}
}
</code></pre>
<p>This function does not work. When I add a document.write or alert() to the statement, it properly fires, so the logic is apparently working, it's just the actual radiobutton check code is not working.</p>
<p>Any thoughts?</p>
|
asp.net javascript
|
[9, 3]
|
356,671 | 356,672 |
Can we inject our code to another sub process?
|
<p>Is it possible to inject the code into another sub process? Let's say we have Silverlight plugin in the browser.. We want to inject our code (something like Snoop) into that plugin's process. When I'm using Spy++, I can receive the event from the plugin.. SO, I'm assuming that it is possible to inject the code as well.. </p>
<p>Thanks in advance. </p>
<p>Edit: I'm currently looking at the code of Snoop and this article <a href="http://www.codeproject.com/KB/threads/winspy.aspx" rel="nofollow">http://www.codeproject.com/KB/threads/winspy.aspx</a>.. I understand that we can inject our code into other process.. My question is how to hook to other "sub" process.. </p>
<p>Please take a look at this screenshot.. I'm trying to hook into "Microsoft SIlverlight" (Red arrow) but it doesn't work.. It would be great if you guys can share me some code example for hooking sub-process.. Thanks.. </p>
<p><img src="http://i.stack.imgur.com/XFHdG.png" alt="SL process on Spy++"></p>
|
c# c++
|
[0, 6]
|
308,028 | 308,029 |
what is this window.top check performing? is this checking for an iframe?
|
<pre><code>if(window.top!==window.self){document.write="";
window.top.location=window.self.location;
setTimeout(function(){document.body.innerHTML=""},1);
window.self.onload=function(){document.body.innerHTML=""}};
</code></pre>
<p>Is this making sure the page isn't rendering inside of a iframe?</p>
|
javascript jquery
|
[3, 5]
|
1,861,628 | 1,861,629 |
how to wait for sendBroadcast to finish
|
<p>I am doing a media file scan using sendBroadcast. Then I need to wait till it's complete after doing sendBroadcast. How do I do this in Android ?</p>
<p>I know I can use a simple while logic here but I am looking for a better approach</p>
<pre><code>context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory())));
// wait here till till do something completed
</code></pre>
<p>Receiver</p>
<pre><code>private BroadcastReceiver mediaScanner = new BroadcastReceiver(){
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (action.equals(Intent.ACTION_MEDIA_SCANNER_FINISHED)) {
// Do some thing here.
}
}
}
</code></pre>
|
java android
|
[1, 4]
|
400,568 | 400,569 |
Insert form input value into href target URL with javascript
|
<p>I'm getting user input from a form and displaying this information in a span based on it's ID. How can I send this info to a tag as well? I want this to display their email and make an mailto: link with the same input.</p>
<pre><code> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#email").keyup(update);
});
function update(){
var email = $("#email").val();
$('#DisplayEmail').html(email);
}
</script>
<form>
<input id="email" name="email" size="40" />
</form>
<a href="mailto:"><span id="DisplayEmail"></span></a>
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,237,327 | 2,237,328 |
Loop through string of dropdown options and select
|
<p>I want to select an option in a string, where the string will be the contents of a dropdown, but I dont know how to loop through the string as an object please.
In the example I would like "Saab" to be selected and the string alerted.</p>
<pre><code>var x = '<select><option>Volvo</option> <option>Saab</option> <option>Mercedes</option> <option>Audi</option> </select>';
$.each($(x), function(index, value) {
if ($(this).val() == "Saab"){
$(this).attr("selected","selected")
}
});
alert(x);
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,422,232 | 2,422,233 |
How can I refresh a specific image after an update?
|
<p>I have several div tags with unique ids and after a click event for a specific image I'm trying to refresh it. How can I do this? This is what I have for code so far:</p>
<p>HTML:</p>
<pre><code><div class="photo_gallery_container" <?php echo($div_id); ?>>
<table class="table table-bordered table-condensed">
<thead >
<tr style="background-color: #f5f5f5;">
<th colspan="2" style="text-align: right;"><span style="cursor:pointer" id="delimg_<?php echo($id); ?>" class="delimg"><span class="label label-important">Delete</span></span></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="<?php echo($url['url'])?>" style="height:120px;"/>
</td>
<td>
<a href="#" id="rotateimg_<?php echo($id); ?>" class="rotateimg">Rotate</a>
</td>
</tr>
</tbody>
</table>
</div>
</code></pre>
<p>My click event for rotate looks like this:</p>
<pre><code>$('.rotateimg').click(function(e) {
e.preventDefault();
var id = $(this).attr('id').substr(10);
$.post("/functions/photo_functions.php", { f: 'rotate', imgid: id }, function(status){
if (status == 'true') {
// How can I reload the specific image after being rotated
}
});
});
</code></pre>
|
php jquery
|
[2, 5]
|
3,436,041 | 3,436,042 |
How can I call a function every 3 seconds for 15 seconds?
|
<p>How do I call a jQuery function every 3 seconds?</p>
<pre><code>$(document).ready(function ()
{
//do stuff...
$('post').each(function()
{
//do stuff...
})
//do stuff...
})
</code></pre>
<p>I'm trying to run that code for a period of 15 seconds.</p>
|
javascript jquery
|
[3, 5]
|
788,051 | 788,052 |
Javascript throws an "is undefined" error
|
<p>I've been working with Javascript and recently I've been stucked with an error which I can't solve.</p>
<p>The Firefox console throws an "info[last] is undefined" error, and I've got no idea what is causing that. Here is the code, the line which provokes the trouble is number 7:</p>
<pre><code>$("textarea").each(function() {
var id = $(this).parents("div.article").attr('id').split('_')[1],
kind = $(this).attr("class"),
text = $(this).val(),
last = info.length-1;
if(last !== 0) {
if(info[last].id == id) {
info[last].info.push([kind, text]);
}
} else {
object = {
id: id,
info: [[kind, text]]
};
}
info.push(object);
});
</code></pre>
<p>Hope you guys can help me figure it out.</p>
|
javascript jquery
|
[3, 5]
|
3,126,917 | 3,126,918 |
Copy certain values from one element to another
|
<p>I'm trying to copy the width and height attributes from one elemenent to another with javascript/jquery but can't implement it.</p>
<p>I have somethink like that:</p>
<pre><code><div id="two">
<img src="picture.jpg" id="one" width="600px" height="300px" />
</div>
</code></pre>
<p>and I want to get this:</p>
<pre><code><div id="two" width="600px" height="300px" >
<img src="picture.jpg" id="one" width="600px" height="300px" />
</div>
</code></pre>
<p>Every help would be greatly appreciated. </p>
<p>Thank's.</p>
<p>p.s.sorry for my bad English</p>
|
javascript jquery
|
[3, 5]
|
453,550 | 453,551 |
Cannot call external javascript function from SITE.MASTER
|
<p>I have a Site.Master in my ASP.NET project which defines a HEAD section as follows</p>
<pre><code><head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title id="MasterTitle">MyApp</title>
<link rel="icon" href="Content/icon.ico" type="image/x-icon" />
<link href="Content/mycss.css" rel="stylesheet" type="text/css" />
<script src="Content/mycode.js" type="text/javascript"></script>
</head>
</code></pre>
<p>In the mycode.js file, I have a function called GetSels();</p>
<pre><code>function GetSels()
{
//do stuff
}
</code></pre>
<p>If the GetSels function is defined in Site.Master, GetSels is callable. If it's in mycode.js, it's not.</p>
<p>Every code example I've seen seems to say this should work.</p>
<p>What am I doing wrong?</p>
|
asp.net javascript
|
[9, 3]
|
5,949,176 | 5,949,177 |
How to change href attribute of a link using Jquery
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/179713/how-to-change-the-href-for-a-hyperlink-using-jquery">How to change the href for a hyperlink using jQuery</a> </p>
</blockquote>
<p>I have this link:</p>
<pre><code><a id="myLink_33" href="javascript:toggleMe(1);">Toggle</a>
</code></pre>
<p>How can I change the <code>href</code> attribute of this link using Javascript/jquery so the link becomes this:</p>
<pre><code><a id="myLink_33" href="javascript:toggleMe(0);">Toggle</a>
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,504,443 | 5,504,444 |
Android: two spinners beside
|
<p>I have price values which I want to show in 2 different spinners beside: "from" and "to", I want to have two spinners showing beside eachother, One of them will contain "from values"
and the other one "to values"</p>
<p>How is this possible in android?</p>
|
java android
|
[1, 4]
|
6,420 | 6,421 |
php script to echo a post
|
<p>Could someone help with a simple PHP script to echo the whole message received with an HTTPPOST.</p>
<p>I am sending a string from an android app using HTTPPOST and would like to receive as a response the message received by the POST at the server.</p>
<p>The script that I am using will only echo name value pairs </p>
<pre><code>echo $_POST('data')
</code></pre>
<p>works when I post form data, but have not figured out how to echo a string. </p>
<p>Thanks</p>
|
php android
|
[2, 4]
|
1,282,018 | 1,282,019 |
Send PDF File from php server to android
|
<p>I have created a pdf document on a PHP server and I would like to send the file to an android device, and then have the android view the file. Can anyone help me with the code in PHP and android? Thanks so much.</p>
|
php android
|
[2, 4]
|
4,938,573 | 4,938,574 |
Javascript Disabled
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/121203/how-to-detect-if-javascript-is-disabled">How to detect if JavaScript is disabled?</a> </p>
</blockquote>
<p>I Have Disabled My Browser JavaScript . is There Any To Detect Wheather Javascript Enable Or Disable in Asp.Net Server Side.</p>
|
javascript asp.net
|
[3, 9]
|
5,108,812 | 5,108,813 |
Server Design and Implementation
|
<p>I've work in embedded systems and systems programming for hardware interfaces
to date. For fun and personal knowledge, recently I've been trying to learn more about server programming after getting my hands wet with Erlang. I've been going back and thinking about servers from a C++/Java prospective, and now I wonder how scalable systems can be built with technology like C++ or Java.</p>
<p>I've read that due to context-switching and limited memory, a per-client thread handler isn't realistic. Usually a thread-pool is created and a mix of worker-threads and asynchronous I/O is used to handle requests. I wonder, first of all, how does one determine the thread pool size? Does one simply have to measure and find the optimal balance? Eventually as the system scales then perhaps more than one server is needed to handle requests. How are requests managed across mulitple servers handling a large client base?</p>
<p>I am just looking for some direction into where I might be able to read more and find answers to my questions. What area of computer science would I look into for more information in this area? Are there any design patterns for this area of computing?</p>
|
java c++
|
[1, 6]
|
3,037,365 | 3,037,366 |
How to use cookie into specific show/hide javascript header. Live example included
|
<p>With the help of <a href="http://stackoverflow.com/users/1251715/th0rndike">Th0rndike</a> & <a href="http://stackoverflow.com/users/553098/pranav">Pranav</a>, I have make a show/hide header on my site. What I want to do next, is to set a cookie on user's side, so next time this user browses my site, header remains in it's last condition. Live example, on comment below.</p>
<p>I have no idea about cookies, except the very basic stuff, so please, if you have the kindness, be a little bit explanatory to me!!! :)</p>
<p>Thank you in advance!!!</p>
|
php javascript
|
[2, 3]
|
2,352,221 | 2,352,222 |
How to implement a slide-out/drawer effect in JQuery?
|
<p>I'm looking for a JQuery plug-in for a drawer-like effect. <a href="http://wpaoli.building58.com/2009/09/jquery-tab-slide-out-plugin/" rel="nofollow">I found that plug-in</a> which is quite similar to what I want but it slides from one side of the screen (top, bottom, left or right). In my case, I have an image as wide as the content div, and I want it to slide down when clicked to reveal the content, but not from the top of the screen, the image won't be located at the top of the screen. In other words, the effect I want is exactly like what that plug-in does but the only difference is that I don't want it to slide from the top side of the screen, it should slide from wherever the image is on the page.</p>
<p>Any suggestions would be really appreciated...</p>
|
javascript jquery
|
[3, 5]
|
5,059,600 | 5,059,601 |
Find the ID of the window which generates alerts
|
<p>Is there a way to find out the id of the IE window that generates alert boxes? I assume it is the document or window itself.</p>
<p>Either simple html or jQuery can be used.</p>
<p>I tried something like:</p>
<pre><code>var id = $(this).parent().attr('id');
</code></pre>
<p>but to no avail.</p>
<p>Ultimately I want to find out the ID of the window/document which generates javascript alerts so I can override it.</p>
<p>Thanks.</p>
|
javascript jquery
|
[3, 5]
|
580,078 | 580,079 |
Javascript Loop through Object Literal
|
<p>I would like to iterate over the below and output a string that combines the different settings:</p>
<p>Loop through this:</p>
<pre><code>config : {
settings : {
width: 880,
height: 495,
byline: false,
title: false,
portrait: false
}
}
</code></pre>
<p>And output:</p>
<pre><code>var output = '&height=495&width=880&title=false&byline=false&portrait=false',
</code></pre>
<p>How would I go about this?</p>
|
javascript jquery
|
[3, 5]
|
287,701 | 287,702 |
How to use Jquery Validation plugin in asp.net button
|
<p>Hi all i would like to use this validation plugin</p>
<p><a href="http://jquery.bassistance.de/validate/demo/milk/" rel="nofollow">http://jquery.bassistance.de/validate/demo/milk/</a></p>
<p>In this i will use <code>asp:button</code> instead of <code>html input</code> . Once after all validations done i would like to run my code if not i would like to show as per in the demo. How can i change it as per my requirement..</p>
<p>Can any one help me in achieving this as per my requirement</p>
|
c# jquery asp.net
|
[0, 5, 9]
|
5,283,727 | 5,283,728 |
How do I create 'JQuery' function calls and pass data to them?
|
<p>I'm adding tool tips using the qtip jquery plugin. I may add 50-60 tool tips over an entire site.</p>
<p>The way I've found to do it right now is ti cut/paste the jquery code over and over. For example:</p>
<pre><code>// First, setup a tool tip for 'Enter Username'.
$("input#user_login").qtip({
content: 'Enter username',
position: {
corner: {
target: 'rightMiddle',
tooltip: 'leftMiddle'
}
},
style: {
border: {
width: 1,
radius: 3,
color: '#0066CC'
},
width: 200,
name: 'blue'
}
});
</code></pre>
<p>Now, repeat everything for 'First Name'. Seems pointless.</p>
<pre><code>$("input#user_login").qtip({
content: 'Enter First Name',
position: {
corner: {
target: 'rightMiddle',
tooltip: 'leftMiddle'
}
},
style: {
border: {
width: 1,
radius: 3,
color: '#0066CC'
},
width: 200,
name: 'blue'
}
});
</code></pre>
<p>How do I create a function I can just pass the display text in to?</p>
|
javascript jquery
|
[3, 5]
|
5,107,772 | 5,107,773 |
JavaScript/PHP Regular Expression
|
<p>I'm trying to match first names and Lastname with something like this. </p>
<pre><code>$pattern = '/[a-zA-Z\-]{3,30} +[a-zA-Z]+/';
</code></pre>
<p>This works great, except when I have a first name like this <code>Mélissa Smith</code></p>
<p>My match becomes <code>Lissa Smith</code></p>
<p>How do I match for all special characters like <code>é</code></p>
|
php javascript
|
[2, 3]
|
4,162,302 | 4,162,303 |
Focus on Javascript or Jquery?
|
<p>I am a student in college, and I notice that a lot of companies look for people who have experience with Javascript. Does this include Javascript's libraries, like JQuery? Or, are they looking for Javascript people only? It probably depends on the company, but what is the general advice for a student wanting to do some front end work?
Is Javascript more powerful than JQuery? I know Jquery is a library and simplifies many tasks, but is there some reason why you would use Javascript over Jquery?</p>
|
javascript jquery
|
[3, 5]
|
3,781,233 | 3,781,234 |
Get error when accessing RadioButtonList from javascript that exist in a page that have master page
|
<p>i have a asp.net page that have its master page and it contain RadioButtonList1 and i try to do thefollwing </p>
<pre><code><script type="text/javascript">
var radioButtonList = document.getElementById('<%=RadioButtonList1.ClientID%>');
if(radioButtonList[0].checked)
document.getElementById("_secondTR").style.display = "block";
else if (radioButtonList[1].checked )
document.getElementById("_secondTR").style.display = "none";
}
</script>
<table style="width: 100%">
<tr id="Tr1">
<td>
<asp:RadioButtonList ID="RadioButtonList1" runat="server" BackColor="#FFCC99"
RepeatDirection="Horizontal" Width="117px" onclick="ShowHide()">
<asp:ListItem Value="1">Yes</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr id="_secondTR" runat="server" style="display: none">
<td>
<asp:RadioButton ID="Five" runat="server" GroupName="1" BackColor="#669999" />
<asp:RadioButton ID="Four" runat="server" GroupName="1" CausesValidation="True" BackColor="#669999" />
</td>
</tr>
</table>
</code></pre>
<p>i can't get RadioButtonList1 from java script ... could any help me to get that ? </p>
|
asp.net javascript
|
[9, 3]
|
3,905 | 3,906 |
Load form data in JavaScript and run something client side
|
<p>The original framework of my app (using Python) is below:</p>
<ol>
<li>user key in keywords in forms.</li>
<li>App use the data in forms as parameter to get some results from third-party website.</li>
<li>The result which is from third-party website will be analyzed in my app.</li>
<li>Then show the result of analyze to user.</li>
</ol>
<p>But there are some problems between my app and third-party website, so I want to change the framework of my app.</p>
<ol>
<li>user key in keywords in forms.</li>
<li>store the keywords which in forms as cookie.</li>
<li>automatically download one javascript which in my app (website), and run the javascript in user's computer.</li>
<li>the javascript will get result from third-party website, and then sent the result to my app.</li>
<li>my app will analyze the result (from third-party website) and then show the result of analyze to user.</li>
</ol>
<p>I want to know how can I do this, or what keyword should I search in Google.</p>
|
javascript python
|
[3, 7]
|
2,004,130 | 2,004,131 |
Why is jquery event delegation not working?
|
<p>I have the following html:</p>
<pre><code> <ul id="contain">
<li class="active_one"></li>
<li class="two"></li>
</ul>
</code></pre>
<p>And the following jquery:</p>
<pre><code>$contain = $('#contain'); //going to use a lot
$contain.on('click','li.two', function(){
console.log('working');
//plus do other stuff
});
</code></pre>
<p>The above does not work, but When I change it to:</p>
<pre><code>$('body').on('click','li.two', function(){
console.log('working');
//plus do other stuff
});
</code></pre>
<p>Then it works, but I know the best practice is to drill as close as possible to the parent element of what I am trying to work with, yet every time I try to do that, I am clearly doing something wrong because my parent level selectors are not working.</p>
|
javascript jquery
|
[3, 5]
|
2,707,684 | 2,707,685 |
using the same function of different events
|
<p>This seems pretty simple, but I can't figure it out. I'm new to javascript/ jquery.</p>
<p>i want to trigger a function to move a div onmouseover, and another onmouseout. I want to call this same function on several different divs. how would I do this without writing multiple functions?</p>
<pre><code> <div id="indexJoinBanner" onmouseover="moveDivRight()" onmouseout="moveDivLeft()">
<!-- end #indexJoinBanner --></div>
<div id="indexJoinBanner2" onmouseover="moveDivRight()" onmouseout="moveDivLeft()">
<!-- end #indexJoinBanner2 --></div>
function moveDivRight(){
$("#indexJoinBanner").animate({
left: "0px",
},500 );
};
function moveDivLeft() {
$("#indexJoinBanner").animate({
left: "-150px",
},500 );
}
</code></pre>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
637,688 | 637,689 |
Looping in jQuery
|
<p>I am tring to loop loop a jQuery command 5 times. Here is my code:</p>
<pre><code> for(var i = 0; i < 5; i++) {
$("#droppable_"+i).droppable({
activeClass: 'ui-state-hover',
hoverClass: 'ui-state-active',
drop: function(event, ui) {
$(this).addClass('ui-state-highlight').find('p').html('Dropped!');
}
});
}
</code></pre>
<p>For some reason I can't get it to work. Can someone help me please?</p>
|
javascript jquery
|
[3, 5]
|
947,508 | 947,509 |
How to detect a click outside an element?
|
<p>I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.</p>
<p>Is something like this possible with jQuery?</p>
<pre><code>$("#menuscontainer").clickOutsideThisElement(function() {
// hide the menus
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,284,607 | 4,284,608 |
mouseOver() funny behaviour
|
<p>I'm very curious as to why the blue <code><div></code> disappears when I mouse the mouse off the title, as opposed to only disappearing when the mouse if off the <em>whole</em> <code><div></code>.</p>
<pre><code>$("#yw1 .portlet-title").mouseover(function(){
$("#yw1 .portlet-content").slideDown('fast');
});
$("#yw1").mouseout(function(){
$("#yw1 .portlet-content").slideUp('fast');
});
</code></pre>
<p><a href="http://jsfiddle.net/ZhmeL/1/" rel="nofollow">Here's a demo jsFiddle.</a></p>
|
javascript jquery
|
[3, 5]
|
696,475 | 696,476 |
Callbacks for the same function
|
<p>I want to call a function a number of times providing it with different input on each occasion, however i am trying to ensure the next function call is triggered after the previous one has finished.</p>
<p>for example:</p>
<pre><code>func(1,2);
func(9,3);
func(6,4);
func(5,6);
</code></pre>
<p>I have seen callback be coded like;</p>
<pre><code>function1(someVariable, function() {
function2(someOtherVariable);
});
</code></pre>
<p>But this only works when calling a second function, i tried chaining the functions but this only allows me to run a set number of functions.</p>
<p>Is there a way i can apply some kind of call back to the same function?</p>
<p>note:: the function just adds a class.</p>
<pre><code>func(x, y){
$("#block").addClass("class");
setTimeout(function(){
$("#block").removeClass("class");
},1000);
};
</code></pre>
|
javascript jquery
|
[3, 5]
|
979,207 | 979,208 |
Adding javascript to the OnBlur property of an ASP.NET text box control
|
<p>Is there a way to specify some JavaScript to execute on the OnBlur event of an ASP.NET text box? It seems to me like if I add any event handlers to the TextBox object they will just cause postbacks to the server isntead of doing what I want. Basically, I just want to be able to have the textbox be rendered in this HTML:</p>
<pre><code><INPUT type="text" onblur="alert('1234')" />
</code></pre>
<p>Thanks!</p>
|
asp.net javascript
|
[9, 3]
|
3,617,998 | 3,617,999 |
How can I replace part of a string which is wider than 50 px with "..."?
|
<p>I am looking for a function which replaces part of a string which is wider than 50px with <code>"..."</code>. I want to implement it in Javascript/jQuery.</p>
<p>Example:</p>
<ul>
<li>Say I have a variable <code>var="Theta Saving Non-Qualified Plan";</code> I want to put a restriction on the length of the string (based on pixel width). If the length of string is more that 50px, then the part of the string which is from the 51st pixel to theend of string will be replaced with <code>"..."</code>.</li>
</ul>
<p>Any idea guys?</p>
|
javascript jquery
|
[3, 5]
|
5,976,104 | 5,976,105 |
"function" is not defined error in Javascript: what is the right way to call my function?
|
<p>I understand a bit because of this post: <a href="http://stackoverflow.com/questions/1495903/jquery-settimeout-not-working">JQuery, setTimeout not working</a> why it's not working, but keeping everything this way, what is the right way to call <code>_finalvalidate()</code> inside my div?</p>
<pre><code> <script type="text/javascript">
$(document).ready(function(){
//On Submitting
function _finalvalidate(){
alert('ppp');
if(validateName() & validateEmail() & validatePhone()){
alert('OK');
return true
}
else{
alert('false');
return false;
}
}
});
</script>
<div onclick="_finalvalidate();"> Take action </div>
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,681,998 | 1,681,999 |
How remove the previous event?
|
<p>tell me what I need to correct, to the repeated clicking on another cell <code>TR</code> previous events are deleted</p>
<p><a href="http://jsfiddle.net/WGdyk/1/" rel="nofollow">Full example</a></p>
<pre><code>$('table tbody tr').each(function() {
$('table tr:even').addClass('even');
$(this).hover(function(){
$(this).toggleClass("active");
});
$(this).click(function(){
$(this).closest('tr').toggleClass('visited');
})
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
378,798 | 378,799 |
How do I make this ghostType jquery function do line breaks?
|
<p>I'm playing around with a jquery function called <a href="http://ghosttype.com" rel="nofollow">ghostType</a> which basically types out text as though it is being typed on screen. Its kinda cool, but I can't seem to have it do line breaks.</p>
<p>The jquery is as follows:</p>
<pre><code>(function( $ ){
$.fn.ghostType = function() {
return this.each(function() {
var $this = $(this);
var str = $this.text();
$this.empty().show();
str = str.split("");
str.push("_");
// increase the delay to ghostType slower
var delay = 100;
$.each(str, function (i, val) {
if (val == "^") {
// Do nothing. This will add to the delay.
}
else {
$this.append('<span>' + val + '</span>');
$this.children("span").hide().fadeIn(100).delay(delay * i);
}
});
$this.children("span:last").css("textDecoration", "blink");
});
};
})( jQuery );
</code></pre>
<p>From what I can tell this code takes each character in the chosen elements TEXT and puts it into seperate tags, therefor omitting the HTML (ie br's) with the line var str = $this.text();</p>
<p>How would you go about making this code include line breaks?</p>
<p>The best I could come up with was by adding an extra 'else if' statement like so:</p>
<pre><code> else if ( val == "*" ) {
$this.append('<br />');
}
</code></pre>
<p>And therefor * signs would become line breaks... but this damages the functionality where blinking cursor doesn't sit beside each letter as it fades in. otherwise, it works...</p>
<p>You can see an example of what I've done at <a href="http://jsfiddle.net/JNyQV/" rel="nofollow">http://jsfiddle.net/JNyQV/</a></p>
|
javascript jquery
|
[3, 5]
|
4,958,499 | 4,958,500 |
High performance JS map for int-string pairs
|
<p>I need a high performance map in Javascript (hashmap or whatever) that maps <code>int</code>(s) to <code>string</code>(s). The map would be used to build some sections of the webpage after dom is ready. I know simple javascript object also works like a map but I need to work with best performance. </p>
<p>I would like to initialize the map with all data pairs just at once by appending a string to the webpage while generating the response page from server.</p>
<p>Any ways how to improve performance of javascript map for int- string pairs or are there any implementations for the same ?</p>
<p>--</p>
<p>Using jQuery 1.7</p>
|
javascript jquery
|
[3, 5]
|
490,455 | 490,456 |
jquery blockUI and unblocui
|
<p>Having issue with unblockUI. It gives compile timne error. syntax error $.unblockUI();</p>
<pre><code><SCRIPT type="text/javascript">
var $ = jQuery.noConflict();
$('#toHide').show().blockUI();
setTimeout('document.getElementById("safeForm15").submit()', 100);
$.unblockUI();
</SCRIPT>
</code></pre>
<p>Purpose is blockUI for a period of time show laoding please wait message then unblockit or go to next page.</p>
<p>after removing } im getting another error: ie </p>
<blockquote>
<p>$("#toHide").show().blockUI is not a
function</p>
</blockquote>
|
javascript jquery
|
[3, 5]
|
1,087,298 | 1,087,299 |
Is storing an array of objects in ASP.NET viewstate the best solution for this?
|
<p>I'm wondering if storing the data in viewstate is a good idea for this given problem.
He's a simplified example of what I am trying to achieve, firstly we have a Repeater control:</p>
<pre><code><asp:Repeater id="Repeater1" runat="server">
<ItemTemplate>
<asp:TextBox id="Name" runat="server" />
<asp:TextBox id="Age" runat="server" />
</ItemTemplate>
</asp:Repeater>
<asp:TextBox id="NewPersonName" runat="server" />
<asp:TextBox id="NewPersonAge" runat="server" />
<asp:Buttin id="Button1" runat="server" Text="Add" OnClick"Button1_Click"/>
</code></pre>
<p>To keep things simple I'll forego the databinding code, as this is working it loads in the current list of people and ages and binds perfectly.</p>
<p>The problem is with the bottom 3 controls, what I want is for the user to be able to type in a new entry, click the add button and this would then be added to the Repeater, but not persisted to the database.</p>
<p>The user should be able to add multiple names to the list and then click a Save button to commit all the new names in one click rather than committing for each entry.</p>
|
c# asp.net
|
[0, 9]
|
1,400,975 | 1,400,976 |
upload and send a file
|
<p>Hey guys,
I created this system of instant messaging now i want to upload and send a file to another user.
I am using php and javascript.
How to do so?
Ok imagine that i am a user chatting for instance with you, now i want to send you a file how can i do it using php.
I understand that it is two steps upload the file and then send? Is that right?</p>
|
php javascript
|
[2, 3]
|
2,393,898 | 2,393,899 |
How to replace a page by date
|
<p>There is way to replace page at some date&time ?</p>
<p>example: i want that at friday the default.aspx will down, and other page will turn to default.aspx... and then at sunday the first default.aspx will return.</p>
<p>someone have an idea? maybe will be better to change the display of the default.aspx. i need to replace the screen to "we down for a while" or something like that.</p>
<p>i mean that button will do that... </p>
<p>using c#. asp.net</p>
|
c# asp.net
|
[0, 9]
|
2,558,006 | 2,558,007 |
Using a for loop in server side code to cycle through labels by dynamically creating the names there
|
<p>I was working on a website that had a list of asp labels. I used javscript code to get the name of each box so I could modify the text that was inside them. I was using a for loop similiar to this, and I became curious if there was a way to call all the labels similiarly so that you can put them in a loop and to cycle through them all. Something like this in the server side code:</p>
<p>asp code:</p>
<pre><code><asp:Label runat="server" ID="lblWorld1" Text="" />
<asp:Label runat="server" ID="lblWorld2" Text="" />
<asp:Label runat="server" ID="lblWorld3" Text="" />
<asp:Label runat="server" ID="lblWorld4" Text="" />
<asp:Label runat="server" ID="lblWorld5" Text="" />
</code></pre>
<p>c# code</p>
<pre><code>for(int c = 1; c <= 5 ; c++)
{
var label = "lblWorld" + c.toString();
label.Text = "Hello World!";
}
</code></pre>
<p>However, in the server side code, this doesn't work. Is there a way to make a for loop and with a dynamic system getting the name of the labels. </p>
|
c# asp.net
|
[0, 9]
|
2,035,113 | 2,035,114 |
Is ASP.NET EventHandler attachment asymmetric?
|
<p>I have a form that uses client-side scripting to manage controls' interaction before a record is written to the database, and then switches to postbacks/server-side once inputs are updates to an existing record. Controls are CheckBoxes and TextBoxes in GridView rows.</p>
<p>This works:</p>
<p>a) Assign OnCheckChanged, OnTextChanged handlers in the .aspx item templates (and implicitly set AutoPostBack false by accepting its default)</p>
<p>b) In the method that binds the GridView,</p>
<pre><code>if (dbID == 0) {
// attach onclick and onchange .Attributes
// unset AutoPostBack
// -= EventHandlers
} else {
// clear .Attributes
// set AutoPostBack
}
</code></pre>
<p>It seems logically equivalent to NOT specify anything in the template, and</p>
<pre><code>if (dbID == 0) {
// attach onclick and onchange .Attributes
} else {
// clear .Attributes
// += EventHandlers
// set AutoPostBack
}
</code></pre>
<p>but it apparently isn't. The first way works, the second does not. Am I missing something obvious?</p>
|
c# asp.net
|
[0, 9]
|
6,015,362 | 6,015,363 |
I don't understand how this javascript function executes
|
<p>When I run the following codes, the alert popup displays undefined. I thought it would return either true or false instead. Please can someone explain how the checkLoginStatus() function excutes. Thanks.</p>
<pre><code>function checkLoginStatus() {
$.get("func.php", {op:'login_status', r:Math.random()}, function(data) {
if (data == "Yes") {
showSalesView();
return true;
} else {
loginView();
return false;
}
});
</code></pre>
<p>} </p>
<pre><code>alert(checkLoginStatus());
</code></pre>
|
javascript jquery
|
[3, 5]
|
584,362 | 584,363 |
How do I show or hide div, based on position of another div
|
<p>I have the following jquery that slides a div horizontally:</p>
<pre><code>$('.nextcol').click(function() {
$('.innerslide').animate({'left': '-=711px'}, 1000);
});
$('.prevcol').click(function() {
$('.innerslide').animate({'left': '+=711px'}, 1000);
});
</code></pre>
<p>What I want to happen is this... if the <em>div.innerslide</em> has a position that is <strong>left: 0px</strong> then I want to hide <em>div.backarrow</em>. If the position is not <strong>left: 0px</strong>, then it shows it.</p>
<p>Any help would be greatly appreciated.</p>
<p><strong>EDIT (added HTML Markup)</strong></p>
<pre><code><div class="backarrow prevcol">
<div id="mainleft" class="overflowhidden">
<div class="innerslide">
<div class="col">my content including <a href="#" class="nextcol">next</a></div>
<div class="col">my content including <a href="#" class="nextcol">next</a></div>
<div class="col">my content including <a href="#" class="nextcol">next</a></div>
</div>
</div>
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,688,542 | 1,688,543 |
How to convert this javascript code in to jquery
|
<pre><code>if (window.parent.frames['scripts1']) {
if (window.parent.frames['scripts1'].document.documentElement) {
var strSCRIPT = window.parent.frames['scripts1'].document.documentElement.textContent;
if ((strSCRIPT.lastIndexOf('bbbbEND') - strSCRIPT.length) != -7) {
window.parent.frames['scripts1'].document.location.href = 'test1.txt?refresh=' + Date();
}
} else {
window.parent.frames['scripts1'].document.location.href = 'test1.txt?refresh=' + Date();
}
}
</code></pre>
<p>I have tried lot of things but not success in writing something for cross browser.</p>
|
javascript jquery
|
[3, 5]
|
4,264,977 | 4,264,978 |
Next button + Javascript form manipulation result in problem on iPhone
|
<p>I have got a form with 2 dropdown lists on a simple HTML page. Depending on the value selected in the first dropdown list, a Javascript event handler(using the onChange event) changes the options of the second dropdown list.</p>
<p>When selecting a value in the first box and touching the second box in the browser window everything works fine, but when I use the "next" button provided by the dropdown-list-thing of Mobile Safari, only the rendered list changes, but the dropdown-list-thing shows still the old values. How can I fix this?</p>
<p>thanks in advance</p>
|
javascript jquery iphone
|
[3, 5, 8]
|
4,970,000 | 4,970,001 |
What is the best way to convert an existing php class into Java?
|
<p>I have been tasked with converting several php classes into java classes, which is quickly becoming a nightmare for me. I understand the basic language structure, it being similar to C. It is all of the function calls and class calls that seem to go nowhere and the fact that a var can be declared in the <strong>!middle of an expression!</strong> that is spinning my head, oh and the fact that there is zero "0" documentation.</p>
<p>What is the best <strong>method</strong> (and/or) <strong>tool</strong> (and/or) <strong>reference material</strong> to convert the php into java code?</p>
<p>edit: There is 3 reasons that I am having to convert the php to java. </p>
<ol>
<li>The usual reason, my boss told me too.</li>
<li>The php is too slow, it is taking <strong>minutes</strong> sometimes to run a request to the server. </li>
<li>php is a nightmare to scale and maintain.(at least for us strong typed language types)</li>
</ol>
|
java php
|
[1, 2]
|
659,259 | 659,260 |
Uncaught TypeError: Object #<HTML Document> has no method 'ready'
|
<p>I'm trying to implement a simple javascript into a website (website is on weebly), and I'm getting this error.
In the resources tab on chrome I can see it's loading all of the scripts.
Here's a piece of code:</p>
<pre><code><script type="text/javascript" src="/files/theme/cufon-yui.js"></script>
<script type="text/javascript" src="/files/theme/cufon-yanone-250.js"></script>
<script type="text/javascript" src="/files/theme/script.js"></script>
<script type="text/javascript" src="/files/theme/coin-slider.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#coin-slider').coinslider();
});
</script>
</code></pre>
<p>That's all fitted on the bottom of the .html file. It's a coin slider gallery.</p>
<p>Anyone out to help me ?</p>
<hr>
<p><em>From comment...</em></p>
<p>I am loading jQuery in the <code><head></code>...</p>
<pre><code><script src="ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"; type="text/javascript"></script>`
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,949,638 | 4,949,639 |
ASP.NET EventHandling
|
<p>I create a servercontrol for ASP.Net. For being short and precise I
just list the things I do:</p>
<p>(1) Call EnsureChildControls in OnInit</p>
<p>(2) Create a dynamic table in CreateChildControls:</p>
<pre><code>Table aTable = new Table();
aTable.ID = this.ID + "$" + T;
TableRow aRow = new TableRow();
aRow.ID = aTable.ID + "$R" + <COUNTER>.ToString();
TableCell aCell = new TableCell();
createLinkButton(row, col, caption, aCell, aRow.ID);
this.Controls.Add(aTable);
</code></pre>
<p>(3) Have a function like:</p>
<pre><code>void aLinkButton_Command(object sender, CommandEventArgs e)
{
// Some stuff
return;
}
</code></pre>
<p>(4) Have a function like:</p>
<pre><code>void createLinkButton(int row, int col, string caption, TableCell aCell, string baseID) {
LinkButton lb = new LinkButton();
lb.ID = baseID + "$" + row.ToString() + col.ToString();
lb.Command += new CommandEventHandler(aLinkButton_Command);
lb.Text = caption;
lb.CommandName = "<command>";
aCell.Controls.Add(lb);
return;
}
</code></pre>
<p>But: The event is never called. The href is redered for postback, but the wired event never gets triggered.</p>
<p>No ideas anymore :(</p>
<p>Any ideas</p>
|
c# asp.net
|
[0, 9]
|
1,778,569 | 1,778,570 |
How can I get this values?
|
<p>Let's say that I have a object that looks like this</p>
<pre><code>var object = { id : 1, name : "Test"}
</code></pre>
<p>And I know that in jQuery I can make an each assuming that I have an array of this object example like this:</p>
<pre><code>$.each(arrayOfObjects, function (i, value) {
this.id // gives me the id
this.name //gives me the name
});
</code></pre>
<p>Assuming that <code>id</code> and <code>name</code> are string parameters, how can I get the values??</p>
<p><strong>UPDATE</strong></p>
<p>I'm already modified the code, i just want to know if exit's a way to accomplish something like this</p>
<pre><code>var aux = 'id'
$.each(arrayOfObjects, function (i, value) {
this.aux // gives me the id
this+ aux
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,090,312 | 5,090,313 |
How do I check if the browser is running on a MAC?
|
<p>As the title describes. </p>
<p>I need to see if the machine accessing my page is a MAC or something else</p>
|
javascript jquery
|
[3, 5]
|
4,329,724 | 4,329,725 |
How much data can be stored using .data method?
|
<p>How much data can be stored using $.data method in Jquery? Are there any pitfalls of using it?</p>
<p>I tried to get an answer for this very concrete question, however, I couldn't find any.</p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
908,538 | 908,539 |
fire a function after triggering a click event
|
<p>How can fix this :</p>
<pre><code>function Navigation(sender) {
var senderID = sender.id;
var answer = confirm("do you want to save your current layout ?");
if (answer) {
$("#loadingImg").css("display", "block");
$("#<%=Button1.ClientID %>").click();
//the next line is never fired
if (senderID == "AboutClick") { setTimeout('ShowLoadingMsg()', 3000); }
}
}
function ShowLoadingMsg() {
window.location="About.aspx";
}
<a href="javascript:void(0)" id="AboutClick" class="menu" onclick="Navigation(this);" >Navigate Click</a>
<asp:Button ID="Button1" runat="server" OnClick="btnSaveState_Click" style="display:none;" />
</code></pre>
<p>//Server side:</p>
<pre><code> protected void btnSaveState_Click(object sender, EventArgs e)
{
SaveState();
}
</code></pre>
<p>The main problem is that this line is never fired what am i doing wrong here </p>
|
javascript jquery
|
[3, 5]
|
2,027,503 | 2,027,504 |
Algorithm in android's secure random
|
<p>The android developer's guide on securerandom says<br></p>
<pre><code>Supported Algorithms
SHA1PRNG: Based on SHA-1. **Not guaranteed to be compatible with the SHA1PRNG algorithm on the reference implementation.**
The default algorithm is defined by the first SecureRandomSpi provider<br> found in the VM's installed security providers. Use Security to install custom SecureRandomSpi providers.
</code></pre>
<p>And true to this this when seeded with the same value, the sequence in java and android are different. How do I make android use the <code>sha11prng</code> implementation same as the one used in java?</p>
|
java android
|
[1, 4]
|
5,685,009 | 5,685,010 |
Collect prices from page using JavaScript
|
<p>I'm developing a bookmarklet now and faced this task: I need to collect all prices from any page.</p>
<p>The problem is that the price may be in multiple formats ($19.00, 15.45$, etc), not counting different currencies and html markup. The good news is that I'm using jquery.</p>
<p>If anybody has an idea how it can be accomplish, please share :)</p>
<p>Thanks in advance!</p>
|
javascript jquery
|
[3, 5]
|
241,396 | 241,397 |
how can i use the onkeyup event in textbox?
|
<p>hey guys,i want your help!this is my code:</p>
<pre><code><%
string a=Request.Params["a"];
%>
<form id="form1" runat="server">
<div>
&nbsp;
<input type="text" id="cc" runat="server" visible="false"/>
<input type="text" id="aa" runat="server" onkeyup="key(document.all.aa.value,'<%=a; %>');"/>
</code></pre>
<p>the 'a' is a parameter request from another page.now in this page i hava a textbox and i give its a onkeyup event. then 'key()' is a function include two parameter:one is itself's value and another is 'a',but there is an error:Server tags can not contain <% ...%> Structure.
what can i do?
i don't know if you understand me,because my English is very poor!</p>
|
c# asp.net
|
[0, 9]
|
3,666,495 | 3,666,496 |
How to keep on calling Jquery on Success
|
<p>I want to call the webservice until i get the desired Output.
This is the code i am using.</p>
<pre><code>$.ajax(
{
type: "POST",
url: "../WebService/myservice.asmx/GetStatus",
data: "{'myparameter': '" + value + "'}",
contentType: "application/json;charset=utf-8",
dataType: "json",
async: true,
cache: false,
success: function (response) {
return response.d;
},
error: function (x, e) {
alert("The call to the server side failed. " + x.responseText);
}
});
</code></pre>
<p>This webservice will return me the result. i want that until the result is completed the jquery call should execute every 1 sec.</p>
|
javascript jquery
|
[3, 5]
|
5,453,668 | 5,453,669 |
changing script to jquery combining another function
|
<p>I have a script that I put together, which a button is clicked it rotates 45 degrees, I also would like it to toggle a paragraph open and closed. I don't have access to the CSS because the content management system interwoven wont' let me have accerss, so this is why it's all done with the javascript and it has to stay that way. The script is:</p>
<pre><code>var img = document.images[0];
effects_of_yoga_info.style.setProperty("-webkit-transition", "-webkit-transform 0.3s ease-in-out");
var deg = 0;
effects_of_yoga_info.addEventListener('click', function() {
deg += 45;
effects_of_yoga_info.style.setProperty('-webkit-transform', 'rotateZ('+deg+'deg)');
</code></pre>
<p>and the part I'd like to incorporate into it so that they happen at the same time is:</p>
<pre><code>$("#effects_of_yoga_info").click(function () {
$("p#effects_of_yoga_text").slideToggle("fast");
});
</code></pre>
<p>I'm sure it's very simple but I've been having a hard time with it, thanks in advance.</p>
|
javascript jquery
|
[3, 5]
|
113,528 | 113,529 |
In which activity (class) constant action key should be added in Android?
|
<p>I have a lot of action key in my application for example, im sending intent from activity A to activity B and i have this action key "com.mysite.COUNT". where it belong is it in Activity A or B and when you have a lot of constants that does not belong to one class, Do you make a separate file and name it constant(something) ?</p>
|
java android
|
[1, 4]
|
4,352,201 | 4,352,202 |
Android - Cursor result search string error, need search DISPLAY_NAME for match
|
<p>I need to search the DISPLAY_NAME field 1st and last name and have tried this code:</p>
<pre><code>ContentResolver cr = getContentResolver();
Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI, null, ContactsContract.Contacts.DISPLAY_NAME + " like %?%", new String[]{ results.get(0) }, null);
</code></pre>
<p>if (cur.getCount() > 0) { </p>
<p>I get error in log cat from the %'s in the cursor line.
Any advise would be appreciated. ??</p>
|
java android
|
[1, 4]
|
5,104,521 | 5,104,522 |
Adding sound to shorthand if statement
|
<p>I am currently adding extra sounds to my game. The problem is I have a shorthand if statement like "?...:..." and don't know how I can add audio to it. If it is not possible how would I make it a normal if statement without making it crash.</p>
<pre><code> b.clone().addClass(
b.data("letter") == target.data("letter") ? "wordglow3" : "wordglow").appendTo("table").css({
background: "transparent",
position: "absolute",
top: currentPos.top,
left: currentPos.left
})
</code></pre>
<p>So if "wordglow3" I want to add "hit.play()" and for "wordglow" I want to add "miss.play()"</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.