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 |
|---|---|---|---|---|---|
4,808,596
| 4,808,597
|
Unable to cast object of type 'system.data.datatable' to type
|
<p>I have a datatable AVT of type AvailDataTable. The following code works to create a new datatable from AVT:</p>
<pre><code>AvailDataTable AVT1 = (AvailDataTable) AVT.DefaultView.Table;
</code></pre>
<p>However, the code:</p>
<pre><code>AvailDataTable AVT1 = (AvailDataTable) AVT.DefaultView.ToTable();
</code></pre>
<p>fails with the message "Unable to cast object of type 'system.data.datatable' to type 'AvailDataTable'.</p>
<p>Can someone explain why the first cast works but the second one doesn't? Thanks!</p>
|
c# asp.net
|
[0, 9]
|
4,118,515
| 4,118,516
|
create a pop up aspx page and by the close button that would close..?
|
<p>I want To Create A aspx pop up Page on a button and then in that pop up a close button should be there and by that close button pop up would be closed. </p>
|
c# asp.net
|
[0, 9]
|
5,297,028
| 5,297,029
|
How to get pagemthods value in the calling function
|
<p>I want to fetch current year from the server using PageMethods but PageMethods returns result in different function but i want to get the return value in the same function where PageMthods is called. Is it possible?</p>
<pre><code>function GetYear()
{
dr["OrderYear"] = PageMethods.GetCurrentYear(Onsuccess);
}
function Onsuccess(currYear)
{
alert(currYear);
}
[WebMethod]
public static string GetCurrentYear()
{
return DateTime.Now.Year.ToConvertedString();
}
</code></pre>
<p>I want currYear to be assigned to dr["OrderYear"] which is actually a calling function</p>
|
javascript asp.net
|
[3, 9]
|
2,793,534
| 2,793,535
|
Click event handler timing issue - onLoad and .ready
|
<p>I have two iframes in a page and I am trying to establish a event handler for clicks in "frame2" from inside "frame1" (both frames are in same-domain), using this code in frame1:</p>
<pre><code>$('a', parent.window.frames['frame2'].document).bind('click', onbindclick);
</code></pre>
<p>This works when called from the onload() event but not when called from .ready(). The problem with doing this in onload is that if a user clicks on a link as soon as the page starts loading (even before the onload event is fired) the event handler does not catch the click.</p>
<p>If I call <code>alert(parent.window.frames['frame2'].document)</code> from the <code>.ready()</code> function I get an "undefined" error. This I guess means that the content has not been loaded. </p>
<p>So, I am stuck. It does not work in <code>.ready()</code> and it is too late to do it in onload. What is the best way to solve this problem. Thanks for your help and time.</p>
|
javascript jquery
|
[3, 5]
|
528,435
| 528,436
|
How to disable the hover event when I hover over the text inside the image?
|
<p>I have a problem in my code, when I hover over the image, the image will become 50% larger and it will display a text over the image, but when I hover over the text, the image will enter the state of mouseout, mouseover, mouseout, mouseover. So it will flicker a lot. How can I disable this hovering event when the mouse is over the text of the image? I tried <code>event.stopPropagation</code> in the text but it isn't working.</p>
<p>Here's the <a href="http://jsfiddle.net/Z7C4b/" rel="nofollow">jsFiddle</a>. Try to hover over the image, then try to hover over the text. That's the effect I'm talking about. I want to disable the text hover event. Please help me.</p>
|
javascript jquery
|
[3, 5]
|
2,608,471
| 2,608,472
|
Dynamically change image src using Jquery not working in IE and firefox
|
<p>I am implementing a captcha for a email. when click on <code>linkEmail</code> button email modal will open.
there i have to set captcha image generated by a handler (CaptchaGenerator.ashx) on click of <code>linkEmail</code> button click. Here is the code for that.</p>
<pre><code>$(".linkEmail").click(function () {
//Load captcha image
$('.imgCaptcha').attr('src', '/Custom/AppCode/Utilities/CaptchaGenerator.ashx');
$('#emailModal').modal();
});
</code></pre>
<p>Above code is working fine in crome but <strong>not working</strong> in IE and firefox.
Although i have tried followings there is no luck.</p>
<p>HTML:</p>
<pre><code><p id="captchacontainerp" class="captchacontainer"></p>
-------------------------------------------------------------
$('#captchacontainerp').prepend($("<img id='imCaptcha' class='imgCaptcha' src='/Custom/AppCode/Utilities/CaptchaGenerator.ashx'></img>"));
-------------------------------------------------------------
var img = $('<img id="imCaptcha" class="imgCaptcha">');
img.attr('src', '/Custom/AppCode/Utilities/CaptchaGenerator.ashx');
$('#captchacontainerp').empty();
img.appendTo('#captchacontainerp');
---------------------------------------------------------------
$('#captchacontainerp').empty();
$('#captchacontainerp').append($("<img id='imCaptcha' class='imgCaptcha' src='/Custom/AppCode/Utilities/CaptchaGenerator.ashx'></img>"));
</code></pre>
|
javascript jquery
|
[3, 5]
|
148,145
| 148,146
|
How to remove prev . prev object? Javascript .prev().remove();
|
<p>It's like </p>
<pre><code><input name="fails[]" type="file" size=40 /><br />
<textarea name="apraksts[]">About</textarea>
<a href="#" onclick="remove(this);return false".....>remove</a>
</code></pre>
<p>And the javascript:</p>
<pre><code>function remove(obj){
$(obj).prev('textarea').remove();
$(obj).prev('input').remove();
$(obj).remove();
}
</code></pre>
<p>Why it doesnt remove INPUT(why it doesnt remove two objects)?</p>
<p>Thanks..</p>
|
javascript jquery
|
[3, 5]
|
5,503,048
| 5,503,049
|
How to get content of div which contains JavaScript script blocks?
|
<p>I have the following HTML</p>
<pre><code><div id="example">
...some text...
<script type="text/javascript">
... some javascript...
</script>
</div>
</code></pre>
<p>How to get content of <code>#example</code> but also with the JavaScript?</p>
<pre><code>$("#example").html(),
$("#example").text(),
$("#example").val()
</code></pre>
<p>all don't work.</p>
|
javascript jquery
|
[3, 5]
|
3,009,529
| 3,009,530
|
How to connect between ASP.NET page and javascript
|
<p>I'm trying to put current time on ASP.NET page. How can i get the control ID from Javascript? I'm using C# ASP.NET </p>
<p>On my Form</p>
<pre><code><body onload="updateClock(); setInterval('updateClock()', 1000 )">
<form id="form1" runat="server" >
<span id="clock">&nbsp;</span>
</form>
</body>
</code></pre>
<p>Javascript Function</p>
<pre><code>function updateClock ( )
{
document.getElementById("clock").firstChild.nodeValue = currentTimeString;
}
</code></pre>
|
javascript asp.net
|
[3, 9]
|
851,792
| 851,793
|
Sorting javascript array
|
<p>I have a global array in javascript say
<code>jsonArr = ["location","department","grade"];</code></p>
<p>now inside my method i am doing this</p>
<pre><code>var newArr = [];
newArr = jsonArr;
var sorted_arr = newArr.sort();
</code></pre>
<p>my newArr is getting sorted but problem is along with jsonArr also got sorted i dont want to sort jsonArr </p>
<p>what is the problem can anyone plz help me ?</p>
|
javascript jquery
|
[3, 5]
|
181,868
| 181,869
|
Run a python Module from sl4a
|
<p>I have installed py4a and sl4a, then I copied the existent python module, pybluez, into my phone to storage/sdcard0/Download.
I imported the module with the option Import Modules from py4a and installed it.
How can I execute the module?</p>
<p>Tanks,
Reea</p>
|
android python
|
[4, 7]
|
3,670,315
| 3,670,316
|
what went wrong with parseInt
|
<p>i just encounter 1 problem on the parseInt
i do apply this parseInt for all my project but today i just encounter this</p>
<p>i have a normal text input <code><input type='text' name='KG'></code>
and i using jquery to retrieve the input value, then write into another input
<code><input type='text' name='KG2'></code></p>
<p>below are my jquery code</p>
<pre><code>$(":input[name='KG']").keyup(calc);
function calc(){
var kg = $(":input[name='KG']").val();
kg=parseInt(kg);
$(":input[name='KG2']").val(kg);
}
</code></pre>
<p>guess what, this the result i get<br/>
input@KG > show@KG2<br/>
28 > 28<br/>
028 > 2<br/>
34 > 34<br/>
034 > 28<br/>
9 > 9<br/>
09 > 0<br/></p>
<p>anyone know what went wrong? it can be solve by using Math.round.</p>
|
javascript jquery
|
[3, 5]
|
92,382
| 92,383
|
How to show the progress bar to diffrent clients.?
|
<p>User1 open the website did something the progress bar starts.
User2 open the same website that progress bar needs to display here.Please tell me.</p>
|
c# asp.net
|
[0, 9]
|
326,640
| 326,641
|
casting PyCFunctionWithKeywords in PyMethodDef
|
<p>Recently I've been wrapping a lot of C++ code in python, and I find this block (taken directly from the <a href="http://docs.python.org/extending/extending.html#a-simple-example%5d" rel="nofollow">python documentation</a>) a bit troubling: </p>
<pre><code>static PyMethodDef keywdarg_methods[] = {
/* The cast of the function is necessary since PyCFunction values
* only take two PyObject* parameters, and keywdarg_parrot() takes
* three.
*/
{"parrot", (PyCFunction)keywdarg_parrot, METH_VARARGS | METH_KEYWORDS,
"Print a lovely skit to standard output."},
{NULL, NULL, 0, NULL} /* sentinel */
};
</code></pre>
<p>The issue is the line which casts <code>kwarg_parrot</code>, of type <code>PyCFunctionWithKeywords</code> to a <code>PyCFunction</code>. </p>
<p>Coming from a C++ background (and given that I am wrapping C++ code), it seems wrong to use a C-style cast. I've tried <code>static_cast</code>, and <code>dynamic_cast</code>, both of which cause the compiler to complain (with good reason, this really is an unsafe cast in the general sense). The only viable C++ option seems to be<code>reinterpret_cast</code>, but so far as I can tell this is a more verbose version of a C-style cast.</p>
<p>Granted, the above <em>is</em> wrapped in an <code>extern "C"</code> block, so maybe the C way is the correct way. Does anyone have any better ideas? (What I'd really like to see would be a solution that could automatically generate the doc string based on the keywords.) </p>
<p>Unfortunately, solutions like Boost.Python and SWIG are off the table. (I'm working within an ugly framework)</p>
|
c++ python
|
[6, 7]
|
3,639,023
| 3,639,024
|
Stop Textbox firing OnClientClick event
|
<p>The combination of pressing enter on a textbox with a page that has an image button with both a client and server click event is causing the client side event to fire when I press enter in the textbox.</p>
<p>I want to prevent this, am happy to use Jquery or whatever is best. From the Jquery side am struggling to capture the enter key</p>
<pre><code><asp:TextBox ID="tbName" runat="server"></asp:TextBox>
<asp:ImageButton ID="CancelImageButton" ImageUrl="Cancel.gif"
runat="server" OnClientClick="alert(); return false;"
onclick="Cancel_Click"/>
</code></pre>
|
jquery asp.net
|
[5, 9]
|
5,669,960
| 5,669,961
|
using java script to check if string is numbers only
|
<p>using javascript to check if string is numbers only this is what i have but its not running any suggestions would the appreciated thanks much in advance. also if it is a string of numbers only then all numbers after the first two digits should be masked.</p>
<pre><code> var start = function RenderRC(CodeOwner) {
var pattern = /^\d+$/;
var Rcode = CodeOwner.toString();
if (Rcode.valueOf.match(pattern)) {
if (Rcode.length > 2) {
var newcode = Rcode.substr(0, 2) + Array(Rcode.length - 2 + 1).join("*");
return newcode;
}
} else {
return Rcode;
}
};
</code></pre>
|
javascript asp.net
|
[3, 9]
|
1,317,844
| 1,317,845
|
need to fix add/remove rows of fields
|
<p>This "almost" works <a href="http://jsfiddle.net/RfWsy/4/" rel="nofollow">http://jsfiddle.net/RfWsy/4/</a></p>
<pre><code>$(document).ready(function() {
function addRows(label, maxRows, minRows) {
$('.add-' + label).live('click', function() {
if ($("." + label + "-group").length < maxRows) {
var newrow = $('#' + label + '-template')
.clone().removeAttr('id');
newrow.insertAfter($(this)
.closest('.' + label + '-group'))
.find('.minus').show();
newrow.find('input').val('');
newrow.find('select').val('');
}
});
$('.remove-' + label).live('click', function() {
if ($("." + label + "-group").length > minRows) {
$(this).closest('.' + label + '-group').remove();
}
});
}
addRows('hs-community-service', 3, 1);
});
</code></pre>
<p>The user can add up to three sets of fields, then remove all but one. That works, but after removing all but one set (by clicking the first minus link at very top), try clicking the add button, you'll notice it does not add a new set of fields.</p>
<p>Any help is appreciated.</p>
|
javascript jquery
|
[3, 5]
|
3,355,849
| 3,355,850
|
Backslash '\' in console.log() not appearing
|
<p>I'm trying to use a back slash in <code>console.log()</code> and within <code><p></p></code> but it seems that when the page loads, all back slashes are removed.</p>
<p><strong>Example JS</strong></p>
<p><code>console.log('\m/ Lets rock. \m/');</code></p>
<p><strong>Result</strong></p>
<p><code>m/ Lets rock. m/</code></p>
<p>How can I prevent it from being removed?</p>
<p><strong>EDIT:</strong> Backslash not forward slash. Running this on node.js with express, within the <code><head></code> tags of <code>layout.jade</code>. Backslash visible in REPL, but not when running on node in the web browser (Chrome & Firefox).</p>
|
javascript jquery
|
[3, 5]
|
5,579,961
| 5,579,962
|
Is there an HttpClient that handles caching requests on its own?
|
<p>I have an app that needs to make repeated requests for content on the web. Now the server side implementation follows the standards for http caching using the headers. I was wondering if there is an extended version of HttpClient or another tool that will store responses and interact with the headers for automatic caching. If there isn't one that is fine, I would just like to skip implementing this if there is a tool already out there.</p>
<p>Thanks</p>
|
java android
|
[1, 4]
|
4,642,872
| 4,642,873
|
jQuery: How do you perform a callback inside an AJAX call
|
<p>I have a function with an AJAX call inside it, I need to be able to call the function and it return true if the AJAX request was successful and false if not.</p>
<p>I know the following doesn't work because the returns are out of scope to the exampleFunc()</p>
<pre><code>function exampleFunc() {
$.ajax({
url: 'http://example.com/page',
success: function(data, textStatus, XMLHttpRequest){
return true;
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
return false;
}
});
}
</code></pre>
<p>I Googled for a solution and believe I should be doing a callback but couldn't seems to achieve the desired outcome.</p>
<p><strong>Edit:</strong> Te be more specific I require the function to return true or false because my use case currently has me doing :</p>
<pre><code>if (exampleFunc()) {
// run this code
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,507,028
| 1,507,029
|
Javascript/CSS load and append to document
|
<p>I have written a jQuery plugin, but I want it to check if jQuery has been loaded, if not then load it, as well as a couple of other javascript files and also check if CSS file has been loaded, if not then load it.</p>
<p>Am wondering how to go about it?</p>
<p>thank you very much for your time.</p>
|
javascript jquery
|
[3, 5]
|
5,084,741
| 5,084,742
|
what data type should select to store song url and name in asp c#?
|
<p>I want to upload a mp3 and store song details in audio table and save that song to a folder. and when user click the play button then pass that song url to windows media player to play the song...</p>
<p>i has created a table like:</p>
<pre><code>Column Datatype Allownulls
s_ID (primary) int no
Songurl Varchar(MAX) yes
song name Varchar(50) yes
</code></pre>
<p>i am using MS visual studio 2008 and sql server 2005.</p>
<p>plz suggest me idea and example of code to how to create...
Advace thank you...</p>
|
c# asp.net
|
[0, 9]
|
1,002,104
| 1,002,105
|
Hide element depending on value of if/else statement not working
|
<p>I have a Rails app that uses the <a href="https://developer.linkedin.com/documents/sign-linkedin" rel="nofollow">LinkedIn Javascript API</a> to authenticate users. What I'd like to do is hide an element depending on whether the user is signed up or not. I've tried a few things:</p>
<ul>
<li>Put the code with the if/else statement at the bottom of the HTML before <code></body></code></li>
<li>Check to see if <code>document.cookie</code> is an empty string instead of a more specific if/else</li>
</ul>
<p>However, neither of these has hidden the element. If I go into my browser's console and paste in my code after the page is finished rendering, the element hides. So I thought this was a JavaScript load issue, but I must be doing something wrong. Can anyone shed some light on this?</p>
<p>Here's the code I've tried, none of which works:</p>
<pre><code><%= content_for(:script_footer) do %>
<script type="text/javascript">
// if ($('span.IN-widget:contains("inSign in with LinkedIn")').length > 0) {
// $('#select').hide();
// } else {
// $('#select').show();
// }
if (document.cookie == "") {
$('#select').hide();
} else {
$('#select').show();
}
</script>
<% end %>
</code></pre>
<p>And my application layout:</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<title>rdtrip</title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= yield(:linked_in) %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
<%= yield(:script_footer) %>
</body>
</html>
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,534,197
| 5,534,198
|
Make the "title" script work on focus
|
<p>The code work only on hover! but i want it to work in focus mode!</p>
<pre><code> $(document).ready(function() {
$('body').append('<div id="anchorTitle"></div>');
$('input[title!=""]').each(function() {
var a = $(this);
if(typeof a.attr('title') == 'undefined')
{
return;
}
a.data('title', a.attr('title'))
.removeAttr('title')
.hover(
function() { showAnchorTitle(a, a.data('title')); },
function() { hideAnchorTitle(); }
);
});
function showAnchorTitle(element, text) {
var offset = element.offset();
$('#anchorTitle')
.css({
'top' : (offset.top + element.outerHeight() + 4) + 'px',
'left' : offset.left + 'px'
})
.html(text)
.show();
}
function hideAnchorTitle(){
$('#anchorTitle').hide();
}
});
</code></pre>
<p>When an input is focused show the title box! when the focus is lost, hide the title..</p>
|
javascript jquery
|
[3, 5]
|
5,837,709
| 5,837,710
|
Mapping Uploaded Files to different directory
|
<p>Using <code>AjaxFileUpload</code> </p>
<pre><code>string path = Server.MapPath("~/Files/") + e.FileName;
</code></pre>
<p>This code is uploading files to Files directory under Website folder in <code>asp.net.</code>..</p>
<p>How i can map uploaded files to different directory ?</p>
<p>e.g. </p>
<p>Combo Box -> have two option </p>
<ul>
<li>Image </li>
<li>Doc .</li>
</ul>
<p>If a user select Image then files uploaded should move to Image folder ..similarly for Doc..</p>
<p>How to write code for this in <code>asp.net c#</code> ?</p>
|
c# asp.net
|
[0, 9]
|
5,360,010
| 5,360,011
|
jquery tipsy not firing onclick IE
|
<p>Hi I am using the jquery tipsy plugin to display colour names above colour swatch images.</p>
<p>I am trying to trigger a checkbox to be checked/unchecked when a user clicks on the image.</p>
<pre><code>$(document).ready(function(){
$('.label_check_colour').click(function(){
setupLabelColour();
});
}
function setupLabelColour() {
if ($('.label_check_colour input').length) {
$('.label_check_colour').each(function(){
$(this).removeClass('c_on');
});
$('.label_check_colour input:checked').each(function(){
$(this).parent('label').addClass('c_on');
});
};
};
</code></pre>
<p>HTML</p>
<pre><code><div class="selectableSwatch">
<label class="label_check_colour" for="colour_1"><input type="checkbox" id="colour_1" name="colour_id[]" value="1" /><img class="colour_tip_1" width="20" src="img/colour-palette/1" /></label>
</div>
</code></pre>
<p>Everything works great in Firefox and Safari but not in IE8.</p>
<p>Help...please.</p>
|
javascript jquery
|
[3, 5]
|
2,908,891
| 2,908,892
|
Mouse Click curser effect throughout site
|
<p>I think it would be cool to set a custom cursor click effect with jQuery. Something similar to Android Incredible 2 browser where it highlights click-able items in green when selected. Except mine would be the cursor with a box around it something like 1px width, very subtle, and it would kind of float/toggle until you point over a clickable item - and then it would kind of 'lock' in. </p>
<p>I've found something like this that was done that fired a bunch of squares on clicks, but I can't relocate where I found it - and it was a huge amount of JavaScript, is this possible with jQuery - and would this be a bad idea for the users experience?</p>
|
javascript jquery
|
[3, 5]
|
5,550,194
| 5,550,195
|
Add CSS class to an element while dragging over w/ jQuery
|
<p>Is it possible to add a CSS class to an element while it is being dragged over a particular area and replace the class once the element is dropped?</p>
<p>I am not looking for this feature everywhere, but only over a particular area.</p>
|
javascript jquery
|
[3, 5]
|
1,633,199
| 1,633,200
|
How to replace entire HTML with external HTML?
|
<p>Let's say I have this page (page.html):</p>
<pre><code><html>
<body>
<h1>AAA</h1>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$.get('page2.html', function(data){
// I want to replace the entire HTML with the HTML of page2.html
// but this doesnt' work
$('html').replaceWith(data);
});
}); //]]>
</script>
</body>
</html>
</code></pre>
<p>Another page (page2.html):</p>
<pre><code><html>
<body>
<h1>BBB</h1>
</body>
</html>
</code></pre>
<p>As you can see in my code snippet, I would like to fetch HTML from the page2.html and replace the entire content of page.html with the fetched response.</p>
<p>How to do that?</p>
|
javascript jquery
|
[3, 5]
|
1,934,940
| 1,934,941
|
jQuery - how to register a callback for an asynchronous function?
|
<p>I am a jQuery newbie. I have a core js file which will not be visible to my user. I have the following function inside it that makes a server request -</p>
<pre><code>function checkMsgs(t1,t2) {
// poll the url
// return the results
$.get("http://www.mySite.com/web/test.php", {
"t1" : t1,
"t2" : t2
}, function(data) {
return data;
});
}
</code></pre>
<p>Now, I want to call this function, without blocking the thread i.e., asynchronously. How do I make a function call after it returns from this method, but without blocking anything?</p>
|
javascript jquery
|
[3, 5]
|
5,981,879
| 5,981,880
|
Find Control in asp:repeater on button click event
|
<p>I have a dropdown list inside a asp:repeater item template.
how can I get its value on button click event.</p>
<pre><code><asp:Repeater runat="server" ID="WorkflowListAfter" onitemcreated="WorkflowListAfterItemCreated">
<ItemTemplate>
<asp:DropDownList ID="ddlWorkflowMembers" runat="server" DataTextField="MemberName" DataValueField="MemberID">
</ItemTemplate>
</asp:Repeater>
protected DropDownList ddlWorkflowMembers = new DropDownList();
protected void WorkflowListAfterItemCreated(object sender, RepeaterItemEventArgs e)
{
ddlWorkflowMembers = (DropDownList) e.Item.FindControl("ddlWorkflowMembers");
}
protected void BtnSaveClick(object sender, EventArgs e) {
if (ddlWorkflowMembers.SelectedItem == null) return;
}
</code></pre>
<p>the code above is working at first time but after postback ddlWorkflowMembers is always null expersion.</p>
|
c# asp.net
|
[0, 9]
|
2,801,829
| 2,801,830
|
Jquery how to get top leftcorner of page?
|
<p>I would like to mask a asp page by a div, this one have to completly cover the page.</p>
<p>I can get the size of page and resize the div with this values:</p>
<pre><code> var maskHeight = $(document).height();
var maskWidth = $(window).width();
//Set height and width to mask to fill up the whole screen
$('#mask').css({ 'width': maskWidth, 'height': maskHeight });
</code></pre>
<p>It is ok bue the mask is contained in a div in the page.. So the mask set his position from the top left of.. the div!
How can I set the position to the top left of the whole page? thanks a lot for any ideas..</p>
|
asp.net jquery
|
[9, 5]
|
5,396,022
| 5,396,023
|
Hide mobile safari keyboard when form submitted in Ajax application
|
<p>I have a textfield which fires an event in a web app, but I'd like the keyboard to close when the user presses enter. Using jquery to disable usual submission.</p>
|
jquery iphone
|
[5, 8]
|
2,282,435
| 2,282,436
|
scroll view issue Android
|
<p>I am adding layouts programmatically.I have added a scrollview as a parent layout and a combination of horizontal and vertical linearlayouts when I add a list view in the scrollview I am getting an issue that my UI is not taking full screen although the listview height is set to fill parent .There is a blank space added at the bottom and the height of the listview gets very small .I haven't find the reason why it's happening, is it a bug in android for scrollview ?</p>
|
java android
|
[1, 4]
|
4,119,945
| 4,119,946
|
assign a javascript variable from c#
|
<p>I have some javascrtipt eg:</p>
<pre><code><script type="text/javascript">
flashvars.myval = "blah"; //get this from c# ..etc
</script>
</code></pre>
<p>i need to assign the variable from c#</p>
<p>how can i do that?
can i call a c# method?</p>
<p>im using regular asp.net.</p>
<p>the javascript is on the aspx page.</p>
|
c# javascript
|
[0, 3]
|
2,220,642
| 2,220,643
|
Javascript for loop error
|
<p>This is what I have:</p>
<pre><code>function get_bad_changelist_authors() {
var changelistAuthorDivs = $('div.bad_changelist_author');
var changelistAuthors = [];
for (var div in changelistAuthorDivs) {
changelistAuthors.push($(changelistAuthorDivs[div]).text());
}
return changelistAuthors;
}
</code></pre>
<p>changeListAuthorDivs has n elements but for some reason it iterates n+1 times and initialized div to a string (ie. the string "length") on the last iteration. On the last iteration is where this loop has its error.</p>
|
javascript jquery
|
[3, 5]
|
1,956,982
| 1,956,983
|
client side code set up and why use apache web server
|
<p>Trying to get a better understanding of the current project set up and want to know if there is an easier set up.</p>
<p>The project is set up a 2 different components, one project contains the client side code and the other project contains the java code. </p>
<p>The client code is html, js, css etc which needs to be deployed to an apache web server on local dev machine and the java code is run from eclipse indigo launching tomcat 7.</p>
<p>My question is that each time I make a change to the client side code, i must go through the build process to get minified code and then deploy to htdocs dir on my apache web server. </p>
<p>What i don't understand is why does this need to happen, and if there is an easier way that i can develop both components without deploying the client side code. The lead developer is on vacation to get my questions answered.</p>
<p>Also, what editor is good for using on client side code that uses a lot of jquery, handlebars etc. would prefer a wyswig editor.</p>
|
javascript jquery
|
[3, 5]
|
1,396,513
| 1,396,514
|
How do I create persistent socket connection on Android?
|
<p>First off, let me say that feel free to recommend me if long lived TCP persistent connections are the way to go or persistent HTTP connections are better. </p>
<p>I've also pre-read that instead of having a persistent connection, I can have a polling mechanism. </p>
<p>I'm just asking in the curious interest of how can I create a persistent connection from Android to a server?</p>
<p>Thanks!</p>
|
java android
|
[1, 4]
|
2,132,653
| 2,132,654
|
Jquery resizeable issue
|
<p>I am trying to use the alsoResize option.
It works when I write this: </p>
<pre><code>$(obj).resizable({ minHeight: 150, minWidth: 280, alsoResize: '.tab_content'});
</code></pre>
<p>but the problem is that it's resizing all 'tab_content' elements in the page.
I want it to be relative to 'obj' which also contains a 'tab_content',
I tried: <code>alsoResize: $('.tab_content',obj)</code>
but it didn't work,
any suggestions,
Thanks</p>
|
javascript jquery
|
[3, 5]
|
244,066
| 244,067
|
jquery:simple pagination solution needed
|
<p>i have this code i cannt complete;</p>
<pre><code><div class=paginatme></div>
<div class=paginatme></div>
<div class=paginatme></div>
<div class=paginatme></div>
<div class=paginatme></div>
<div class=paginatme></div>
<div class=paginatme></div>
<div class=paginatme></div>
<div class=paginatme></div>
<input type=hidden value=1 id=current_shown onchange='functioN(this.value)'>
<a href=''>Next</a><a href=''>previous</a>
<script>
functionN(x){
///CODE THAT SHOW div number X and 2 after and hide all..
}
</script>
</code></pre>
<p>i want to to add style=display:none to all and show them 3 by 3 on ahref click.</p>
<p>how can i count elements and give them style and none to rest ??</p>
|
javascript jquery
|
[3, 5]
|
4,097,901
| 4,097,902
|
Javascript Logic Problem
|
<p>I know only what I need but I do not know how to get that done.</p>
<p>This is the logic of the code, I really hope some of you has the solution.</p>
<p>How can I create in javascript or jQuery a function that will do the following?</p>
<pre><code>If that checkbox is selected, when the button is clicked redirect the user to another page by passing the value of the textarea in the URL.
</code></pre>
<p>So that is the logic.</p>
<p>We have three elements.</p>
<p>1)The checkbox</p>
<p>2)The input type button</p>
<p>3) The textarea.</p>
<p>The checkbox is selected, the user clicks on the button and the user goes to another page , and the URL will include the value found in the textarea.</p>
<p>i.e.</p>
<pre><code>http://mydomainname/page.php?ValueThatWasinTextArea=Hello World
</code></pre>
<p>Can you help me.</p>
<p>I think it is something simple for a javascript coder.</p>
<p>Thank you so much</p>
|
javascript jquery
|
[3, 5]
|
4,105,984
| 4,105,985
|
Adding a script reference into a page using jQuery
|
<p>I need to dynamically add a script reference, so I do this:</p>
<pre><code>jQuery('html head').append("<script src='somesource.com/somejs.js'><\/script>")
</code></pre>
<p>and it does't work - I don't get any errors but I can't execute any of the methods defined inside that script.</p>
<p>Any ideas what I am doing wrong?</p>
|
javascript jquery
|
[3, 5]
|
1,860,570
| 1,860,571
|
Pass parameters from mail link to login page of web app asp.net
|
<p>I am developing a web application in asp.net csharp.</p>
<p>i am sending mail to one admin as alert when a user makes a entry into a system.
with this mail one link is also sent that redirects to the login page.</p>
<p>when the admin clicks on the link it redirects to the login page.</p>
<p>but the parameter is not accessable into the system ... the parameter is visible into the url but not able to acces it using Request.querystring, it gives null value.</p>
<p>is there any other way i can access that parameter.</p>
<p>thanks
Kumar</p>
|
c# asp.net
|
[0, 9]
|
349,976
| 349,977
|
Run setTimeout only when tab is active
|
<p>Is there a way to stop <code>setTimeout("myfunction()",10000);</code> from counting up when the page isn't active. For instance,</p>
<ol>
<li>A user arrives at a "some page" and stays there for 2000ms</li>
<li>User goes to another tab, leaves "some page" open.</li>
<li><code>myfunction()</code> doesn't fire until they've come back for another 8000ms.</li>
</ol>
|
javascript jquery
|
[3, 5]
|
4,053,251
| 4,053,252
|
function calling from another function javascript
|
<p>I have 2 functions. <code>First</code> contains Jquery-UI dialog and called from the <code>Second</code> function. Something like :</p>
<pre><code>function First() {
$('div').dialog({
buttons: {
"Ok": function () { /* code */
}
}
});
}
function Second() {
First();
/* rest of this function code is depend upon the "Ok button"
function code */
}
</code></pre>
<p>Now my problem is that after calling function <code>First</code> the execution of script doesn't wait for <code>dialog's Ok button press</code>. Whats should i do, so that only after pressing the <code>Ok button</code>, the control return from the function <code>First</code>?</p>
|
javascript jquery
|
[3, 5]
|
377,281
| 377,282
|
applying image using innerHtml Method but its not working
|
<p>Hello friends here's my code</p>
<pre><code>function dropItems(idOfDraggedItem,targetId,x,y)
{
var html = document.getElementById('dropContent').innerHTML;
if(html.length<=0){
html.innerHTML='<img src="images/drag.jpg" alt=" " />'
}
if(html.length>0)html = html + '<br>';
html = html + document.getElementById(idOfDraggedItem).innerHTML;
document.getElementById('dropContent').innerHTML = html;
}
</code></pre>
<p>I want to to show a image in div when its empty.. but when it receive any data i want to remove that image by using this script .but its not working plz help me </p>
|
javascript jquery
|
[3, 5]
|
382,510
| 382,511
|
How to highlight specific row in a DetailsView?
|
<p>I am a new ASP.NET developer. I am using a DetailsView now to dispaly some data from the database. I have the need to highlight certain two rows from the DetailsView. Both rows are VARCHAR data type.
<strong>SO HOW TO DO THAT?</strong></p>
|
c# asp.net
|
[0, 9]
|
1,106,671
| 1,106,672
|
Currency Formatting in JavaScript
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/149055/how-can-i-format-numbers-as-money-in-javascript">How can I format numbers as money in JavaScript?</a> </p>
</blockquote>
<p>I have a form with come simple JavaScript to perform an instant calculation. My problem is that I'm struggling to format it so that it displays correctly with commas and 2 decimal places.</p>
<p>Any help would be very much appreciated. Thank you.</p>
<pre><code> <p>
<label>My Daily Rate is:</label><br />
<input class="poundsBox" name="shares" id="shares" type="text" /><br />
<br />
<strong>Your Gross Contract Take Home:</strong></p>
<p><span class="result">&pound; <span id="result"></span></span></p>
The above illustration is provided for guidance only. Please complete the request form below for a detailed personal illustration.
<script type="text/javascript">
$("#shares").keyup(function() {
var val = parseFloat($(this).val());
// If val is a good float, multiply by 260, else show an error
val = (val ? val * 260 * 0.88 : "Invalid number");
$("#result").text(val);
})
</script>
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,199,660
| 3,199,661
|
Javascript knowledge as front end developer
|
<p>I was wondering how deep I have to go into learning Javascript to be a front end developer?</p>
<p>Kyle</p>
|
javascript jquery
|
[3, 5]
|
1,438,147
| 1,438,148
|
Jquery Blur text and empty on Focus
|
<p>I have multiple text box like this. I want to apply the text on blur and empty when it get focused. I can able to achieve this for single text box. How i can pass the current element id instead of the hard coding the "#name" value in JavaScript function ?</p>
<pre><code>$(document).ready(function(){
$('#Name').focus(function()
{
var $ele = $(this).attr('id');
$(this).val('');
$(this).css('color', '#000000');
});
$('#Name').blur(function()
{
var $ele = $(this).attr('id');
$(this).val($ele);
$(this).css('color', '#a9a9a9')
});
});
<input id="Name" type="text" value="" name="Name">
<input id="Phone" type="text" value="" name="Phone" >
<input id="Email" type="text" value="" name="Email">
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,683,230
| 1,683,231
|
Stop User Leaving Before Postback (Javascript/ASP.NET)
|
<p>I have several functions running on a postback that can take a little time to complete.</p>
<p>When postback is initiated I show a loading image with this code:</p>
<pre><code>function showLoader()
{
document.getElementById("<%=loadingImage.ClientID%>").style.visibility="visible";
}
</code></pre>
<p>I want to be able to add code to this function so if user tries to leave at this point they are informed the operation is not complete.</p>
<p>I found this code:</p>
<pre><code>function goodbye(e) {
if(!e) e = window.event;
//e.cancelBubble is supported by IE - this will kill the bubbling process.
e.cancelBubble = true;
e.returnValue = 'You sure you want to leave?'; //This is displayed on the dialog
//e.stopPropagation works in Firefox.
if (e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
}
}
window.onbeforeunload=goodbye;
</code></pre>
<p>This works but I only want the code to be active when the loading image is active.</p>
<p>I tried the following but it shows the alert message when the page eventually posts back:</p>
<pre><code>function goodbye(e) {
if(!e) e = window.event;
//e.cancelBubble is supported by IE - this will kill the bubbling process.
e.cancelBubble = true;
e.returnValue = 'You sure you want to leave?'; //This is displayed on the dialog
//e.stopPropagation works in Firefox.
if (e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
}
}
function showLoader()
{
document.getElementById("<%=loadingImage.ClientID%>").style.visibility="visible";
window.onbeforeunload=goodbye;
}
</code></pre>
<p>Any ideas how I can tweak this to just show when user leaves page and not when postback completes? </p>
|
javascript asp.net
|
[3, 9]
|
1,545,846
| 1,545,847
|
Disable anchor tag using button click
|
<p>I need to disable anchor tag using button click event. I handled both server-side and client-side events for my requirement. I modified the 'href' attribute in client-side click event as follows.</p>
<p>[ASPX]</p>
<pre><code> <asp:Button ID="Button1" runat="server" Text="Disable" OnClick="disable" CausesValidation="false" OnClientClick="disable();" />
</code></pre>
<p>[Script]</p>
<pre><code> function disable() {
$('a.ClassName').attr("href", "#")
}
</code></pre>
<p>It gets set properly. But after the server-side process, anchor tag again sets with the old href attributes. How to resolve this?</p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
229,531
| 229,532
|
ASP.NET register a control from external dll on a page
|
<p>I am banging my head against the brick wall today. I am porting a site I had developed on an old box across to a new dev env. I have not just copied all the files as I didn't have a great file structure and some parts of the code needed to be removed as I went along.</p>
<p>Originally I had created a website (File -> New -> Web Site). I wanted a file structure something like:</p>
<p><a href="http://stackoverflow.com/questions/446017/popular-folder-structure-for-build">http://stackoverflow.com/questions/446017/popular-folder-structure-for-build</a></p>
<p>So I created a new blank solution so the sln file was on its own, then added projects (various DLL projects) and am ASP.NET Web Application.</p>
<p>This last part seems to have caused me a few issues that have given me a headache. As far as I understand (this could be a little limited), a webiste (as I first had) is different to the later type I created. For example the App_Code folder part didn't work as before. To solve that I created a seperate DLL for the webLibrary cs files and added a reference to it.</p>
<p>My problem now is how I register this on a page to be able to use the controls in it. For example I have a control that inherits from TextBox, when it was in the App_Code folder I could use:</p>
<pre><code><%@ Register TagPrefix="sarg" Namespace="MyNameSpace" %>
</code></pre>
<p>Then use</p>
<pre><code><sarg:SARGTextBox id="clienttitletxtbox" runat="server" OnTextChanged="textboxfiltering_TextChanged" AutoPostBack="true"></sarg:SARGTextBox>
</code></pre>
<p>Now it is in its own DLL and namespace I can not figure out how to get it to work, I just keep getting warnings saying "Cannot resolve symbol 'SARGTextBox'".</p>
<p>It is probably really simple but I can no longer see the wood for the trees.</p>
<p>Thanks</p>
|
c# asp.net
|
[0, 9]
|
4,996,444
| 4,996,445
|
How to send a Raphael element .toBack()
|
<p>Can I use jQuery to send a Raphael element by class back, like sending something back to z-index=0:</p>
<p>Several Raphael elements class="dot20" need all to be sent back</p>
<pre><code>j=2
jj = "c"+j*10
$("."+jj).toBack();
</code></pre>
<p>I get the following error from the FF Firebug:
$("." + jj).toBack is not a function
[Break On This Error] $("."+jj).toBack(); </p>
<p>The above does not work. Do I need some squiggly brackets? </p>
<p>I'm lost</p>
<p>TIA</p>
<p>Dennis </p>
|
javascript jquery
|
[3, 5]
|
4,862,051
| 4,862,052
|
using jQuery ignore: ':hidden:not
|
<p>I am using a jQuery validator, and I want to use the <code>ignore: ':hidden:not</code> but I want to apply this too all controls which has an ID that contrains "_selecting",</p>
<p>this is what I have so far but not working:</p>
<pre><code>sb.AppendLine(@" ignore: ':hidden:not($(""[id*=_selecting]"")',");
</code></pre>
<p>Please assist, thanks in advanced. </p>
|
c# jquery asp.net
|
[0, 5, 9]
|
3,882,725
| 3,882,726
|
how i can start application info screen in android?
|
<p>I want to start manage application(Settings->Application->manage application->Application info) screen programatically. I am unable to do it. Can anyone please help me?</p>
<p>Thanks in advance.</p>
|
java android
|
[1, 4]
|
3,859,570
| 3,859,571
|
JQuery Validation is not working
|
<p>I have one form in which one input type whose value is "First Name".But this can be changed on onfocus function I want validation for this input field if it is blank or "First name"</p>
<p>I have two jquery files <strong>jquery-1.4.2.min.js & jquery.validate.pack.js</strong>.</p>
<p>I have another jqeury file for this form</p>
<pre><code>jQuery(document).ready(function() {
jQuery("#frmRegister").validate({
errorElement:'div',
rules: {
Fname:{
required:true,
minlength: 2,
maxlength:30
}
},
messages: {
Fname:{
required: "Please enter first name",
minlength: "Required minimum 2 characters allowed",
maxlength: "Required maximum 30 characters allowed"
}
});
jQuery("#msg").fadeOut(5000);
});
</code></pre>
<p>In this file required:true is working if value is balnk but by default value is "First Name" so it does not work I want both if it is blank or it is "First Name".</p>
Full Name:
</li>
<p>Please reply as early as possible.
Thank You.</p>
|
php javascript
|
[2, 3]
|
352,774
| 352,775
|
Simple Javascript not Working - Jquery
|
<p>I have the following in my page.</p>
<pre><code>$(document).ready(function() {
function setTheTimeout(){
var t=setTimeout("alertMsg()",3000);
}
function alertMsg(){
alert("Hello");
}
setTheTimeout();
});
</code></pre>
<p>I am getting an error in Firebug alertMsg() is not defined?</p>
|
javascript jquery
|
[3, 5]
|
2,882,360
| 2,882,361
|
Can a javascript object containing xml data be parsed using the jquery .ajax() call?
|
<p>I have a javascript object containing the xml data in that. I want to parse this object inside the .ajax() call in the jquery. Does anyone know how to do it? I am struggling for the pointer. Please help me with this.</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
1,624,754
| 1,624,755
|
How to Decrypt using Javascript
|
<p>I have a captcha text,which I am storing in hidden variable and retreiving the value in code behind(c#.net).</p>
<p>Now I need to Encrypt that captcha text and store in hidden variable and decrypt the same in c#.net</p>
<p>I need an algorithm that works both in javascript and c# .i.e encrypt in javascript and decrypt in c#.net.</p>
<p>eg : text : "dfg563hj"</p>
<p>Thanks for your help in advance.
Ramesh.</p>
|
c# javascript
|
[0, 3]
|
2,783,894
| 2,783,895
|
jQuery auto play script of pagination
|
<p><strong>My Script :</strong></p>
<pre><code>function pagination(id)
{
$("#article_load_destacados").load("indexer_destacados_news.php?pg_d="+id);
if (id+1>2)
{
pagination(0);
setInterval(function()
{
pagination(0);
}, 4000);
}
else
{
setInterval(function()
{
pagination(id+1);
}, 4000);
}
}
</script>
<div id="article_load_destacados"></div>
<script>
pagination(0);
</script>
</code></pre>
<p>Create this script for show pagination, the script call PHP file and load this with pagination, for this send different ids and when load PHP file load the same time different elements of pagination. With this script I want run all pagination based on id. If I have for example 5 pages, the script run from 0 to 5, I use for <code>setInterval</code> for it with jQuery.</p>
<p>I want get the script paginate and send different id each 4 seconds.
The problem when run the script the navigator doesn't work, and generates an infinite loop. </p>
|
javascript jquery
|
[3, 5]
|
378,240
| 378,241
|
How can I implement a login wall for expired or inappropriate pages?
|
<p>I am writing a website that very explicitly requires a login wall.</p>
<p>Visitors should be required to log in before they are allowed to view a page.</p>
<p>The page being built depends very much on the user's "ID". I am not sure how or where to store the user's login.</p>
<p>I am not sure whether I should use a session variable (e.g. <code>Session["userId"]</code>), or some other method. The problem I see with session variables is that it's difficult to <em>time out</em> sessions.</p>
<p><em>Note: I'm using C# 3.5 with ASP.NET in Visual Studio 2008.</em></p>
|
c# asp.net
|
[0, 9]
|
5,429,784
| 5,429,785
|
error message in asp.net c#
|
<p>if you please help me out i can not find out whats wrong with the above code since i am learning on my own asp.net c# with the above code:</p>
<pre><code>protected void Button1_Click(object sender, EventArgs e)
{
try
{
Response.Write("<script>");
Response.Write("alert('Organizer added!');");
Response.Write("</script>");
}
catch (Exception Ex)
{
Response.Write(Ex.Message);
}
}
</code></pre>
<p>thanks in advance </p>
|
c# asp.net
|
[0, 9]
|
4,929,616
| 4,929,617
|
javascript variable in quoted php code in javascript
|
<p>the title sounds weird, but here's my question.
I am making this loop in Javascript that needs to call PHP variables. </p>
<pre><code> var data = new Array("<?php echo count($result) ?>");
for (var i=0; i < "<?php echo count($result) ?>"; i++) {
data[i] = "<?php echo $result[i] ?>";
}
</code></pre>
<p>The third line is the problem.
I tried </p>
<pre><code> data[i] = "<?php echo $result [" + i + " ] ?>";
</code></pre>
<p>but it didn't work.</p>
<p>Any clever tip to solve this??</p>
|
php javascript
|
[2, 3]
|
62,265
| 62,266
|
javascript test if div has text in it
|
<pre><code>1. <div id="div_Msg"> Test the div </div>
2. <div id="div_Msg"> </div>
</code></pre>
<p>In the first instance there is the text in the div. In the second instance there is no text. Using javascript how can it be tested if a div has text in it.</p>
|
javascript jquery
|
[3, 5]
|
2,630,016
| 2,630,017
|
If element exist then check?
|
<p>The code does work below when the access to the webpage, it automatically hide <code>#OrderDeliveryAddress</code> div. But I am wondering is this correct way doing it?</p>
<p>Is there a way to check if <code>.selectAddressList</code> div/class exist first and then check the value?</p>
<pre><code>$(document).ready(function() {
if ($(".selectAddressList").val() == "selectAddressBook") {
$("#OrderDeliveryAddress").hide();
}
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,048,669
| 2,048,670
|
Trouble having java and javascript interact
|
<p>I have seen several questions similar to mine, but none seem to quite answer my question. </p>
<p>I have some javascript in my assets folder, and i want to use a WebView (or any other way that works) to bind a java object to it so that my server can send updates to my js, and then have my js call my java object. </p>
<p>I have tried loadUrl() and loadDataWithBaseURL() and neither seem to work, I use the getURL() after setting it to check it and it always returns null. After looking at the other questions, I can tell I'm referencing the path correctly (or at least the same as them). </p>
<p>I should note that it is a .js file, not an html file with js in it. However, I haven't seen anything saying that doesn't work / I shouldn't do that. </p>
<p>Here is my code to set it:</p>
<pre><code> interacter = (WebView) findViewById(R.id.interact);
interacter.getSettings().setJavaScriptEnabled(true);
interacter.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
interacter.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
interacter.setClickable(true);
interacter.addJavascriptInterface(game, "Android");
//loadDataWithBaseURL was here
Log.i("Path is", interacter.getUrl() +" ");
</code></pre>
<p>Am I doing something wrong, is there a better way to do it, does this even work?</p>
<p><strong>EDIT</strong></p>
<p>I noticed used the loadDataWithBaseURL() wrong (the commented line in my code was where it was), and I am looking into that at the moment. Help on this still appreciated </p>
|
java javascript android
|
[1, 3, 4]
|
316,172
| 316,173
|
How to get the html so its not encoded?
|
<p>I am getting the value of a <strong>fckeditor</strong> with javascript to show in a dialog as preview. Now I want it to show the html tags like I input them but instead it shows me this</p>
<pre><code><p>&lt;div&gt;test&lt;/div&gt;</p>
</code></pre>
<p>that is <code><div>test</div></code></p>
<p>I use this following code</p>
<pre><code>function test() {
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1');
var pageValue = oEditor.GetHTML(true);
alert(pageValue);
}
</code></pre>
<p>I have tried to change settings like</p>
<pre><code>FCKConfig.HtmlEncodeOutput = false;
FCKConfig.ProcessHTMLEntities = true;
FCKConfig.FormatSource = false;
</code></pre>
<p>No luck with that. I am getting a little frustrated with this problem now.
Anybody got a idea why?</p>
|
javascript jquery
|
[3, 5]
|
104,506
| 104,507
|
Undefined function error
|
<p>Function <code>letswin()</code> not working. I couldnt find a way to fix. Thank you for your helps.</p>
<pre><code>var pathArray = window.location.pathname.split( '.html' );
var pathArray = pathArray.reverse();
var pathArray = pathArray .join('');
var pathArray= pathArray .split('/');
var bidnum=pathArray[3];
$(document).ready(function(){
$('body').append("<div id=\"cdjs\" style=\"position: absolute; top: 30px; background-color: gray; box-shadow: 0px 0px 0px 3px; left: 30px;\" onClick=\"letswin()\">Click to start</div>");
});
function checkandbid(){
$.get("http://www.bigibid.com/LiveResponder/LR.bid?_as="+bidnum, function(data){
Marray = data.split("'te':'")
time = Marray[1].split("'")
time = time[0]
$('#cdjs').html(time);
if (time < 2 && able==1){
able=0;
$('#ctl00_ContentPlaceHolder1_ibBid').click();
} else {
able=1;
}
});
}
function letswin(){
setInterval(checkandbid, 300);
}
</code></pre>
<p>here you can use <a href="http://jsfiddle.net/LKZcT/3/" rel="nofollow">jsFiddle</a></p>
|
javascript jquery
|
[3, 5]
|
1,324,006
| 1,324,007
|
Is it possible to change button postbackurl via javascript?
|
<p>I have a sever control button.
Is it possible to set postbackurl of the button via javascript?</p>
<pre><code><asp:Button name="Button1" ID="Button1" runat="server" Text="Search" OnClick="Button1_Click" OnClientClick="return searchSubmit();" PostBackUrl="" >
</code></pre>
|
javascript asp.net
|
[3, 9]
|
433,227
| 433,228
|
get value of div class in jquery drop event
|
<p>Using jQuery, I am trying to capture and display the value of a div class when it is 'dropped'.
For example, I want to display '01:20' when this particular element is dropped.
div class='routineTime'>01:20 /div></p>
<p>Additionaly, I want to sum and display a running total of these dropped elements.</p>
<p>I have an example in jsfiddle, but it's only displaying the 'routineTime' of the first element
that is dropped. I need to sum and display 'routineTime' for each element that is dropped.</p>
<p><a href="http://jsfiddle.net/n2learning/QfFQ9/9/" rel="nofollow">http://jsfiddle.net/n2learning/QfFQ9/9/</a></p>
<p>Appreciate any help!</p>
<p>DK</p>
|
javascript jquery
|
[3, 5]
|
3,125,506
| 3,125,507
|
How to get the element made (not target) the event in jQuery?
|
<pre><code><a class='tagselector' style="width=100px;height:100px">
<div style="margin-top:12px;">
MyName
</div>
</a>
</code></pre>
<p>In the above Mark up if I made a script as shown below (in ready() function)</p>
<pre><code>$(".tagselector").click(function(clickevt){
console.log($(clickevt.target));
});
</code></pre>
<p><code>$(clickevt.target)</code> This will return either <code><div></code> or <code><a></code> Tag upon click. I want to get the tag that made this click.</p>
<p>NB: Please edit the question if necessary!</p>
|
javascript jquery
|
[3, 5]
|
399,827
| 399,828
|
Asp.net codebehind from javascript?
|
<p>Is it possible to call asp.net codebehind function from javascript in vs2008?<br>
My problem is, I have two codebehind methods, one is for some validation and it will return true or false.
This method will be called when user click submit button and if return value is true,
I want to call javascript function for confirm(confirm dialog box) and if it is OK,<br>I will call
another codebehind method for update. If validation method return false or javascript cancel,
nothing changes.
Now, my code is like this:</p>
<pre><code><script language="javascript" type="text/javascript">
function Confirm()
{
var checkUpdate = confirm("Do you wish to save changes?");
if (checkUpdate)
{
return true;
}
else
{
return false;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if(CheckValidate())
{
string script = "<SCRIPT LANGUAGE='JavaScript'> ";
script += "Confirm()";
script += "</SCRIPT>";
Page.RegisterStartupScript("ClientScript", script);
//If Javascript Ok Call Update,Otherewise,nothing;
}
}
private boolean CheckValidate()
{
return boolean;
}
private void UpdateData()
{
//Update;
}
</code></pre>
<p>However, it goes immediately to update method and after updating, javascript confirmation box
comes out.</p>
<p>How i change to get right sequence? please give me the right way.</p>
|
javascript asp.net
|
[3, 9]
|
5,513,508
| 5,513,509
|
Error message in Eclipse
|
<p>Can any one tell me what shall I do when <code>Eclipse</code> shows this message:</p>
<pre><code>[2012-02-28 10:57:34 - LMP] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
</code></pre>
<p>Actually it was shown when I took a project from anther laptop then I added it to my workspace then I imported it to my eclipse.</p>
|
java android
|
[1, 4]
|
4,795,004
| 4,795,005
|
Jquery X,Y position send over ajax
|
<p>I need an example that uses jquery to send the current x,y position of a <code><div></code> (the top left pixel) to a php file using ajax where the position can then be processed.</p>
|
php jquery
|
[2, 5]
|
2,337,920
| 2,337,921
|
possible for a modal window to automatically scroll to a designated point?
|
<p>Can someone tell me...</p>
<p>Would it be possible to open an external webpage in a modal window... and have that new page scroll to a certain point (e.g an anchor)? </p>
|
javascript jquery
|
[3, 5]
|
1,012,274
| 1,012,275
|
How to prevent script loading in different domain
|
<p>I have <code><script src="bla"></script></code> that can be loaded in several domains.
I want to know if there is a way to control the domains it will be loaded on.
To clarify: My script is server-side rendered, so basically I can return empty string if the requested domain is invalid.</p>
<p>This is to prevent from other sites embedding my script.</p>
<p>Thanks!</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
2,368,914
| 2,368,915
|
An Run Time Error with Radio Group
|
<p>I wrote this code but it shows RunTime error</p>
<pre><code> public void onCheckedChanged(RadioGroup GenderSelection,int arg2) {
// TODO Auto-generated method stub
switch(arg2){
case R.id.radio0:
CaseGender="Male";
break;
case R.id.radio1:
CaseGender="Female";
break;
}
</code></pre>
<p>I couldn't chose the second radio button
what shall I do ?</p>
|
java android
|
[1, 4]
|
1,517,929
| 1,517,930
|
Setting new pages linked by an Activity
|
<p>In the application I am writing, I have a main class which extends the ListActivity - it contains a list of elements. I want these elements to link to a different page (an xml one, or perhaps a View object). However, I realised one cannot use the method <code>setContentView(int)</code> on a ListActivity object.</p>
<p>What's to be done?</p>
<p>Thanks!</p>
|
java android
|
[1, 4]
|
5,428,108
| 5,428,109
|
Infinite loop wait 2 second, make server call jquery
|
<p>I am making a simple game with jquery and i want to make a call to asp.net web service which i know how to do, but the server call need to continue to run until i get a specific response from the server.</p>
<p>I will wait like 3 seconds with each loop cycle</p>
<pre><code>function servercall() {
while (true) {
// code for clone and insert ...
$.ajax({
type: "POST",
url: "Server.asmx/HelloWorld",
data: "{'name': '" + $('#name').val() + "', 'time': '2pm'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
AjaxSucceeded(msg);
},
error: AjaxFailed
});
setTimeout("nothing", 2000);
}
}
</code></pre>
|
asp.net jquery
|
[9, 5]
|
388,352
| 388,353
|
JQuery basic form post
|
<p>I am validating a form but when the validation is not passed it still posts the form. How do I prevent the this?</p>
<pre><code><form action="/Account/Registration" method="get">
<fieldset id="enterCode">
<ul>
<li class="inputBlock">
<input type="text" id="Code" name="Code" value="">
</li>
</ul>
</fieldset>
<div class="submitBlock">
<input type="submit" value="Send" class="button" onclick="validate();" />
</div>
</form>
<script type="text/javascript">
function validate() {
var val = $('#Code').val();
if (val == "") {
alert("Please enter code");
}
return false;
}
</script>
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,339,525
| 5,339,526
|
I want to Remove URL Parameter. It is possible?
|
<p>I want to remove URL Parameter. <strong>But i don't want to use PostBack and Redirect method</strong>. It is possible? </p>
<p>E.g</p>
<p></p>
<p>I want to remove parameter id.</p>
<p>After remover parameter, i want to see this url.</p>
<p></p>
<p>Can i do JavaScript or JQuery or asp.net? Please help me. Thanks you.</p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
2,643,275
| 2,643,276
|
Comparing existing and modified values of chekbox column in datagrid
|
<p>I have datagrid which shows activity name and a checkbox column. User checks the checkbox if he/she wants to select that activity and presses submit button to successfully add it.</p>
<p>If user wants to un-check the checked checkboxes i have to make certain validation to check whether that activity is currently associated with any other thing or not.</p>
<p>How can i do that?</p>
|
c# asp.net
|
[0, 9]
|
121,228
| 121,229
|
custom validator function doesnt work in external javascript file
|
<p>I face aproblem that i have texetbox embeded in gridview related ton custom validator with client-side validation method ...it was working well..and when i moved it to an external JavaScript file it stop working</p>
|
javascript asp.net
|
[3, 9]
|
360,721
| 360,722
|
How to differentiate actual mouse clicks from script generated clicks?
|
<p>I have tabs.It has auto play.</p>
<p>Take a look for example : <a href="http://jsfiddle.net/w3father/YEcZc/" rel="nofollow">http://jsfiddle.net/w3father/YEcZc/</a></p>
<p>How do I get click detail which suggests if it is a click from script?</p>
|
javascript jquery
|
[3, 5]
|
514,691
| 514,692
|
NullPointerException - onPause()
|
<p>This is goign to be very simple i expect to sort out and just me being a newbie going about in circles. </p>
<p>I have multiple tabs across my screen. The following code should read a text input and assign its value to Shared Preferences when another tab is selected. However, whenever i change to another tab my code fails with a NullPointerException - I believe i have tracked it down to the onPause() of the below code, and I believe it is because i am failing to pass the data within the variable correctly.</p>
<p>Any pointers appreciated!</p>
<pre><code>package com.androidbook.epcsn;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
@SuppressWarnings("unused")
public class jobActivity extends Activity {
public static final String SN_PREFERENCES = "SiteNotePrefs";
SharedPreferences mPrefSettings;
String jobID;
String jobAddress ;
String jobPostcode ;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.joblayout);
final SharedPreferences mPrefSettings = getSharedPreferences (SN_PREFERENCES, Context.MODE_WORLD_WRITEABLE);
initjobID();
initjobaddress();
initjobpostcode();
}
private void initjobpostcode() {
EditText jobPostcode = (EditText)findViewById(R.id.jobPostcodeText);
}
private void initjobaddress() {
EditText jobAddress = (EditText)findViewById(R.id.jobAddressText);
}
private void initjobID() {
EditText jobID = (EditText)findViewById(R.id.jobIDText);
}
@Override
protected void onPause(){
super.onPause();
String strjobID = jobID;
String strjobAddress = jobAddress;
String strjobPostcode = jobPostcode;
Editor editor = mPrefSettings.edit();
editor.putString("jobID", strjobID);
editor.putString("jobAddress", strjobAddress);
editor.putString("jobPostcode", strjobPostcode);
editor.commit();
}
}
</code></pre>
|
java android
|
[1, 4]
|
1,467,458
| 1,467,459
|
Opening Twitter share page in a popup
|
<p>I am trying to get an external url to open in a popup so I foind this code and I'm trying to get it to work.</p>
<p>This is what I've got:</p>
<p>The JS:</p>
<pre><code>$(document).ready(function() {
$.get('http://www.mydomain.com/',function(data) {
$(this).simpledialog({
'mode' : 'blank',
'prompt': false,
'forceInput': false,
'useModal':true,
'fullHTML' : data
});
});
});
</code></pre>
<p>The Link:</p>
<pre><code><a id="mylink" href="http://www.twitter.com/share?url=http://www.mydomain.com/somepage.html">
</code></pre>
<p>My problem is that it's not opening in a popup so I'm I missing something here?</p>
|
javascript jquery
|
[3, 5]
|
1,730,424
| 1,730,425
|
Radio button array get id using jquery
|
<p>I have a issue with radio button array. I have 1 timer when timer is 0 and select 1 radio button then that value get in jquery.</p>
<pre><code><li>
<span class="option">Option1 : Value1 </span>
<input type="radio" name="cmbans[][1]" id="cmbans[][1]" value="Value1" />
</li>
<li>
<span class="option">Option2 : Value2 </span>
<input type="radio" name="cmbans[][2]" id="cmbans[][2]" value="Value2" />
</li>
<li>
<span class="option">Option1 : Value1 </span>
<input type="radio" name="cmbans[][3]" id="cmbans[][3]" value="Value3" />
</li>
</code></pre>
<p>This radio button name or id get in jquery but problem is this is array so how can i get this. Pls help me.</p>
<p>Thanks in advance</p>
|
php jquery
|
[2, 5]
|
666,502
| 666,503
|
Canvas cannot read property of undefined
|
<pre><code>function getMousePos(canvas, evt) {
var rect = canvas.getBoundingClientRect();
return {
x: evt.clientX - rect.left,
y: evt.clientY - rect.top
};
}
setInterval(function (evt) {
if (frame < 4) {
frame += 1;
} else {
frame = 0;
}
var mousePos = getMousePos(canvas, evt);
// ...
}, 500);
</code></pre>
<p>Hello I am new to jQuery/JavaScript, why does <code>evt.clientX</code> throws </p>
<blockquote>
<p>cannot read property of undefined</p>
</blockquote>
<p>?</p>
|
javascript jquery
|
[3, 5]
|
3,840,040
| 3,840,041
|
how to bind function on dynamically created node
|
<p>I'm writing a placeholder enabling function</p>
<pre><code>var t=document.createElement("input");
"placeholder" in t||$("input").each(function(){
if("submit"!==$(this).attr("type")){
var n=$(this),l=n.attr("placeholder");
n.css("color","#ccc").val(l);
n.focus(function(){("#ccc"==n.css("color")||"rgb(204, 204, 204)"==n.css("color"))&&n.val("").css("color","#000")});
n.blur(function(){""==n.val()&&n.css("color","#ccc").val(l)})}
})
</code></pre>
<p>I can call this function on dom ready, but how to use this function on newly created <code>input</code>?</p>
|
javascript jquery
|
[3, 5]
|
1,725,693
| 1,725,694
|
JQuery Ajax Binding
|
<p>Below is the simple code that should display Ajax loading animation when form is submitted:</p>
<pre><code>var init = function() {
$("form").bind('ajax:beforeSend', function() {
$("#comments_loading").show();
});
$("form").bind('ajax:complete', function() {
$("#comments_loading").hide();
});
};
$(document).load(init);
</code></pre>
<p>It's purpose is to display the loading animation on Ajax request. It works perfectly, but... only for the first form submit!!! Any suggestions why/how can this be addressed can be much appreciated.</p>
<p>Thanks a lot.</p>
|
javascript jquery
|
[3, 5]
|
797,028
| 797,029
|
Android Download file from Link
|
<p>I am trying to download file from one android mobile to other via Ip+port.
i can sucessfully download file from other mobile if i write the url in Web Browser of mobile.
the URL is like this</p>
<pre><code> http://172.20.99.238:9999/file/3/001_01.mp3
</code></pre>
<p>but i am unable to download this file via code</p>
<pre><code> String downLoadLink = "http:/"+url+":9999/file/"+fileID+"/"+fileName;
//downLoadLink = downLoadLink.replace(" ", "");
Intent downloadIntent = new Intent(Intent.ACTION_VIEW);
downloadIntent.setData(Uri.parse(downLoadLink));
startActivity(downloadIntent);
</code></pre>
<p>Any Solution of this Problem</p>
|
java android
|
[1, 4]
|
888,459
| 888,460
|
How to get count similar word in list?
|
<p>I have C# list with lot of similar name i want to count all individual similar word.</p>
<p>Example</p>
<p>Suppose list has these values</p>
<pre><code>one,one,one,two,two,four,four,four
</code></pre>
<p>then i want to calculate like this </p>
<pre><code>one 3
two 2
four 3
</code></pre>
<p>how can i calculate value like this from list.</p>
|
c# asp.net
|
[0, 9]
|
5,001,474
| 5,001,475
|
Change margin of one class if another class display: none
|
<p>I need to setup an if statement similar to:</p>
<p>If <code>divID1</code> element <code>style="display:block"</code> then <code>divCLASS1</code> add CSS <code>style="margin-right:0px"</code>.</p>
<pre><code><script type="text/javascript">
<!--
if ($('#w2btoTop').element.style('display') == 'block')
$(".livehelp").css('margin-right','0px');
}
//-->
</script>
</code></pre>
<p>I dont know to much of what Im doing but would love to see if I'm close to a solving this at all! </p>
|
javascript jquery
|
[3, 5]
|
5,493,868
| 5,493,869
|
CSS Using to Make Many backgrounds Move at speeds that are different by mouse
|
<p>Hi i want to create an affect where background move to the mouse at different speeds to make an affect almost like 3d.</p>
<p>This is what i want to make that with which i have found <a href="http://www.freeglance.co.uk/submit" rel="nofollow">found this</a></p>
<p>can someone explained to me or show me some script that will do this please.</p>
|
javascript jquery
|
[3, 5]
|
1,719,498
| 1,719,499
|
Allow a web application to access a local file
|
<p>If I have a web application that needs to use a file, it presents the user with a standard open file dialog. But instead of uploading the file to server can it modify the file locally in a temporary location, while uploading in the background? That way the user does not have to wait for the upload before they can use my web app.</p>
|
php asp.net
|
[2, 9]
|
1,730,229
| 1,730,230
|
PHP & Jquery Image crop and upload
|
<p>When a user uploads a picture, pop up window should come, where he'll crop the image, after this is done. I want to use php script to upload this to folder but i want cropped image and thumbnail of cropped image to be present.After cropping is done,then he'll click upload button which will upload cropped image then create thumbnail of it and upload them to a folders.</p>
<p>I tried many plug-ins but could not find one for my requirement.</p>
<p>Plug-ins that i tried are <a href="http://deepliquid.com/projects/Jcrop/demos.php" rel="nofollow">http://deepliquid.com/projects/Jcrop/demos.php</a></p>
<p><a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-jquery-image-cropping-plug-in-from-scratch-part-ii/" rel="nofollow">http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-jquery-image-cropping-plug-in-from-scratch-part-ii/</a></p>
<p></p>
<p>Any help would be appreciated</p>
|
php jquery
|
[2, 5]
|
351,395
| 351,396
|
how to show .pdf file in asp.net web application using c#?
|
<p>i have fileUpload control on web page and a button to show .pdf file in a rich text box. but i dont know how to open apdf file ? can i use some pdf library?</p>
|
c# asp.net
|
[0, 9]
|
4,367,272
| 4,367,273
|
How Do I pass Values into an imagebutton click event in c#?
|
<p>Trying to pass some values into an imagebutton click event, something like this:</p>
<pre><code><asp:ImageButton id="imagebutton1" runat="server" AlternateText="5 Star Luxury Villas in North Cyprus" ImageUrl="/download/1/luxury_villas.jpg" OnClick="ImageButton_Click('value1', 'value2')"/>
</code></pre>
<p>then in code behind:</p>
<pre><code> protected void ImageButton_Click(object sender, ImageClickEventArgs e, string value1, string value2)
{
Response.Write(Value2);
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
3,557,729
| 3,557,730
|
Pass var through JQuery load
|
<p>a very simple question I am sure just the brain isn't working this morning.</p>
<p>I have the folowing code I am using with JQuery and the Google Maps v3 API. I basically am trying to refresh a map with new search results once it has been dragged to a new location. </p>
<pre><code>google.maps.event.addListener(
map, 'dragend', function() {
var newlatlng = map.getCenter();
$('#venue-list-container').load('/maps/geoMap.php?',{latlon: newlatlng});
});
</code></pre>
<p>However I can't find what to use in the parameters after the url to post the newlatlng value (latlon: newlatlng). At the moment it doesn't work</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.