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 |
---|---|---|---|---|---|
2,336,956 | 2,336,957 |
Unbind even when mouse over child
|
<p>I have the following HTML</p>
<pre><code><ul>
<li class="operation>Lorem ... <span rel="popover" data-content="Impsum">%</span></li>
<li class="operation>Lorem ... <span rel="popover" data-content="Impsum">%</span></li>
<li class="operation>Lorem ... <span rel="popover" data-content="Impsum">%</span></li>
</code></pre>
<p></p>
<p>I'd like to fadeIn the span element when the mouse goes over the list item and fadeOut when the mouse moves away from the item. BUT IF the mouse goes over the span itself I'd like to keep it visible even after the mouse moves away. I mede several attempts but every time the span disappears when the mouse is not over anymore. Below you may find the last 2 attempts</p>
<pre><code>$(".operation").on("mouseenter", function(event){
$(this).children("span[rel=popover]").fadeIn(200);
}).on("mouseleave", function(event){
$(this).children("span[rel=popover]").fadeOut(200);
});
$("span[rel=popover]").off("mouseleave", function(event){
$(this).fadeOut(200);
});
</code></pre>
<p>and</p>
<pre><code>$(".operation").on("mouseenter", function(event){
$(this).children("span[rel=popover]").fadeIn(200);
}).on("mouseleave", function(event){
$(this).children("span[rel=popover]").fadeOut(200);
});
$("span[rel=popover]").hover(function(){
$(this).off("mouseleave", function(event){
$(this).fadeOut(200);
});
});
</code></pre>
<p>Am I missing something? How can I fix it ?</p>
<p>Thanks and have a nice day.</p>
|
javascript jquery
|
[3, 5]
|
5,704,577 | 5,704,578 |
jQuery: Get first element of type in top UL in a nested list
|
<p>I have a nested list like this:</p>
<pre><code><ul class="list">
<li class="list_item_type_1">
<ul class="list">
<li class="list_item_type_2">Unnested item</li>
</ul>
</li>
<li class="list_item_type_2">Unnested item</li>
</ul>
</code></pre>
<p>With jQuery I want to add a list item before all <code>.list_item_type_2</code> in the first <code>.list</code>. </p>
<p>I write it like this:</p>
<pre><code>$('.list:first').find('li.list_item_type_2:first').before('<li class="list_item_type_1">Nested list (...)</li>');
</code></pre>
<p>This won't work as intended because the script finds the first <code>.list_item_type_2</code> in the <strong>second</strong> <code>.list</code> and appends the new code there instead.</p>
<p>How can I keep the search in the first <code>ul</code> and prevent it from entering underlying <code>ul</code> elements?</p>
<p>Cheers!</p>
|
javascript jquery
|
[3, 5]
|
2,068,173 | 2,068,174 |
Can't adjust label widths. JQuery
|
<p>I have such a sketch: <a href="http://jsfiddle.net/challenger/upcZJ/" rel="nofollow">http://jsfiddle.net/challenger/upcZJ/</a>.</p>
<p>I found an article <a href="http://www.jankoatwarpspeed.com/post/2008/07/09/Justify-elements-using-jQuery-and-CSS.aspx" rel="nofollow">http://www.jankoatwarpspeed.com/post/2008/07/09/Justify-elements-using-jQuery-and-CSS.aspx</a> which explains how to adjust label widths relative to the widest one.</p>
<p>But I can't do the same. What have I missed? I've tried do the thing inside an <code>accordion tab</code> and inside <code>aside division</code>.</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
4,419,958 | 4,419,959 |
Pass database variables to jQuery via element attribute?
|
<p>Is there any specification for "Pass database variables to jQuery via element attribute?"</p>
<p>I've been doing this for a long time:</p>
<pre><code><script>
var status = <%= status %>;
</script>
</code></pre>
<p>I would much rather do something like this:</p>
<pre><code><variable data-name="status" data-value="<%= status %>" />
</code></pre>
<p>Then get it with jquery:</p>
<pre><code>var status = $('variable[data-name="status"]').attr("data-value");
</code></pre>
<p>I would need the element to be hidden from displaying. I know there is a pattern for this, I just don't know what it's called or how to search it.</p>
|
javascript jquery
|
[3, 5]
|
1,894,683 | 1,894,684 |
how to get current url in code behind?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/96029/get-url-of-asp-net-page-in-code-behind">Get URL of ASP.Net Page in code-behind</a> </p>
</blockquote>
<p>I'm trying to hold current url in string in the code behind.</p>
<p>as example this is the current url address:http:www.stackoverflow.com/questions/ask/submit
how I can hold this in string variable?</p>
<p>please help me out.</p>
|
c# asp.net
|
[0, 9]
|
2,299,340 | 2,299,341 |
Retry Popup on Ok
|
<p>I have not stated anywhere in my code nor JavaScript that the page should refresh upon clicking the OK button. But as the user clicks the OK button, the retry popup comes up.
I am not sure what is the reasoning behind this.</p>
<p>Here is my code for the OK button:</p>
<pre><code>protected void btn_ok_click(object sender, EventArgs e)
{
tree_items.Nodes.Clear();
TableClass.MainTable = new DataTable();
SqlConnection connection1 = new SqlConnection();
connection1.ConnectionString = ConfigurationManager.ConnectionStrings["A"].ConnectionString;
SqlCommand command1 = new SqlCommand("GetStuff", connection1);
command1.CommandType = CommandType.StoredProcedure;
command1.Parameters.Add(new SqlParameter("@Id", solution_id));
command1.CommandTimeout = 600;
SqlDataAdapter adapter1 = new SqlDataAdapter(command1);
connection1.Open();
adapter1.Fill(TableClass.MainTable);
GenerateTreeView(TableClass.MainTable);
adapter1.Dispose();
command1.Dispose();
connection1.Dispose();
}
</code></pre>
<p>Here is the JavaScript for OK button:</p>
<pre><code><asp:Button ID="btn_ok" runat="server" Height="32px" OnClick="btn_ok_click"
Text="OK" Width="100px" />
</code></pre>
<p>Please help.
Here is the GenerateTreeviw code:</p>
<pre><code>private void GenerateTreeView(DataTable table)
{
DataRow[] foundRows = table.Select("ParentId = -1", "OrderIndex");
TreeNode RootParentNode = null;
int j = 1;
foreach (DataRow i in foundRows)
{
string NewParentNodeName = i.Field<string>("Name");
string NewParentNodeKey = Convert.ToString(i.Field<int>("ItemId"));
RootParentNode = new TreeNode(NewParentNodeName, NewParentNodeKey);
i["OrderIndex"] = j;
j++;
GenerateChildNodes(table, NewParentNodeKey, RootParentNode);
tree_items.Nodes.Add(RootParentNode);
}
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
5,652,802 | 5,652,803 |
JQuery Validation for Two Password Fields
|
<p>Two entered passwords should be the same, and I want to display a notification when they're not matching. The target is to display the notification during typing and not after pressing the save Button. </p>
<p>I am new to javascript and I have also tried the functionname function() notation.</p>
<p>following js:</p>
<pre><code>function updateError (error) {
if (error == true) {
$(".error").hide(500);
}else{
$(".error").show(500);
}
};
function checkSame() {
var passwordVal = $("input[name=password-check]").val();
var checkVal = $("input[name=password]").val();
if (passwordVal == checkVal) {
return true;
}
return false;
};
document.ready(function(){
$("input[name=password-check]").keyup(function(){updateError(checkSame());});
$("input[name=password]").keyup(function(){updateError(checkSame());});
});
</code></pre>
<p>and HTML:</p>
<pre><code> @Html.Password("password")
@Html.Password("password-check")
<span class="error">Errortext</span> </td></tr>
</code></pre>
<p>but it doesn't works..
Thx!</p>
<p>Edit:
Now i've changed the JS code to:</p>
<p>$("input[name=password-check]").keyup(function(){updateError(checkSame());});
$("input[name=password]").keyup(function(){updateError(checkSame());});</p>
<p>--> now it works, but only once, after the user typed a matching password, validation stops working</p>
<p>Solved, problem was Quoting:</p>
<pre><code>$("input[name='password-check']").keyup(function(){updateError(checkSame());});
$("input[name='password']").keyup(function(){updateError(checkSame());});
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,199,875 | 1,199,876 |
Toggle function Javascript
|
<p>I'm trying to make a toggle that toggles between two classes when clicked on the object with function "openclose(j)". I tried making the script only removeClass("arrow-down"), which works fine, but it wont addClass("arrow-up"). This is really annoying to deal with :)</p>
<pre><code> function openclose(j){
if(jQuery('#div_'+j).hasClass("arrow-down")) {
jQuery('#div_'+j).removeClass("arrow-down").addClass("arrow-up");
}
if (jQuery('#div_'+j).hasClass("arrow-up")) {
jQuery('#div_'+j).removeClass("arrow-up").addClass("arrow-down");
}
jQuery('#collaps_'+j).toggle(
function () {
}
);
}
</code></pre>
<p>Any help is much appreciated,</p>
<p>Regards,
Mathias</p>
|
javascript jquery
|
[3, 5]
|
5,348,456 | 5,348,457 |
Jquery post and get data from PHP
|
<p>Jquery code looks like:</p>
<pre><code>$('#gal').rating('gl.php?gal_no=<?=$gal_no;?>&id=<?=$id;?>', {maxvalue:10,increment:.5, curvalue: <?=$cur;?>});
</code></pre>
<p>PHP code:</p>
<pre><code>$br=mysql_query("SELECT count(gal) as total FROM ...")
if ... {
echo '0';
}
else echo '1';
}
</code></pre>
<p>Jquery code successfully transmitted data to PHP script and when the PHP done with checking data echo the result ('1' or '0').
How can I get this PHP result back to Jquery and based on them write a message?
Some thing like:</p>
<pre><code>if(data=="1")
{
$("#error").show("fast").html('not correct').css({'background-color' : '#F5F5F5','border-color' : '#F69'});
}else{
$("#error").show("fast").html('correct').css({'background-color' : '#FFF','border-color' : '#3b5998'});
}
</code></pre>
|
php jquery
|
[2, 5]
|
2,782,441 | 2,782,442 |
Why is this code's execution speed so different?
|
<p>In <strong>Internet Explorer 7</strong>, this code executes consistently in <strong>47</strong> ms:</p>
<pre><code>function updateObjectValues() {
$('.objects').html(12345678); // ~500 DIVs
}
</code></pre>
<p>however, this code executes consistently in <strong>157</strong> ms:</p>
<pre><code>function updateObjectValues() {
$('.objects').html('12345678'); // ~500 DIVs
}
</code></pre>
<p>Passing a number is over 3x faster than a string. Why are these results so dramatically different? And, is there any way to help the performance of the string?</p>
|
javascript jquery
|
[3, 5]
|
4,521,754 | 4,521,755 |
c# failed to check existed file in directory
|
<p>there are nothing is inside my test002 folder, by right my output should be is "nothing is inside the folder",but after compile there are nothing prompt.</p>
<p>what i want to do is if there are any .doc file is inside my folder, just upload it
if there are nothing is inside the folder, ask user to upload .doc to required folder.</p>
<pre><code>protected void Button3_Click(object sender, EventArgs e)
{
try
{
string[] chkUserResume = Directory.GetFiles(HttpContext.Current.Server.MapPath(@"~/Enduser/test002/"), "*.doc");
if (chkUserResume!=null)
{
foreach (string name in chkUserResume)
{
Response.Write(name + " is exist");
}
}
else
{
Response.Write("nothing is inside the folder");
}
}
catch (Exception ex)
{
Response.Write(ex.Message.ToString());
}
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
4,190,858 | 4,190,859 |
Adding words to game through PHP
|
<p>In my spelling game new words will be added all the time so there is always a fresh selection of words to spell.</p>
<p>Each word added to the game has a "src" to an image and a sound that will prompts the user into getting the spelling correct in gameplay.</p>
<p>When I have completed making the game, the job of adding the new words in is down to one of my colleagues. This means he will have to add a link for the pic and audio as well as the word.</p>
<p>As they have little knowledge with this sort of thing I want to make it as easy as possible for him to add the images and sounds when adding the words I want to create a default path to a shared location where he will store all this stuff.</p>
<p>This way he can just type in "bug" for the word, ".bug-pic" for the picture and ".bug-audio" for the sound making it simple for him to add into the HTML.</p>
<p>Is this the best way to do it?</p>
<p>What would be the simplest way for them to input these things?</p>
<p>Here is how I store the word, sound and image at the moment...</p>
|
javascript jquery
|
[3, 5]
|
4,969,226 | 4,969,227 |
Null Pointer when trying to dynamically disable a preference
|
<p>I am getting a null pointer exception on <code>mPreference = (Preference)...</code> in the following code (i.e. with debugger on, <code>mPreference</code> shows null; NB key is non-null, I can substitute with a literal and it still gives me the same exception):</p>
<pre><code>public class SettingsManager extends PreferenceActivity {
private Preference mPreference;
private static boolean toggle;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Load the XML preferences file
addPreferencesFromResource(R.xml.preferences);
}
public void setPrefEnabled(Context context, String key, String enabled) {
if (enabled.contentEquals("true")) {
toggle = true;
} else {
toggle = false;
}
mPreference = (Preference) getPreferenceScreen().findPreference(key);
mPreference.setEnabled(toggle);
}
}
</code></pre>
<p>The class is being called by the following code, in the <code>applySettings</code> method of a class where <code>settingsManager</code> is instantiated in the constructor:</p>
<pre><code>public class ConfigurationSetter {
private static Context mContext;
private static SettingsManager settingsManager;
public ConfigurationSetter(Context context) {
mContext = context;
settingsManager = new SettingsManager();
}
private static void applySettings(Context context, String key,
String value, String enabled) {
settingsManager.setPrefEnabled(mContext, key, enabled);
}
}
</code></pre>
<p>I've been scratching my head on this but may be a little too tired to figure it out on my own. Any help is appreciated.</p>
<p>Related to this problem, I <a href="http://stackoverflow.com/questions/10423709/are-intents-required-to-persist-preference-state-in-a-headless-activity">asked a question here</a> about whether intents are the required instantiater for this activity.</p>
|
java android
|
[1, 4]
|
5,965,867 | 5,965,868 |
Jquery Table plugin
|
<p>I need a table plugin that does the following</p>
<ol>
<li>Uses json and html table as the datasource</li>
<li>supports pagination</li>
<li>can specify how many rows to show by the user(i.e user can change rows per page)</li>
<li>sorting of columns</li>
<li>searching (complex searching options is welcome)</li>
<li>free for commercial projects</li>
<li>dynamic addition/deletion</li>
<li>refresh option</li>
</ol>
<p>Finally the <strong>main requirement</strong> is searching, sorting,pagination all needs to happen client side. No server interaction needed.</p>
<p>One more thing dont know if possible say i have 1000 records i want 100 to show up initially in 10 pages (i.e 10 each in 10 pages) only when user clicks on page 11 it fetches next 10 from server </p>
<p>Thanks </p>
|
javascript jquery
|
[3, 5]
|
3,866,207 | 3,866,208 |
frame by frame caching
|
<p>How to cache multiple videos frame by frame</p>
|
java javascript c++
|
[1, 3, 6]
|
4,761,434 | 4,761,435 |
How to generate a view id in code?
|
<p>I need to create some views in code and want to assign an id for the view. How can I generate a view id that is guaranteed to be unique among the rest of the view ids but do this at runtime? </p>
|
java android
|
[1, 4]
|
3,400,027 | 3,400,028 |
Login control with jqueryui
|
<p>I'm using the default login control for asp.net, I would like to replace that with a button that will bring up the jquery dialog and display the login panel within that dialog box.</p>
|
asp.net jquery
|
[9, 5]
|
3,017,620 | 3,017,621 |
How can I bind a JQuery event to make it only fire once?
|
<p>I have a help popup that I want to close when somewhere else is clicked. Here's what I have:</p>
<pre><code>$('.help[data-info]').click(function(){
$('.info[a complicated selector]').toggle(400);
$('*:not(.info[the complicated selector]).one('click','',function(){
.info[the complicated selector].hide(400);
});
})
</code></pre>
<p>But one() isn't what I want before it fires for each element on the page. I only want it to fire once.</p>
|
javascript jquery
|
[3, 5]
|
5,331,053 | 5,331,054 |
Using vosao with Android
|
<p>I am in a bit of a pickle, I need to use vosao with an Android application but I have no idea how to authenticate and use it, I have got the JSON-RPC part working by telling me if the username and password is correct but I don't know what to do from here</p>
<p>Vosao is a CMS for Google App Engine. </p>
|
java android
|
[1, 4]
|
2,118,417 | 2,118,418 |
.replace() not working to remove <strong> tags
|
<p>Hi I am using jquery to get the html content of a div, remove the strong tags and then update the div with the new contents though. It isn't working for some reason though. Here is my code:</p>
<pre><code>var content = $('#mydivid').html();
content = content.replace('<strong>', '').replace('</strong>', '');
$('#mydivid').html(content);
</code></pre>
<p>Anyone know why this isnt working?</p>
|
javascript jquery
|
[3, 5]
|
4,545,932 | 4,545,933 |
jQuery: Uncheck JavaScript generated page elements
|
<p>I'm having trouble manipulating JavaScript generated html elements. Depending on user input - a list of checkboxes gets generated via JavaScript, which the user can then uncheck with one click. Here's the generated code:</p>
<pre><code><ul>
<li><input name="fruit" id="apple" type="checkbox" checked="checked"></li>
<li><input name="fruit" id="orange" type="checkbox" checked="checked"></li>
<li><input name="fruit" id="mango" type="checkbox" checked="checked"></li>
</ul>
</code></pre>
<p>To clear everything out I have,</p>
<pre><code><a id="clear" href="#">Clear Fruit</a>
</code></pre>
<p>I tried going off the name attribute but it looks like jQuery can't see the generated elements after the fact. What's the best way to grab the list and go through the items to uncheck the boxes?</p>
|
javascript jquery
|
[3, 5]
|
2,471,350 | 2,471,351 |
Using FileDescriptor with HTTP URLs in Android?
|
<p>I was hoping this was going to work for getting Android's MediaPlayer to stream from a URL using authentication, but now I'm not so sure. I have no problem getting it to stream from an open server (no authentication) but I don't see any way to tell MediaPlayer to use basic authentication unless perhaps using the FileDescriptor argument works? So I tried this but got the following error:</p>
<pre><code>IllegalArgumentException: Expected file scheme in URI http://www.myserver.com/music.mp3
</code></pre>
<p>My code looks something like this:</p>
<pre><code>File f = new File(new URL("http://www.myserver.com/music.mp3").toURI());
FileInputStream fis = new FileInputStream(f);
mediaplayer.SetDataSource(fis.getFD());
</code></pre>
<p>Is it correct to say that a FileDescriptor can only be used with local <code>file://</code> URLs and not normal <code>http://</code> URLs? If so, does anyone have any other ideas on how to stream from a server that requires authentication using Android's MediaPlayer?</p>
|
java android
|
[1, 4]
|
2,583,895 | 2,583,896 |
About inserting record into dynamically created gridview in asp.net c#
|
<p>I have created gridview dynamically on click event of button.I have 4 fields per row(First name,last name, relation,DOB) with link button for add(lnkadd).I used Itemtemplate, edittemplate, EditItemTemplate, FooterTemplate to design gridview.
I used function to add rows to gridview in lnkadd click event as follows:</p>
<pre><code> tabemp = (DataTable)Session["tabempsession"];
if (tabemp.Rows.Count == 1)
{
if (Convert.ToString(tabemp.Rows[0].ItemArray.GetValue(0)) == "")
{
tabemp.Rows.Clear();
}
}
DataRow drow = tabemp.NewRow();
//create new veriable of(textbox,dropdownlist etc) in ItemTemplate in grid view
TextBox txtFName1 = (TextBox)mygridview.FooterRow.FindControl("txtFName1");
TextBox txtLName1 = (TextBox)mygridview.FooterRow.FindControl("txtLName1");
DropDownList ddlRelation = (DropDownList)mygridview.FooterRow.FindControl("ddlRelation");
TextBox txtDOB = (TextBox)mygridview.FooterRow.FindControl("txtDOB");
//insert values into rows in tabemp table
drow[0] = txtFName1.Text;
drow[1] = txtLName1.Text;
drow[2] = ddlRelation.SelectedItem.Text;
drow[3] = txtDOB.Text;
tabemp.Rows.Add(drow);
Session["tabempsession"] = tabemp;
//int f = tabemp.Rows.Count;
mygridview.DataSource = (DataTable)Session["tabempsession"];
mygridview.DataBind();
</code></pre>
<p>But i am not getting textbox values .ie(txtFName1.Text), its getting as null. Please give me suggestion for getting values of all controls inside gridview.
Asp.net C#
Thank you. </p>
|
c# asp.net
|
[0, 9]
|
2,430,532 | 2,430,533 |
Need help with logic on how to assign the correct value to a textbox
|
<p>I am passing in a value to the form that I ultimately assign to a textbox using javascript. The value is a calculation based on values from another page/form. However, the textbox is editable. </p>
<p>When reloading the form with the previously saved data, I don't want the value of the textbox to be overwritten with the pre-calculated value from another page if it was edited manually upon save.</p>
<p>The other stipulation is, the page/form that has the values that the calculation is created from, can be changed. Therefore, I would also want to check to see if the calculated value has changed since last load, and if so, load that over the manually entered value.</p>
<p>So...
If textbox is blank populate with calculated value
else if
Manually entered value trumps calculated value
else if
calculated value has changed since last calculation, it trumps manually entered value.</p>
<p>The other concern with this all, is how do I determine if the user has typed in the textbox to determine if the value was manually entered?</p>
|
javascript asp.net jquery c++
|
[3, 9, 5, 6]
|
2,861,945 | 2,861,946 |
Auto Refresh Without Effecting Scrolling
|
<p>I have a auto chat section where I have to get the scrollbar of chat to the bottom. Like this:</p>
<pre><code>function chatuser(user1) {
$("#currentuser").load('chatcontent.php', {
current: user1
}, function afterchatuser() {
$("#currentcontent").attr({
scrollTop: $("#currentcontent").attr("scrollHeight")
});
});
}
<div id="currentuser"></div>
</code></pre>
<p>For the auto update I automatically refresh the function. Like this:</p>
<pre><code>var auto_refresh = setInterval(function chatauto() {
chatuser(user1);
}, 2000);
</code></pre>
<p>But every time it refreshes where ever the scrollbar is,it gets to the bottom. Like if the user scrolls to the top, after the refresh it automatically gets the scrollbar to the bottom. I want to stop this, but also it should get refreshed timely. Please help me.</p>
|
javascript jquery
|
[3, 5]
|
5,533,782 | 5,533,783 |
jquery timer doesnt show div that is clicked instead it navigates to div based on timer
|
<p>I am toggling each 4 divs for 10 seconds using this jQuery function based on <code>a href id</code> value. </p>
<p>The timer works fine and it changes 4 divs for every 10 seconds but when user clicks a particular div it doesn't navigate to particular div and stays there for a given period(ex 10 sec) and proceeds to next div from current div instead of that it goes to div based on timer value.</p>
<p>Can anyone help me regarding this? </p>
<pre><code>$(function() {
$("a.menu").click(function() {
$("div.featuredposts_content").hide();
$($(this).attr('href')).show();
return false;
});
});
$(function() {
var counter = 0,
divs = $('#cat1, #cat2, #cat3,#cat4');
function showDiv() {
divs.hide() // hide all divs
.filter(function(index) {
return index == counter % 4;
}) // figure out correct div to show
.show('fast'); // and show it
counter++;
}; // function to loop through divs and show correct div
showDiv(); // show first div
setInterval(function() {
showDiv(); // show next div
}, 15 * 1000); // do this every 10 seconds
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,254,748 | 4,254,749 |
unwanted spaces when animating after changing css
|
<p>Im getting spaces between my div.container elements as soon as I changed the parent div to position relative and it needs to be relative is there a way to fix this. here is my jsFiddle example <a href="http://jsfiddle.net/3wpfE/3/" rel="nofollow">jsFiddle</a></p>
|
javascript jquery
|
[3, 5]
|
864,667 | 864,668 |
Logical problem,seeking an algorithm
|
<p><br>
I am developing a javascript filtering of some results and have some difficulties..<br>
Here is the problem...<br>
Suppose that we have some criteria </p>
<ol>
<li>Manufacter (Trusardi, Calvin Kein, Armani...) </li>
<li>Color (red, blue, black...)</li>
<li>OtherFeatures (goretex, blah, blah...) </li>
</ol>
<p>Each feature is displayed as a checkbox...<br>
The problem is that i want to disable the checkboxes if its selection would lead to no results..For example Armani's products may have color blue only so checking armani should disable the black and red,but other manufactors shouldnt be disabled... as checking them should provide a result...<br>
Here is the code so far </p>
<pre><code>results = $("#products li");
results.hide();
var filtersGroup = $("#filters li.filtersGroup");
$("#filters li.filtersGroup a").removeClass("disabled");
filtersGroup.each(function(index) {
var classes = "";
$(this).find("a.checked").each(function(index) {
classes = classes + "." + $(this).attr("id") + ",";
});
if (classes == "") return true;
results = results.filter(classes.substr(0, classes.length - 1));
//periorismos
filtersGroup.not($(this)).each(function(index) {
$(this).find("a").each(function(index) {
if (results.filter("." + $(this).attr("id")).length <= 0) {
$(this).removeClass("checked").addClass("disabled");
}
});
});
});
</code></pre>
<p>Although it filters them successfully ,the disabling isnt always correct. for example to reproduce the problem ,if you choose all the manufactors and then choose a color manufactors would be disabled but colors not at the first time..<br>
One solution i figured is to create multiple results which would simulate all the next possible check.(if 16 features and 4 checked means 12 possible other checked ..<br>
But i think that this approach sucks... Any other idea?</p>
|
javascript jquery
|
[3, 5]
|
1,580,899 | 1,580,900 |
How to setTimeout() with a jQuery function?
|
<p><code>setTimeout(target.mousedown, 200)</code> doesn't seem to work. I can do <code>setTimeout("target.mousedown()", 200)</code>, but this feels dirty.</p>
<p>What's the right way to do this?</p>
|
javascript jquery
|
[3, 5]
|
251,800 | 251,801 |
interpolate function need
|
<p>I need an javascript function that can do interpolate like the one for prototype js framework. Anyone have an interpolate function that is not depend on prototype? Jquery is welcome. Thanks.</p>
|
javascript jquery
|
[3, 5]
|
2,743,341 | 2,743,342 |
Create new cookie to edit its value
|
<p>I know that you can't edit incoming cookies. I have a cookie that I just need to read..nothing more but I have a need to remove some characters from its value so that I can parse it. How can I do this? I don't need to send the modified new cookie back in the response, it's just for my server-side consumption and then that's it.</p>
<p>Updated:</p>
<p>figured it out:</p>
<pre><code> HttpCookie facebookAuthCookie = HttpContext.Current.Request.Cookies[facebookCookieName];
string cleanValue = facebookAuthCookie.Value.Replace("\"", string.Empty);
HttpCookie cleanedFacebookAuthCookie = new HttpCookie("cleanedFacebookCookie", cleanValue);
</code></pre>
<p>gayness</p>
|
c# asp.net
|
[0, 9]
|
536,556 | 536,557 |
save and retrieve values within web app
|
<p>I have a simple web app built in asp.net webforms c#</p>
<p>where and how would be the best way to save info from the code behind?
(and also retrieve that info)</p>
<p>eg all i want to save is a dateTime. and a flag set to True or False.
and be able to access them in the code behind.</p>
<p>Im not using a db for this web app.</p>
<p>Edit: and can't really use session variables for this purpose.</p>
<p>thanks</p>
|
c# asp.net
|
[0, 9]
|
365,753 | 365,754 |
jQuery error callback on ajax call if server is down
|
<p>I am using jQuery and I am making AJAX request from the many methods available to me. I am testing error callback condition and so far so good.</p>
<p>If I bring the server down then firebug shows the request in RED which means it was an error. However error callback is not getting called. Is this expected ? Or should jQuery's error callback should be invoked when server is disconnected.</p>
<p>If the expected behavior is that jQuery's error callback will not be called then how will you notify users that server is down?</p>
|
javascript jquery
|
[3, 5]
|
2,735,890 | 2,735,891 |
How do I get values of input element with the same name as an javascript array?
|
<p>I want to get values of the input element that those elements are under the same name, name="items[]"<br/>
for example:<br/></p>
<pre><code><div>...<input type="text" name="items[]" value="1" /></div>
<div>...<input type="text" name="items[]" value="2" /></div>
<div>...<input type="text" name="items[]" value="3" /></div>
</code></pre>
<p>And I wish to get the result something like:</p>
<pre><code>[1, 2, 3] //that store in an javascript variable.
</code></pre>
<p>Do I need to do a loop to access all the elements to get its value?
Please give me a good solution either javascript or JQuery.<br/>
Thanks</p>
|
javascript jquery
|
[3, 5]
|
4,478,151 | 4,478,152 |
Toast with image backgroung
|
<p>I have this simple code that brings me a toast with an image. Is it possible to have the background that the regular toast uses on this toast?</p>
<p>Thx in advance</p>
<pre><code> Toast ImageToast = new Toast(getBaseContext());
LinearLayout toastLayout = new LinearLayout(getBaseContext());
toastLayout.setOrientation(LinearLayout.HORIZONTAL);
ImageView image = new ImageView(getBaseContext());
TextView text = new TextView(getBaseContext());
image.setImageResource(R.drawable.smile);
text.setTextSize(30);
text.setText("Show this text");
toastLayout.addView(image);
toastLayout.addView(text);
ImageToast.setView(toastLayout);
ImageToast.setDuration(Toast.LENGTH_LONG);
ImageToast.show();
</code></pre>
|
java android
|
[1, 4]
|
360,311 | 360,312 |
IF container "x" does not contain div "n"? JS
|
<p>I was wondering if its possible to make an <code>IF</code> statement, where if a container (parent div) contains/does not contain a certain div....</p>
<pre><code><div class="parent" id="x">need to check if div id "n" is here....</div>
</code></pre>
<p>So, <code>IF</code> the parent container ("<code>x</code>") does not contain the div "<code>n</code>", then insert it (which I already know how to do).</p>
<p>Is the above even possible to achieve? </p>
<p>JS and JQuery can be used by the way..</p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
732,222 | 732,223 |
Drawing Customized Products based on user selection PHP
|
<p>Can anybody knows from where I can get the script to create Customized products (shirts in my case) on the basis of user selection (eg like fabric, collar, cuff, buttons, shoulders) . Example of Live site is : <a href="http://www.blanklabel.com" rel="nofollow">http://www.blanklabel.com</a>.</p>
|
php jquery
|
[2, 5]
|
1,034,808 | 1,034,809 |
Need a sample on how to connect to a different system from the WEB application which is in the network?
|
<p>I developed an Web application which reads some data from the files from different systems in the network.As its a web application it can be used any where in the network ,,,,so my question is how do i connect to a different system by entering an ipaddress or systemname which are in the network.</p>
<p>currently i am able to connect to a different system/machine by changing the value in my web.config file manually(which is not a good practice).</p>
<p>Is there any generic idea on which i can follow to achieve what i am expecting rather than changing the web.config file.</p>
|
c# asp.net
|
[0, 9]
|
3,320,951 | 3,320,952 |
Window.location.href not works when url has # symbol in it
|
<p>I have a popup call which takes the user credentials and login the user. Usully user would like to same page after login also. That's way I want to refresh the current page. I am using</p>
<pre><code> window.location.href="currentrul";
</code></pre>
<p>This works just fine when we don't have # symbol in url. Let's say my URL is something like <a href="http://www.test.com/faq#shipping" rel="nofollow">http://www.test.com/faq#shipping</a>, it won't works. Any suggestions are appreciable.</p>
<p>Thanks in advance </p>
|
javascript jquery
|
[3, 5]
|
1,292,198 | 1,292,199 |
array empty on jquery?
|
<p>I'm trying to learn on making my first dynamic loader from scratch with jQuery (for learning purpose) here is where I got stuck:</p>
<pre><code><script type="text/javascript">
jQuery.learningdynamicloader= function(){
var js = [];
var css = [];
console.log(js,css);
};
</script>
<script>
$(document).ready(function() {
$.learningdynamicloader(function(){
js = ['jquery','test'];
css = ['css','test'];
});
});
</script>
</code></pre>
<p>My firebug log <code>js</code> and <code>css</code> returns nothing, it seems that there is a problem. After I Google is there any diffrence between <code>js = ['values']</code> and <code>js : ['values']</code> ? </p>
<p>Thanks for looking.</p>
|
javascript jquery
|
[3, 5]
|
3,938,876 | 3,938,877 |
Opera redirect problem
|
<p>Hi everyone i have a problem like this.</p>
<p>For example im in <a href="http://localhost/Search.aspx" rel="nofollow">http://localhost/Search.aspx</a>
I have 2 textboxes (txtUserName and txtPassword) in my page for login.
user can press enter key to call Login() method when any of these textboxes focused.
I capture enter key like this</p>
<pre><code>txtUserName.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {Login();return false;}} else {return true}; ");
txtPassword.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {Login();return false;}} else {return true}; ");
</code></pre>
<p>Its calling the Login() method, and After doing that method Opera redirects the page to my default page (http://localhost/Default.aspx)</p>
<p>Other browsers is working as it should, in other words they are not redirect me to the default page.</p>
<p>Opera version 10.61</p>
|
javascript asp.net
|
[3, 9]
|
1,053,184 | 1,053,185 |
How to generate numbers within a starting and ending range?
|
<p>I have a starting range and ending range, and I need to be able to generate numbers withing this range, and increment the returned number by the start range + 1 every time, but never generate the same number twice.</p>
<p>Not sure how to do this with C#, any help would be great.</p>
|
c# asp.net
|
[0, 9]
|
5,042,297 | 5,042,298 |
I have a table that is based on two foreign keys
|
<p>I have a table that is based on two foreign keys. One is <code>memberID</code>, and the second is <code>movieID</code>. I need to take from this table the row that connects these two and get from the same row <code>RentDays</code>, which is an <code>int</code>.</p>
<p>i did this but i think its not good:</p>
<pre><code>public int GetRentDays(int memberID, string movieID)
{
var movieRentDays =
from Rents in videoLibDB.Rents
where Rents.MemberID == memberID && Rents.MovieID == movieID
select Rents.RentDays;
return movieRentDays ;
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
5,876,517 | 5,876,518 |
Looking for a good name for interface with inUse() method
|
<p>How would you name an interface which provides 1 method inUse()?</p>
|
c# java
|
[0, 1]
|
1,453,161 | 1,453,162 |
Problem with Generate Local Resource and My simple custom control
|
<p>I have created simple controls that are based on dot net controls . For example there is a simple GridView control that is based on dot net GridView control , I just set some setting in my control to use it in my .aspx pages , for example I set the Width of GridView in the constructor method : </p>
<pre><code>// constructor of my custom class
public GridView(): base()
{
this.Width = new Unit(100, UnitType.Percentage);
}
</code></pre>
<p>and also I've added some custom properties :</p>
<pre><code> public int SelectedID
{
get
{
if (ViewState["SelectedID" + this.ID] == null)
ViewState["SelectedID" + this.ID] = "-1";
return Convert.ToInt32(ViewState["SelectedID" + this.ID]);
}
set
{
ViewState["SelectedID" + this.ID] = value;
}
}
</code></pre>
<p>The <strong>*<em>Problem</em>*</strong> : when I use Tools>Generate Local Resource in VS2010</p>
<p>the aspx markup before I use this tool is like this : </p>
<pre><code><RPC:GridView ID="grdData" runat="server" onrowcommand="grdData_RowCommand">
</code></pre>
<p>but this tool adds any public property or any setting to my aspx markup , like this :</p>
<pre><code><RPC:GridView ID="grdData" runat="server" onrowcommand="grdData_RowCommand"
meta:resourcekey="grdDataResource1" SelectedID="-1" Width="100%">
</code></pre>
<p>I don't like VS2010 add my settings (like width) and my custom properties (like SelectedID) to aspx markup , this prevent me having the ability of changing my custom control code and reflect changes in all aspx pages that include this control , for example if</p>
<p>I change the width of my control to 50% , it doesn't reflect to any pages</p>
<p>Please tell me what should I do to fix my problem</p>
<p>Thank you very much for your feedbacks </p>
|
c# asp.net
|
[0, 9]
|
528,366 | 528,367 |
Jquery change prev() input field
|
<p>Ok so i am trying to change the value of an input field by using jquery's prev() function. I have a text field with some links after it. When someone clicks on the link i want it to change the previous </p>
<pre><code><label>
<input type="text"/>
</label>
<ul>
<li onclick="field('name1','value1');"><a href="#">link1</a></li>
<li onclick="field('name2','value2');"><a href="#">link2</a></li>
</ul>
<script type="text/javascript">
function field($name,$value){
$(this).prev("input").attr('name','$name');
$(this).prev("input").attr('value','$value');
}
</script>
</code></pre>
<p>i think you can see what i am trying to do. I want them person to click a link and it change the value and name attributes of the text field and obviously display the new value inside the the text box. I want to use "this" so that i can use this anywhere instead of specifying a id or class. I think im close but haven't gotten it to work yet. Am i using the correct jquery script or should i be using something different? Thanks.</p>
|
javascript jquery
|
[3, 5]
|
3,504,909 | 3,504,910 |
Text labels in textbox being passed onsubmit
|
<p>I found this useful little method of displaying field titles within the text fields themselves.</p>
<p><a href="http://viralpatel.net/blogs/2009/09/default-text-label-textbox-javascript-jquery.html" rel="nofollow">http://viralpatel.net/blogs/2009/09/default-text-label-textbox-javascript-jquery.html</a> </p>
<p>Only problem is that if the fields aren't completed by the user then the title values get submitted.</p>
<p>Could anyone tell me how to add a onsubmit check to make sure we don't submit default text?</p>
<p>This is the javascript:</p>
<pre><code>$('input[type="text"]').each(function () {
this.value = $(this).attr('title');
$(this).addClass('text-label');
$(this).focus(function () {
if (this.value == $(this).attr('title')) {
this.value = '';
$(this).removeClass('text-label');
}
});
$(this).blur(function () {
if (this.value == '') {
this.value = $(this).attr('title');
$(this).addClass('text-label');
}
});
});
</code></pre>
<p>Many thanks...</p>
|
javascript jquery
|
[3, 5]
|
513,008 | 513,009 |
Items Compare Page ASP.NET C#
|
<p>I want to create an items compare page just like this:
<a href="http://www.autotrader.com/fyc/compare.jsp?sownerid=855612&end_year=2014&start_year=1981&keywordsfyc=&search_type=both&scarid=326877152&distance=10&default_sort=priceDESC&address=11413&sort_type=priceDESC&firstRecord=1&num_records=25&seller_type=b&keywords_display=&compare=305557040&compare=319902555&compare=337325579" rel="nofollow">http://www.autotrader.com/fyc/compare.jsp?sownerid=855612&end_year=2014&start_year=1981&keywordsfyc=&search_type=both&scarid=326877152&distance=10&default_sort=priceDESC&address=11413&sort_type=priceDESC&firstRecord=1&num_records=25&seller_type=b&keywords_display=&compare=305557040&compare=319902555&compare=337325579</a></p>
<p>(this is a compare page from autotraders.com)</p>
<p>I have been searching fourms for a week now , trying all possible solutions, some say use GridView, some say use ListView, I tried many things, custom div css as well, but couldn't do it.
Basically, I want to show vertical rows (side by side rows) instead of default horizontal rows.
Appreciate any help.</p>
|
c# asp.net
|
[0, 9]
|
4,297,806 | 4,297,807 |
How can i localize the url for a sitemap?
|
<p>I have 2 links, one english one spanish. is there anyway i can localize that in .net? I was thinking of using sitemap</p>
|
c# asp.net
|
[0, 9]
|
5,142,684 | 5,142,685 |
Variable in JSON path
|
<p>I would like to make the path to data contained in JSON variable.
The code I have now looks like this:</p>
<pre><code>function writeDB(block)
{
$.getJSON('js/data.js', function(data) {
if (block == "path1") { var adr = data.test.path1.db; };
if (block == "path2") { var adr = data.test.path2.db; };
if (block == "path3") { var adr = data.test.path3.db; };
var datastring="";
$.each(adr, function(i, field){
temp = encodeURIComponent($("#writeDB_"+block+" [name="+adr[i].abc+"]").val());
datastring += adr[i].abc+"="+temp+"&";
});
});
}
</code></pre>
<p>The "if" parts I would like to simplify and make it variable, by using the variable 'block' directly into the "adr" path, something like this</p>
<pre><code>var adr = "data.test."+block+".db";
</code></pre>
<p>But a string won't work, so its useless. Someone knows how I can fix that?</p>
|
javascript jquery
|
[3, 5]
|
3,497,077 | 3,497,078 |
What PDF library should I use for Android?
|
<p>I have been developing Android application, and I need to read PDF-files in my app. There are some requirements for lib:</p>
<ul>
<li><p>will the solution be able to read fairly large files? Like if the file is much larger than available memory, would it be able to read piece by piece as the user browses?</p></li>
<li><p>will in the future this module be able to read from a stream not just from a file?</p></li>
<li><p>will the solution, with this or future project/effort be able to re-flow text - to accommodate different screen sizes?</p></li>
<li><p>what version of the PDF format (up to) will it be able to read.</p></li>
</ul>
<p>Please, recommend me some library. </p>
|
java android
|
[1, 4]
|
2,476,837 | 2,476,838 |
Extend Android virtual keyboard
|
<p>i'm thinking in something a la Appstore's Textsastic, this is, a full row of needed keys (parenthesis, slash, etc) right above the virtual keyboard, like it was an extention of it.</p>
<p>How can i accomplish something like that in Android?
Is there at least a way to have a listener when the virtual keyboard shows?</p>
|
java android
|
[1, 4]
|
3,375,642 | 3,375,643 |
ASP.Net - Link button not rendering proper html on Chrome and Mozilla
|
<p>I have link button on my page which working fine on IE but is not working on Chrome and Mozilla. When I dig into , i found that its rendering html is this </p>
<pre><code><div >
<a id="ContentPlaceHolder1_Register"
href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions
(&quot;ctl00$ContentPlaceHolder1$Register&quot;, &quot; &quot;, true,
&quot;grpReg&quot;, &quot;&quot;, false, true))" >Register</a>
</div>
</code></pre>
<p>If we see we have <code>&quot;</code> inside our method, which is creating issue. So please help me in resolving this issue</p>
<p>TIA</p>
<p>Amit</p>
|
c# asp.net
|
[0, 9]
|
789,418 | 789,419 |
How to use local variable of a function in different page, Vs 2005, asp.net
|
<p>How to use a local variable of a function of a control in a different page in Asp.net.</p>
<p>I am new, please help me out! </p>
<p>Thanks!</p>
|
c# asp.net
|
[0, 9]
|
4,769,640 | 4,769,641 |
Help making a "launcher screen" for my app, and making it look right across devices
|
<p>I posted a question here before: <a href="http://stackoverflow.com/questions/6539578/good-way-to-make-a-launcher-screen-for-sub-apps-within-your-app">Good way to make a launcher screen for sub-apps within your app?</a>, and then started working on other parts of the app, and now I'm back to the same thing. </p>
<p>I want to make a nice screen with icons that the user can press, with room for more icons at a later date. Or maybe something different, I'm not sure. </p>
<p>Here's a current screenshot of what it looks like:<img src="http://i.stack.imgur.com/Ph0dn.png" alt="enter image description here"></p>
<p>It looks pretty bad there, on my phone it looks better, with less space between the apps (this is a friend's phone), but ideally I want it to look good on all devices. </p>
<p>My XML code for this is as follows: </p>
<pre><code> <?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
android:horizontalSpacing="20dp"
android:columnWidth="90dp"
android:stretchMode="columnWidth"
android:gravity="center"
android:background="#FF6699FF"
/>
</code></pre>
<p>Any tips/suggestions are appreciated, I want to make this look good.
I'm not sure what format to store the icons in, right now they're just large (400x400 or so) png files. </p>
|
java android
|
[1, 4]
|
106,787 | 106,788 |
jQuery error: SyntaxError: missing : after property id
|
<p>I have some jQuery in my page that keeps giving the error:</p>
<pre><code>SyntaxError: missing : after property id
</code></pre>
<p>In this code.</p>
<pre><code> $(document).scroll(function(){
var t1 = $("#main-page").offset().top;
if($(this).scrollTop() >= t1) {
$('#menu-item-70').css({"background-color: #fff"});
}
});
</code></pre>
<p>Firebug says it is on this line: <code>$('#menu-item-70').css({"background-color: #fff"});</code></p>
<p>I can't seem to find why it is giving this error.</p>
<p>Any ideas?</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
1,539,117 | 1,539,118 |
JavaScript execution order - run this(), then that() when this() has finished?
|
<p>If for example, I have some jQuery doing something simple like:</p>
<pre><code>$("div").fadeIn('fast');
$("div").html('Foo');
</code></pre>
<p>That would fade in the div, and set its html to "Foo" whilst it's still fading in, whereas:</p>
<pre><code>$("div").fadeIn('fast',function(){
$("div").html('Foo');
});
</code></pre>
<p>Will only set the html to "Foo" after the div has completed fading in.</p>
<p>Is this sort of thing the way JavaScript works in general? So if I had:</p>
<pre><code>//do something
var i = 42;
var foo = i/1;
//do something else
var bar = fooBar();
</code></pre>
<p>Will it start doing something else whilst it's still doing something, or will it wait patiently for do something to finish before it does something else?</p>
|
javascript jquery
|
[3, 5]
|
678,769 | 678,770 |
bitly function returning undefined
|
<p>I've got a basic function that I'm trying to return a shorten url from bit.ly. My username and api_key have just been removed for this post but they've been tested and I'm getting a correct response with them. We've also checked and we are geting a JSON response with the correct data. </p>
<p>The problem I'm having is that I want this function to be something that we can call at different points on the site to shorten links that will be included in part of a Tweet. So the idea was just to write a function that we could call in time because we specifically know were something will be tweeted from and need to call the url of the page dynamically.</p>
<p>When the url is passed to the function we are getting undefined as the returned value. Here the function:</p>
<pre><code> var UrltoShorten = 'http://google.com',
bitly = shortenUrl(UrltoShorten);
function shortenUrl(longUrl) {
var username = 'removed',
key = 'removed';
$.ajax({
url: 'http://api.bit.ly/v3/shorten',
data: {
longUrl: longUrl,
apiKey: key,
login: username
},
dataType: 'jsonp',
success: function (v) {
var shortUrl = v.data.url;
return shortUrl;
//console.log(shortUrl); // Will return shorten Url
}
});
}
console.log(bitly); // Returns undefined
</code></pre>
<p>In our testing we've found that console.logging the value inside of the success function returns the shortened URL every time. Console.logging the value outside of the shortenUrl function returns undefined every time. </p>
<p>Is there a reason we can't get the correct value out side of the function?</p>
|
javascript jquery
|
[3, 5]
|
4,828,054 | 4,828,055 |
Replacing occurence of character in a string with jquery
|
<p>I need to replace occurrence of very <code>\</code> with <code>-</code> in a string. I am using the following code but it replace only for once occruence:</p>
<pre><code>var start = '1/1/12';
startNew = start.replace('/', "-");
</code></pre>
<p>Result i am getting is: <code>1-1/12</code></p>
<p>Result i want is: <code>1-1-12</code></p>
|
javascript jquery
|
[3, 5]
|
5,469,275 | 5,469,276 |
After clicking the nth item, how do I manipulate another nth element?
|
<p>I'm using jQuery and wanting to target the nth <li> in a list after clicking the nth link.</p>
<pre><code><ul id="targetedArea">
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<div id="clickedItems">
<a></a>
<a></a>
<a></a>
<a></a>
</div>
</code></pre>
<p>I can target them individually, but I know there must be a faster way by passing which <a> element I clicked on.</p>
<pre><code>$("#clickedItem a:eq(2)").click(function() {
$("#targetedArea:eq(2)").addClass('active');
return false;
});
</code></pre>
<p>Cheers,<br />
Steve </p>
|
javascript jquery
|
[3, 5]
|
1,079,451 | 1,079,452 |
how to return a .htm page as a view from controller action
|
<p>in my .aspx page i have something like this:</p>
<pre><code> <select id="seltemp" onchange="calltemp()">
<option value="0" selected="selected">Select Template</option>
<option value="1">Template1</option>
<option value="2">Template2</option>
<option value="3">Template3</option>
<option value="4">Html Template</option>
</select>
<script type="text/javascript">
function calltemp() {
document.getElementById('datashow').innerHTML = "";
var id = (document.getElementById('seltemp').value);
if (id != 0) {debugger;
$.get("/Templates/Select/" + id + "/", function(result) {
$("#Renderthisdiv").html(result);
});
}
}
</script>
</code></pre>
<p>and in TemplatesController</p>
<pre><code>public ActionResult Select(int id)
{
......
......
return View("/Views/Templates/Temp1.htm");
}
</code></pre>
<p>please help me to render Temp1.htm page into "Renderthisdiv" div</p>
|
asp.net jquery
|
[9, 5]
|
2,493,379 | 2,493,380 |
jquery v javascript
|
<p>I have a function which I need to appear within a jQuery <code>$(document).ready(function() {}</code> - I am <a href="http://www.thefreedictionary.com/au+fait" rel="nofollow">au fait</a> with javascript but not really worked with jQuery. How can I jQuerify this function?</p>
<pre><code>function populateContext()
{
contextTxtBox = document.getElementById('searchContext');
pathArr = window.location.pathname.split( '/' );
contextTxtBox.value = pathArr[1].toUpperCase();
};
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,875,316 | 1,875,317 |
Scroll position in Sharepoint 2010?
|
<p>Do you know a way to find out a scroll position in JS or jQuery on a page in Sharepoint 2010? I have a web part that is very big (high) so scroll on the page appears. But I cannot determine the scroll position in any known way using javascript - it is always 0 </p>
<pre><code>self.pageYOffset;
document.documentElement.scrollTop;
document.body.scrollTop;
</code></pre>
<p>all return 0. I cannot get through this. I think sharepoint is to blame. Is there any way to find out?</p>
|
javascript jquery
|
[3, 5]
|
784,505 | 784,506 |
pass post data with window.location.href
|
<p>When using window.location.href, I'd like to pass POST data to the new page I'm opening. is this possible using JavaScript and jQuery?</p>
|
javascript jquery
|
[3, 5]
|
3,538,881 | 3,538,882 |
ASP.NET Img tag
|
<p>I have a problem with how ASP.Net generates the <strong>img</strong> tag.
I have a server control like this: </p>
<pre><code><asp:Image runat="server" ID="someWarning" ImageUrl="~/images/warning.gif" AlternateText="Warning" />
</code></pre>
<p>I expect it to generate this: </p>
<pre><code><img id="ctl00_ContentPlaceHolder1_ctl00_someWarning" src="../images/warning.gif" />
</code></pre>
<p>but instead it generates this:</p>
<pre><code><img alt="" src="/Image.ashx;img=%2fimages%2fwarning.gif"</img>
</code></pre>
<p>This give me errors when I execute the following js:</p>
<pre><code>document.getElementById('ctl00_ContentPlaceHolder1_someWarning')
</code></pre>
<p>Any idea why it won't generate the expected html?</p>
|
asp.net javascript
|
[9, 3]
|
3,990,649 | 3,990,650 |
Get parent formname on child window using jquery?
|
<p>i have below form tag on parent page from which i open a popup. i want to get form Name attribute value(i.e "cust-100" ) on popup screen</p>
<pre><code><form action="/custAction" formName="cust-100">
</code></pre>
<p>i tried below</p>
<p><code>self.opener.document.$('[name="formName"]').val()</code> but it gives error</p>
<pre><code>TypeError: self.opener.document.$ is not a function
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,715,817 | 1,715,818 |
Can scripts in iframe interact with scripts in the main page
|
<p>I have an editor with an SWF multi-image uploader. Since not everyone will need to upload pictures in their article, i need to dynamically load this image uploader when necessary. I have to load it in an iframe because the uploader needs some external scripts to be loaded ahead. And since i need it's callback variable for my editor to use I want to know whether scripts in iframe can interacts with scripts in the main page. Or if i can't do that, what's the alternative way to do this?</p>
|
javascript jquery
|
[3, 5]
|
754,116 | 754,117 |
How to pass commands/scripts to Linux servers from ASP.NET
|
<p>We are trying to pass commands or shell scripts execution to Linux server from ASP.net.</p>
<p>For example, if we pass command <code>ls</code> from ASP.NET to Linux server, then it must provide a list of files present in the respective path to ASP.NET as output.</p>
<p>Can anyone share the idea how we can achieve this?</p>
|
c# asp.net
|
[0, 9]
|
798,040 | 798,041 |
Android Activity with Abstract Base Class throws a compile error "is not abstract and does not overrid abstract method..."
|
<p>I have a base class that extends ListActivity, that I want to use to implement a lot of common code used on multiple different Activity implementations.</p>
<p>I want to make this base class abstract to enforce implementation of a method on the subclasses.</p>
<p>If I write a base implementation of the method, and override it in the subclasses, everything works fine.</p>
<p>If I make the method abstract, I get the following compile error:</p>
<pre><code>XXXX.subapps.athletics.AthleticsNewsActivity is not abstract and does not override abstract method getListItems() in XXXX.subapps.BaseCategoryListActivity
</code></pre>
<p>Base Class:</p>
<pre><code>public abstract class BaseCategoryListActivity extends ListActivity
{
....
abstract ArrayList<String> getListItems();
....
}
</code></pre>
<p>Example subclass:</p>
<pre><code>public class AthleticsNewsActivity extends BaseCategoryListActivity
{
....
public ArrayList<String> getListItems()
{
...implementation details....
}
}
</code></pre>
|
java android
|
[1, 4]
|
609,901 | 609,902 |
Access JavaScript variable from HTML element attribute
|
<p>Is there a way to access a JavaScript variable from an attribute from an HTML element?</p>
<p>For example:</p>
<pre><code><a href="#" id="id1" my-attr="test">click here</a>
<script type="text/javascript">
var test="hello world!";
$("#id1").click(function() { alert($(this).attr('my-attr')) });
</script>
</code></pre>
<p>What I want to happen is the alert to show "hello world!" but obviously instead it shows "test"</p>
<p>I know I can accomplish this if I use eval(), I was just wondering if there was another way. Some type of JavaScript reflection or something?</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
2,778,532 | 2,778,533 |
Pass PHP to Javascript
|
<p>I have a PHP variable I want to add in Javascript, the problem is it's not getting the variable, please help I'm new to javascript. Sorry I think I did not explain very good.</p>
<p>At the moment I have three select boxes displaying Year, month, date the value of $row_info['birth'] is 2011-04-01. When I apply date to defaultDate: the value is not in there. </p>
<pre><code><?php
$date = $row_info['birth'];
echo("<script type='text/javascript'>\n");
echo("date = '{$row_info['birth']}';\n");
echo("</script>");
?>
<script type="text/javascript">
$(document).ready(function(){
$("#picker3").birthdaypicker({
dateFormat: "bigEndian",
monthFormat: "short",
placeholder: false,
defaultDate: date,
hiddenDate: true
});
});
</script>
</code></pre>
<p>I would really appreciate some help, thanks</p>
|
php javascript
|
[2, 3]
|
5,626,212 | 5,626,213 |
Jquery toggle won't work after cloning
|
<p>I have cloned a list item using .clone in Jquery:</p>
<pre><code> $("#coll-selected-list li:contains(" + itemName + ")").clone().addClass("avgli").appendTo("#coll-grouped-list");
</code></pre>
<p>However, when I wish to toggle the newly added list item, it won't work for some reason. Any ideas?:</p>
<pre><code>$(document).ready(function () {
$(".avgli").toggle(function () {
if ($(this).parent().hasClass('agg-drop')) {
$(this).css("background", "#fff");
}
}, function () {
if ($(this).parent().hasClass('agg-drop')) {
$(this).css("background", "#676767");
}
}););
<ul id="coll-grouped-list" class="agg-drop">
<li class="sortedli avgli" style="">Blah Blah</li>
<li class="sortedli avgli" style="">Blah</li>
</ul>
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,103,852 | 3,103,853 |
Having duplicate values in DropDownList selection cause mismatch selection
|
<p>I have a <code>DropDownList</code>, which is bound to the database. The values in the <code>DropDownList</code> list may be something like:</p>
<blockquote>
<p>Bedroom1<br>
Bedroom2<br>
Kitchen1<br>
Kitchen2 </p>
</blockquote>
<p>When these items are list in <code>DropDownList</code>, having selected "Bedroom2", selects "Bedroom1" itself, but having selected "Kitchen2", selects "Kitchen1". </p>
<p>This <code>DropDownList</code> is further bound to another <code>DropDownList</code>. I have set AutoPostBack for both the <code>DropDownList</code>s. I have bound the datasource from code behind. </p>
<p>What might have gone wrong?</p>
<p>Databinding code:</p>
<pre><code>SqlDataAdapter myda = new SqlDataAdapter("Select * FROM " + Label3.Text, con);
DataSet ds = new DataSet();
myda.Fill(ds, "Table");
LOC_LIST2.DataSource = ds.Tables[0];
LOC_LIST2.DataTextField = ds.Tables[0].Columns["Location_Instance"].ColumnName.ToString();
LOC_LIST2.DataValueField=ds.Tables[0].Columns["Location_Type"].ColumnName.ToStri??ng();
LOC_LIST2.DataBind();
LOC_LIST2.Items.Insert(0, new ListItem("---Choose One Location---", "-1"));
</code></pre>
<p>Therefore in the above code Location_Instance is the number of locations(Location_Type) that is added and store in database and the same is retrieved in the above <code>DropDownList</code>.</p>
<p>This is a very serious issue, can someone please help me on this asap?</p>
|
c# asp.net
|
[0, 9]
|
5,458,899 | 5,458,900 |
Next and Previous page links
|
<p>I have 5 pages, as below. I would like to add a next and previous button that loops through the pages.</p>
<pre><code>http:www.mydomain/project_listing/a
http:www.mydomain/project_listing/b
http:www.mydomain/project_listing/c
http:www.mydomain/project_listing/d
http:www.mydomain/project_listing/e
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,321,636 | 4,321,637 |
Is it possible to send a value of a variable from a js file to a php file
|
<p>I have script and I'd like to know if it's possible the send the value of a variable to $_session,</p>
<pre><code> <script>
$(function() {
var delivery = 0;
$('#jcart-paypal-checkout').click(function() {
delivery = $('form#delivery2 input[type=radio]:checked').val();
if(!delivery) {
alert('Please choose a delivery option');
return false;
}else {
<?php $_SESSION['shipping'] = ?> delivery;
}
});
});
</script>
</code></pre>
<p>I need to send the value of delivery in $_session['shipping'],</p>
<p>thanks</p>
|
php javascript
|
[2, 3]
|
5,566,006 | 5,566,007 |
Can I remove just the last added class from an element with jQuery
|
<p>Hey guys, the question pretty much asks itself... however, for more clarity:</p>
<p>I have an element called "chuckPalahniuk" and it has classes named "choke", "fightclub" and "haunted".</p>
<p>How could I get it so when I click on the "chuckPalahniuk" element, it removes "haunted" first, then "fightclub" on the second click and "choke" on the third?</p>
<p><strong>also</strong>: be aware that the class names are dynamically added.</p>
<p>Cheers. peeeps!</p>
<p>psy.example:</p>
<pre><code>$('#chuckPalahniuk').click(function() {
$(this).removeLastClassAdded(); //except this function doesn't exist...
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,472,148 | 3,472,149 |
What is the "click.smoothscroll" event in jQuery?
|
<p>I have seen the following code:</p>
<pre><code>$('a[href^="#"]').on('click.smoothscroll',function(e) {...}
</code></pre>
<p>I do not understand what the click.something is.
I know the function like this: </p>
<pre><code>$('a[href^="#"]').on('click',function(e) {...}
</code></pre>
<p>what is the something/smoothscroll doing? is this a kind of event?</p>
|
javascript jquery
|
[3, 5]
|
2,179,864 | 2,179,865 |
JAVA vs PHP for web development
|
<p>I am new at web developing. I know C# and java. I want to develop a site which will be in MVC framework. But I can't decide (java spring, jakarta struts) or (CakePHP, CodeIgniter, Symphony) will be better for me. As I know java, java MVC frameworks will be best for me, but how much java will fit in web development? Please suggest java or PHP? <strong>I want to develop a site for reporting missing people and finding.</strong></p>
|
java php
|
[1, 2]
|
2,027,962 | 2,027,963 |
how do i change image src onclick with jquery, Sound/Mute buttons
|
<p>Hey guys i really need some help with this!
So i need to change an image when you click on it to another one. Essentially its a sound button so when its clicked it shows mute.</p>
<p>So far I'm completely baffled and have no idea where to start i know i can use Jquery/Javascript. Please help me!! here is my code:</p>
<pre><code> <div id= "Mute">
<img class="BeforeClick"src="images/BeforeClickMute.png" width="140" height="126"/>
<img class="AfterClick"src="images/AfterClickMute.png" width="140" height="126" />
<p>Mute</p>
</div>
</code></pre>
<p>also this is my css code</p>
<pre><code> .BeforeClick {
position:absolute;
z-index:9;
left:245px;
top:340px;
}
.AfterClick {
position:absolute;
z-index:8;
left:245px;
top:340px;
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,264,224 | 2,264,225 |
convert the date into different format jquery/javascript
|
<pre><code>function loadTable() { //function
var reportedFromDate = document.IssueForm.reportedFromDate.value; //getting value from input field
alert(reportedFromDate); //displays dd-mm-yy 31-02-13
}
</code></pre>
<p>I want to convert it as <strong><code>31-FEB-13</code></strong></p>
|
javascript jquery
|
[3, 5]
|
3,501,803 | 3,501,804 |
How to draw a dotted circle in android sdk?
|
<p>I am very new to Android sdk. I need to display a dotted circle with in the view. But My requirement is to display a dotted circle. But I don't have an idea how to do it?. Can you guys please let me know if any one know this ?</p>
<p>Thank you,
-Sek.</p>
|
java android
|
[1, 4]
|
4,602,554 | 4,602,555 |
Sending information to API using Android
|
<p>I am trying to contact an API and get the response. As part of my debugging I want to insure that the response is being recorded, it should be an xml response.</p>
<p>Here's what I have:</p>
<p>public class http extends Activity {</p>
<pre><code>public void httpMethod(){
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://site.com/api/");
try {
// Add your data
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
nameValuePairs.add(new BasicNameValuePair("apikey", "0d4e122d20"));
nameValuePairs.add(new BasicNameValuePair("ip", "65.82.126.103"));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
// Execute HTTP Post Request
HttpResponse response = httpclient.execute(httppost);
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
} catch (IOException e) {
// TODO Auto-generated catch block
}
TextView myTextView = (TextView) findViewById(R.id.myTextView);
myTextView.setText(response);
}
}
</code></pre>
<p>I'm trying to see the response that I get, however the variable response in the line</p>
<pre><code>myTextView.setText(response)
</code></pre>
<p>is throwing an error:</p>
<pre><code>response cannot be resolved to a variable
</code></pre>
<p>is response not truly a variable of the type httpresponse? what's going on here...?</p>
|
java android
|
[1, 4]
|
1,300,976 | 1,300,977 |
how to get text box value in page init?
|
<p>I am using asp.net 2.0</p>
<p>I set a hidden text box from javascript and on postback, i want to check the value stored on the text box in page init event. Here is what i tried</p>
<pre><code>string t = Request.Form["currentMode"].ToString();
</code></pre>
<p>but i get an error saying " Object reference not set to an instance of an object."</p>
<p>Any idea?asp.</p>
|
c# asp.net
|
[0, 9]
|
1,999,776 | 1,999,777 |
When/why would you use Linq in an application?
|
<p>i know how linq works but i am not getting idea where exactly i should use linq? </p>
|
c# asp.net
|
[0, 9]
|
5,977,058 | 5,977,059 |
Best API model design
|
<p>I have offline JSON definitions (in assets folder) - and with them I create my data model. It has like 8 classes which all inherit (extend) one abstract Model class. </p>
<p>Would it be better solution if I parse the JSON and keep the model in memory (more or less everything is Integer or String) through the whole life cycle of the App or would it be smarter if I parse the JSON files as they are needed?</p>
<p>thanks</p>
|
java android
|
[1, 4]
|
126,969 | 126,970 |
ASP.NET 3.5, googlebot, 301 Redirect "Cannot redirect after HTTP headers have been sent"
|
<p>I have set up a dynamic 301 redirect routine within a custom HttpModule. The code accepts the incoming url, parses the querystring, and using a config and app specific logic, redirects to a new SEO friendly url using the following code:</p>
<pre><code>if (HttpContext.Current.Response.IsRequestBeingRedirected)
return;
if (!HttpContext.Current.Response.IsClientConnected)
{
response.End();
return;
}
response.Redirect(newLocation, false);
response.Status = "301 Moved Permanently";
response.StatusCode = 301;
</code></pre>
<p>This works fine and dandy if you enter a legacy url directly in a web browser. However, my event log is showing a bunch of "Cannot redirect after HTTP headers have been sent" HttpExceptions when the same url is accessed by the googlebot (66.249.71.11). </p>
<p>I'm at a loss as to what the issue is and how to resolve it.</p>
|
c# asp.net
|
[0, 9]
|
4,393,269 | 4,393,270 |
How can i determine whether a mouse is connected or not using PHP?
|
<p>Is it possible to determine whether mouse or keyboard is plugged in or not in PHP? If not is it possible in Java? </p>
|
java php
|
[1, 2]
|
2,712,027 | 2,712,028 |
CS1061: Compilation Error Message
|
<p>i have added a linkbutton to my page and get error when debugging says:
CS1061: 'ASP.uilayer_test_aspx' does not contain a definition for 'lbl_Click' and no extension method 'lbl_Click' accepting a first argument of type 'ASP.uilayer_test_aspx' could be found (are you missing a using directive or an assembly reference?)</p>
<p>.aspx contains : </p>
<pre><code><asp:LinkButton ID="lbl" runat="server" OnClick="lbl_Click">LinkButton</asp:LinkButton>
</code></pre>
<p>page diretive : </p>
<pre><code><%@ Page Language="C#" MasterPageFile="~/UILayer/UI.Master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="WebApp.UILayer.Test" Title="Untitled Page" %>
</code></pre>
<p>.cs contains :</p>
<pre><code>namespace WebApp.UILayer
{
public partial class Test : System.Web.UI.Page
{
private void lbl_Click(object sender, EventArgs e)
{
}
}
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
5,828,249 | 5,828,250 |
How to refresh android GridView
|
<p>I'm doing GridView activity that first show default image, then i start a new thread for netowrk task to download image from datatbase, and i would like that after the thread is finished, the GridView will automatically refresh the images in grid.</p>
<p><a href="http://stackoverflow.com/questions/8053919/how-can-i-dynamically-add-images-to-a-gridview">from this question</a> i took the following code:</p>
<pre><code>ImageAdapter adapt = (ImageAdapter)gridView.getAdapter();
adapt.setBitmap(bitmaps);
adapt.notifyDataSetChanged();
</code></pre>
<p>which update the adapter of the grid.
I'm doing this 3 lines inside the onResume() method but after the thread finish i need to call the onResume() method somehow (by pausing the activity or somthing simillar).</p>
<p>now if i'm moving to another acitivity (like one of the grid images) and then press the back button i can see the grid view image that i just downloaded from the database. (because it calls onPause() method and then onResume() )</p>
<p>Doe's anyone have a solution to this problem?</p>
<p>Thanks</p>
<p>Edit:
The thread is running through AsyncTask</p>
|
java android
|
[1, 4]
|
220,211 | 220,212 |
Trying to show message in asp.net using Javascript
|
<p>I am doing project in asp.net in C#. I am trying to show message in script format.
For that i am using the below code</p>
<pre><code>Page page = new Page();
page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Key", "alert('Your Full Name Sucessfully Updated...');", true);
</code></pre>
<p>but it is not showing any error. or warning. even it is not showing the messege.
kindly suggest me and help me.</p>
<p>Thanks and Regards</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
2,237,892 | 2,237,893 |
Javascript or jQuery to select a option in select element
|
<p>I am wanting to automatically select the option with the value of fr.</p>
<pre><code><select class="goog-te-combo">
<option value="">Select Language</option>
<option value="fr">French</option>
</select>
</code></pre>
<p>Is this possible with javascript or jQuery ? </p>
|
javascript jquery
|
[3, 5]
|
3,830,877 | 3,830,878 |
How can I take a different values from different tables and store in another table?
|
<p>I want to take the <code>customer id</code> from a <code>customer table</code>, <code>restaurant id</code> from a <code>restaurant table</code>, and <code>order id</code> from <code>order table</code>. I want to store these values in a single table detail. How might I do this?</p>
|
c# asp.net
|
[0, 9]
|
1,198,128 | 1,198,129 |
how to change cached picture from javascript
|
<p>I have a asp image control. ImageUrl="images/avator.jpg". I'm changing this picture on the server and then setting imageUrl same as previous url on the client. but image don't changed. When i click refresh button, image changed.
How to change cached image won't changing url?</p>
|
asp.net javascript
|
[9, 3]
|
2,675,927 | 2,675,928 |
Getting the proper document height with Jquery
|
<p>Goodevening/night </p>
<p>A small yet annoying jquery problem. I would like to get the height of my document. To do that i use the following code: </p>
<pre><code>$docHeight = $(document).height();
</code></pre>
<p>When i visit my page in a normal way (by clicking at a href at some other page) I get the correct height of my document. (about 4000px). But when i refresh i get my windowheight (1037px). Any way to avoid/fix this?</p>
<p>Grats,</p>
<p>W.</p>
<p>*<strong><em>Solution</em>*</strong></p>
<p>$(window).load(function({...}); does the trick. My images(so imageheight also) don't get loaded with document.ready, only the tags. window.load loads the entire page with heights etc, which gives me the right height of my doc.</p>
|
javascript jquery
|
[3, 5]
|
2,375,062 | 2,375,063 |
Any jquery plugin like twitter auto completion
|
<p>I need to do something like twitter. If I type <code>@</code>, it will show a list of who I am following, and then I can select one, insert name to the textarea.</p>
<p>Are there any good plugin for this?</p>
|
javascript jquery
|
[3, 5]
|
1,821,117 | 1,821,118 |
$("123").ready (fn(){}) triggering no matter what
|
<p>I have a problem where the $().ready is triggering no matter what I put into the parameter which means that it actually triggers before the page is ready. I am using ASP.NET mixed in with EXT.NET and would like to implement jQuery to spice things up a little. As the description says, it triggers no matter what so if I put "123" into the paramter it will show me the alart() anyways. Here is the code is am running:</p>
<pre><code> $("123").ready(function () {
var $kids = $("x-column-inner").children();
alert($(".x-column-inner").height());
});
</code></pre>
<p>As a result ".x-column-inner" is null because it hasn't finished compiling the page and is already executing the javascript.</p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
1,461,646 | 1,461,647 |
what is python equivalent to PHP $_SERVER?
|
<p>I couldn't find out python equivalent to PHP $_SERVER. </p>
<p>Is there any? Or, what are the methods to bring equivalent results?</p>
<p>Thanks in advance. </p>
|
php python
|
[2, 7]
|
859,242 | 859,243 |
jQuery image fade enlarge top and bottom px
|
<p>I want to make the effect like, after click the box, the box disappeared after expanding its both top and bottom, I did some work, but expends only on bottom. and the effects not quite good, I'd like to make the box bigger. <a href="http://jsfiddle.net/wY8Wb/" rel="nofollow">http://jsfiddle.net/wY8Wb/</a> if someone could help me out? thanks </p>
<p><img src="http://i.stack.imgur.com/R0fzG.png" alt=""></p>
|
javascript jquery
|
[3, 5]
|
640,690 | 640,691 |
page method not working
|
<p>I'm calling a page method using a jquery function that's somewhat like this:</p>
<pre><code>function GetNewDate(thedateitem) {
ThisMonth = 3;
TheDay = 1;
TheYear = 2011;
DateString = TheMonth + '/' + TheDay + '/' + TheYear;
$.ajax({
type: "POST",
url: "/Pages/CallHistory.aspx/ResetDate",
contentType: "application/json; charset=utf-8",
data: DateString,
dataType: "json",
success: successFn,
error: errorFn
})
};
</code></pre>
<p>And then, in the code behind file, I have:</p>
<pre><code>[WebMethod]
public static void ResetDate(DateTime TheNewDate)
{
var test = 4;
}
</code></pre>
<p>However, when I put a breakpoint on var test = 4, it never stops there.</p>
<p>What am I missing?</p>
<p>Thanks.</p>
|
jquery asp.net
|
[5, 9]
|
711,148 | 711,149 |
number of trailing zeros
|
<p>What <code>Integer.numberOfTrailingZeros(x)</code> does in Java, is there a similar function in C#?
tnx</p>
|
c# java
|
[0, 1]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.