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,392,910
| 2,392,911
|
Access web.config key from codebehind
|
<p>I have a key in the web.config file like:</p>
<pre><code><add key="MailFrom" value="my@email.com"/>
</code></pre>
<p>I need to access it in the code behind.How to do this in c#?</p>
|
c# asp.net
|
[0, 9]
|
2,393,621
| 2,393,622
|
How to make a protection of many times pressing the button?
|
<p>In my app I use a camera, and I want to take a pictures. In my app is button (Photo). If I press it one times - all work perfect, but if I press button many times until camera take picture, my app hangs. How can I fix it?</p>
|
java android
|
[1, 4]
|
5,512,865
| 5,512,866
|
ByteBuffer allocateDirect taking a really long time
|
<p>I'm using float buffers as direct byte buffers as required for opengl drawing in Android. The problem that is that upon creating the byte buffer, the GC goes crazy---as in 30s+ crazy. I'm creating a mesh of 40x40 vertices, or 1600 vertices, or 4800 floats. As per the profiler, the culprit that calls the GC is ByteBuffer.allocateDirect. </p>
<p>Is this normal or expected for creating a mesh this size? It seems pretty tame. </p>
<p>The buffer init() code is below:</p>
<pre><code>public static FloatBuffer createFloatBuffer(int capacity) {
ByteBuffer vbb = ByteBuffer.allocateDirect(capacity * 4);
vbb.order(ByteOrder.nativeOrder());
return vbb.asFloatBuffer();
}
</code></pre>
|
java android
|
[1, 4]
|
1,779,245
| 1,779,246
|
Show first and last page only when there is more than one page number using jquery or javascript?
|
<p>I have two buttons like this:</p>
<pre><code> <button class="next_prev" onclick="" id="first_buttons" disabled>{{ pages.first }}</button>
<button class="next_prev" onclick="" id="last_buttons" disabled>{{ pages.last }}</button>
</code></pre>
<p>If there is only one page by default the page {{ pages.first }} and {{ pages.last }} store the page number 1 and 1 and show it. But I only want to show these two buttons if page number is great than 1. I get page length like this:</p>
<pre><code><p> <span>{% get_pages %} {{ pages|length }} pages</span> </p>
</code></pre>
<p>Can it be done in jquery or javascript? Thanks</p>
|
javascript jquery
|
[3, 5]
|
463,751
| 463,752
|
When form submission not accepted, dependent selector is messed up
|
<p>I have a page with a selector/drop-down menu that's dependent on another selector. In other words</p>
<p>-there is selector 1, which contains some number of categories, and selector 2, which contains some number of subcategories for each category in selector 1. </p>
<p>-when the page loads, selector 1 has its full range of categories available, and selector 2 has its full range of subcategories available.</p>
<p>-when a selection is made on selector 1, the number of available subcategories on selector 2 is narrowed down (as appropriate for the option selected on selector 1) through $('selector1').change(function(){ [... functionality implemented ...] });</p>
<p>The problem is that when a user submits the form, and the form is not accepted (i.e. contains errors in the fields, fields are not filled-in, etc.), since the 'change' functionality is not re-triggered, the full number of subcategories becomes available on selector 2, which makes it possible for a user, through mischief or accident, to select a subcategory which does not apply to the category selected on selector 1. Any recommendations on how to best deal with this issue? Thank you!</p>
|
javascript jquery
|
[3, 5]
|
4,640,243
| 4,640,244
|
Turn Divs Off or On
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/14107856/switch-divs-off-on">Switch divs off/on</a> </p>
</blockquote>
<p>Firstly, I realize that I have previously asked this question but I did not find a good response, so I am trying for a second time lucky! </p>
<p>I have these divs (<em>they work similarly to buttons</em>) that I would like to be able to switch on/off whenever I choose.</p>
<p>This was my attempt, but apparently once a div is switched off it can't be switched on again.</p>
<p>FIRST,</p>
<pre><code> $("#num-one").off();
$("#num-two").off();
$("#num-three").off();
</code></pre>
<p>THEN LATER ON,</p>
<pre><code> $("#num-one").on();
$("#num-two").on();
$("#num-three").on();
</code></pre>
<p>These are my functions:</p>
<pre><code>$("#numOne").click(function(){
doSomething();
});
$("#numTwo").click(function(){
doSomething();
});
$("#numThree").click(function(){
doSomething();
});
</code></pre>
<p>These functions should work - but they should be able to stop working for sometime - disabled I guess - and re-enabled after sometime.
What is another way of achieving this?</p>
<p>Happy New Year!</p>
|
javascript jquery
|
[3, 5]
|
5,147,365
| 5,147,366
|
I have a 3rd party digital signature Java applet that is having issue on "some" client computers, I know how to verify the version but .
|
<p>I wish I had more specifics, I don't have browser or java versions of the client computers having issues. As it stands right now I have a java applet that just checks the version if the client clicks it. Is there a way to check version before the page loads? I'd rather be proactive than reactive on the page. I've checked documentation <a href="http://download.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html" rel="nofollow">here</a> but without having access to the digital signature applet code, am having trouble wrapping my head around it.</p>
|
java javascript
|
[1, 3]
|
1,163,915
| 1,163,916
|
How to put php inside javascript?
|
<p>How to put php inside javascript?</p>
<p><strong>I try (but its not working):</strong></p>
<pre><code><?php
$htmlString= 'testing';
?>
<html>
<body>
<script type="text/javascript">
var htmlString=<?php echo $htmlString; ?>;
alert(htmlString);
</script>
</body>
</html>
</code></pre>
<p>tutorial that I use for that parpose:
<a href="http://web-design.lovetoknow.com/Define_PHP_Variables_Inside_Javascript" rel="nofollow">http://web-design.lovetoknow.com/Define_PHP_Variables_Inside_Javascript</a></p>
<p><strong>Thanks</strong></p>
|
php javascript
|
[2, 3]
|
2,044,024
| 2,044,025
|
Adding "pause" to the Image Slider
|
<p>Best way to add pause button in this jQuery image slider? I want to add Pause on clicking the orange square shapes button which is working as a timer in my image slider.</p>
<p>Here is the link with what I tried. </p>
<p><a href="http://jsfiddle.net/QNZDX/4/" rel="nofollow">http://jsfiddle.net/QNZDX/4/</a> </p>
<p>For better understanding I am adding the reference site, Here we can find the pause functionality as clicking the orange square shapes.
<a href="https://store.sap.com/sap/cpa/repository/store/sapstore/US/default.html" rel="nofollow">https://store.sap.com/sap/cpa/repository/store/sapstore/US/default.html</a></p>
<p>This reference site works only in Mozilla Firefox.</p>
|
javascript jquery
|
[3, 5]
|
5,580,630
| 5,580,631
|
Close popup (div) jquery
|
<p>I have a div which appears when a textbox gets focus. DIV has <em>n</em> number of textboxes. I want to say display:none when a user Clicks anywhere in the window. Div should not close if the user is switching between textboxes. </p>
<p>All these jquery plugins, say the calendar control closes if user clicks outside. How is that happening? Any idea?</p>
|
c# jquery
|
[0, 5]
|
5,790,006
| 5,790,007
|
Preventing users from editing hidden form fields
|
<p>I currently have a set of hidden input, the values are altered with jQuery.</p>
<pre><code>echo "<input type='hidden' id='stack-information-1' value='$clickedtitle' readonly />
<input type='hidden' id='stack-information-2' value='$guidelinename' readonly />
<input type='hidden' id='stack-information-4' value='$clickedid' readonly />
<input type='hidden' id='stack-information-5' value='$starter' readonly />
<input type='hidden' id='stack-information-6' value='$category' readonly />
<input type='hidden' id='stack-information-7' value='$sid' readonly />
<input type='hidden' id='stack-information-8' value='$clickedposition' readonly />
<input type='hidden' id='stack-information-9' value='0' readonly />";
</code></pre>
<p>I don't want the user to be able to change these values via hacking etc. This isn't valuable information, just integers and non-important strings. However what security measures do i take to prevent the user changing these values? Do i save the values in sessions?.. if so how do i access the values with jquery?</p>
|
php jquery
|
[2, 5]
|
1,316,014
| 1,316,015
|
How to hide a text after 5 sec using jQuery?
|
<p>How can I hide the #results after 5 secs ? I tried this but it does not work.</p>
<pre><code>$('#results').hide().html(data).fadeIn('slow').delay(5000).hide();
</code></pre>
<p>What I had is this one</p>
<pre><code>$('#results').hide().html(data).fadeIn('slow');
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,614,780
| 1,614,781
|
Why doesn't .slideDown( ) work with this If/Else statement?
|
<p><a href="http://jsfiddle.net/4SbXV/" rel="nofollow">http://jsfiddle.net/4SbXV/</a></p>
<p>It worked fine before adding the if/else statement so I'm a little confused on what happen. I'm just trying to get it to just fade out and fade in the new content when it is clicked if the #projectpanel is displayed.. any ideas on why this isnt working?</p>
<p>Also having problems with the close button if any1 can point out what I'm doing wrong with that since its not doing anything at all</p>
|
javascript jquery
|
[3, 5]
|
5,147,430
| 5,147,431
|
How to know whether checkbox is checked or not, jquery?
|
<p>Is there any better way to do this :</p>
<pre><code>var IsC = $('input[type=checkbox]').attr("checked") == "checked" ? true : false;
</code></pre>
<p>?</p>
|
javascript jquery
|
[3, 5]
|
654,084
| 654,085
|
Disable notification of incoming/outgoing SMS in android
|
<p>Is it possible to disable SMS received and send notification in status bar ??
What is the procedure to do this ?</p>
|
java android
|
[1, 4]
|
6,000,649
| 6,000,650
|
$("#submit").click not working :/
|
<p>I've tried everything I can think of to get this "send" button to work, but I'm not very good at javascript :(</p>
<p><a href="http://www.kimscakes.biz/contactme.php" rel="nofollow">http://www.kimscakes.biz/contactme.php</a></p>
<p>Prehaps someone here can tell me where i'm going wrong?</p>
<p>Many thanks</p>
<p>Gem</p>
|
javascript jquery
|
[3, 5]
|
5,916,769
| 5,916,770
|
Displaying Parent/Children name with indent
|
<p>i have an object that have parent/children relationship.</p>
<p>below is shorter version of what i have but the below is the core props</p>
<pre><code>public class Company
{
Name {get;set;}
List<Company> ChildCompany {get;set;}
}
</code></pre>
<p>displaying something like this:</p>
<pre><code>-----ABC Corporation (in this chas ABC has child company so it will display right indent)
----------ABC Child
----------ABC One
----------ABC Two
-----BBC Corporation (in this case no child company)
-----CBS
-----CNN Corporation
----------ABC
----------BBC
----------NBC
</code></pre>
<p>my code:</p>
<pre><code>Company company = new Company();
company = GetDataForCompany(); //DAL
if(!string.IsNullEmpty(company.Name))
{
//dispaly Name
PlaceHolder ph;
l = new Literal();
l.Text = "<ul>" + Environment.NewLine;
ph.Controls.Add(l);
l = new Literal();
l.Text = "<li">";
ph.Controls.Add(l);
hl = new HyperLink();
hl.Text = company.Name;
ph.Controls.Add(hl);
foreach (Company item in company)
{
l = new Literal();
l.Text = "<li">";
ph.Controls.Add(l);
hl = new HyperLink();
hl.Text = item.Name;
ph.Controls.Add(hl);
}
}
</code></pre>
<p>the above code does not seems to rendering exactly what i wanted as shown above.</p>
|
c# asp.net
|
[0, 9]
|
4,227,964
| 4,227,965
|
Creating a new DOM Element with multiple elements inside and attach to the DOM
|
<p>Given this element:</p>
<pre><code><div class="box" id="trololo">
<h2 class="header gradient-red"></h2>
<div class="body">
<div class="queue">
<ul class="queue-list">
</ul>
</div>
<div class="time">
</div>
</div>
</div>
</code></pre>
<p>Which is a skeleton, I would like to insert it in the DOM, hidden and animate it's entry. I really love this way, because it's elegant:</p>
<pre><code>jQuery('</div>',{
id: 'trololo',
class: 'box'
}).hide().appendTo('#anotherDiv').fadeIn('slow');
</code></pre>
<p>But, how could I chain multiple elements like this?</p>
<p>I've thought about adding the whole html in the <code>html</code> property but doesn't sound fine for me.</p>
|
javascript jquery
|
[3, 5]
|
873,997
| 873,998
|
add pages to masterpage gives me javascript error
|
<p>i have a page which uses some javascript code to run,it was working fine until i added it to master page, on adding it to master page it gives me an error from javascript</p>
<pre><code>var fu1 = document.getElementById("FileUpload1");
var ex1 = extension(fu1.value) ; object expected in fu1.value
</code></pre>
<p>i need to know where to add the javascript in master page</p>
|
asp.net javascript
|
[9, 3]
|
4,738,348
| 4,738,349
|
How to use jquery bubble popup for more than one content
|
<p>Hello i need to load an image from an database and the popup should be there when i keep the mouse over the images...i used <a href="http://www.vegabit.com/jquery_bubble_popup/" rel="nofollow">http://www.vegabit.com/jquery_bubble_popup/</a></p>
<pre><code>$(document).ready(function() {
$('#dummy1').SetBubblePopup({
innerHtml: '<p>You can set any HTML tag<br />inside this popup!<br /><a href="#">this is a link</a></p>'
});
});
</code></pre>
<p>how can i use this for some 10 images from database using php??</p>
|
php jquery
|
[2, 5]
|
1,539,715
| 1,539,716
|
Changes in ASP.NET from version 2.0 to 4.0?
|
<p>I wish to learn ASP.NET and found some good videos about it. But the thing is that they are for version 2.0 of the .Net Framework. Has ASP.NET changed drastically from version 2.0 till 4.0?</p>
|
c# asp.net
|
[0, 9]
|
2,358,791
| 2,358,792
|
what is the alternative class for AudioInputStream in java (Android)?
|
<p>About a year ago I started to built an application for android.
Now when I try to run it I get an exception about AudioInputStream class, After a short research that I did using GOOGLE I found out that android doesn't support this class anymore...
Is their any alternative for it?</p>
<p>This is the code that I wrote:</p>
<pre><code> private void merge2WavFiles(String wavFile1, String wavFile2, String newWavFilePath) {
try {
File wave1 = new File(wavFile1);
if(!wave1.exists())
throw new Exception(wave1.getPath() + " - File Not Found");
AudioInputStream clip1 = AudioSystem.getAudioInputStream(wave1);
AudioInputStream clip2 = AudioSystem.getAudioInputStream(new File(wavFile2));
AudioInputStream emptyClip =
AudioSystem.getAudioInputStream(new File(emptyWavPath));
AudioInputStream appendedFiles =
new AudioInputStream(
new SequenceInputStream(clip1, emptyClip),
clip1.getFormat(),
clip1.getFrameLength() + 100
);
clip1 = appendedFiles;
appendedFiles =
new AudioInputStream(
new SequenceInputStream(clip1, clip2),
clip1.getFormat(),
clip1.getFrameLength() + clip2.getFrameLength()
);
AudioSystem.write(appendedFiles, AudioFileFormat.Type.WAVE, new File(newWavFilePath));
} catch (Exception e) {
e.printStackTrace();
}
}
</code></pre>
|
java android
|
[1, 4]
|
4,435,007
| 4,435,008
|
Ajax syntax : Uncaught SyntaxError: Unexpected identifier
|
<p>I am getting this Uncaught SyntaxError: Unexpected identifier error , Why ?
I think i have used the syntax properly ?</p>
<pre><code>$.ajax({
url: "loadcontent1.php",
data: {
lastid: '$(".postitem").size()',
location: '$("#location").val()',
rstatus: '$("#rstatus").val()',
gender: '$("#gender").val()'
}
success: function(html) {
Uncaught SyntaxError: Unexpected identifier
if (html) {
$("#contentwrapper").append(html);
$('div#ajaxloader').hide();
$("#contentwrapper").masonry('reload');
FB.XFBML.parse();
} else {
$('div#ajaxloader').html('<center>No more Images.</center>');
}
}
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,727,898
| 5,727,899
|
Programmatically close aspx page from code behind
|
<p>What is the best way to close aspx page from the code behind? </p>
<p>I have an button eventhandler that I want to close the page after the user has clicked an ASP.NET button on the page. I have tried to programmatically add a javascript method that contains a window.close() command to the OnClientClick event to close the page but it does not work. The button is also a asp:AsyncPostBoskTrigger for an AJAX Update Panel.</p>
<p>It is an ASP.NET C# 3.5 application.</p>
|
c# asp.net
|
[0, 9]
|
2,301,200
| 2,301,201
|
how to make an checkboxlist select only two item?
|
<p>i have more than two checkboxlist. i want to limit users to select only 2 items for each checkboxlist.</p>
<pre><code> <asp:CheckBoxList ID="CheckBoxList1" runat="server">
<asp:ListItem Value="Item 1">Item 1</asp:ListItem>
<asp:ListItem Value="Item 2">Item 2</asp:ListItem>
<asp:ListItem Value="Item 3">Item 3</asp:ListItem>
<asp:ListItem Value="Item 4">Item 4</asp:ListItem>
</asp:CheckBoxList>
<asp:CheckBoxList ID="CheckBoxList2" runat="server">
<asp:ListItem Value="Item 1">Item 1</asp:ListItem>
<asp:ListItem Value="Item 2">Item 2</asp:ListItem>
<asp:ListItem Value="Item 3">Item 3</asp:ListItem>
<asp:ListItem Value="Item 4">Item 4</asp:ListItem>
</asp:CheckBoxList>
</code></pre>
<p>using javascript/jquery. Please help </p>
<p><strong>SOLUTION:</strong></p>
<pre><code><script type="text/javascript">
var i = 1;
$(document).ready(function () {
$('table[id^=CheckBoxList]').each(function (index) {
var id = '#' + this.id;
$(id).click(function (e) {
if ($(id).children().find('input[type="checkbox"]:checked').length > 2) {
e.preventDefault();
}
});
i++;
});
});
</script>
</code></pre>
<p>Thankz all :)</p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
3,562,712
| 3,562,713
|
How to pass all requests to handler using Visual Studio Development server?
|
<p>I've got an empty ASP.NET project with single HttpHandler, saved in Index.ashx. I want all requests to go through this, </p>
<pre><code>public void ProcessRequest(HttpContext context)
</code></pre>
<p>I've modified my project project properties so that it loads that handler by default. However, if I type a different Url in the browser it won't be passed through that handler. How do I get it to do that?</p>
|
c# asp.net
|
[0, 9]
|
1,603,887
| 1,603,888
|
Which JavaScript framework does Visual Studio natively support?
|
<p>Is it jQuery? Is there a way to integrate support for the excellent ExtJS or YUI libraries?</p>
<p>Any news on whether Visual Studio 2010 will support another JS framework?</p>
|
asp.net javascript
|
[9, 3]
|
2,117,451
| 2,117,452
|
jquery - Block specific links before a page fully loads and binds click events
|
<p>I have a modal dialog plugin written in jquery, that binds to the click event of all of the <a> elements with a specific class.</p>
<p>The modal dialog 'fetches' a page via AJAX, which is declared under the 'href' parameter of the <a> element.</p>
<p>Everything works fine, but - when a user clicks the <a> link before the page was fully loaded and ready (before the click event is binded to the element) - the browser navigates to the page declared in the 'href' parameter.</p>
<p>Any ideas of how to prevent this behavior? An ideal situation would be to ignore clicks on these elements before the page has fully loaded. Client-side performance is crucial.</p>
|
javascript jquery
|
[3, 5]
|
5,498,610
| 5,498,611
|
Array and for loop will not work with current setup where EditTexts are being defined
|
<p>I am trying to shorten my code by using a for loop and an array to define my declared edit texts but it won't work.</p>
<pre><code> final String[] names = new String[]{"ivTextView", "degreeTextView", "initialYTextView", "initialXTextView", "timeTextView", "distanceTextView", "peakTextView"};
int[] ids = new int[]{R.id.ivTextView, R.id.degreeTextView, R.id.initialYTextView, R.id.initialXTextView, R.id.timeTextView, R.id.distanceTextView, R.id.peakTextView};
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.results);
//Reference the TextViews
for(int i =0; i < names.length; i++ ){
names[i] = (TextView) findViewById(ids[i]);
}
</code></pre>
|
java android
|
[1, 4]
|
746,377
| 746,378
|
best way to check if 3 textboxes are empty
|
<p>I have 3 textboxes and I want to check if put together they all add up to greater than blank.
What's the best way to accomplish that?</p>
<pre><code> <asp:TextBox ID="tbDate" runat="server"></asp:TextBox>
<asp:TextBox ID="tbHour" runat="server"></asp:TextBox>
<asp:TextBox ID="tbMinutes" runat="server"></asp:TextBox>
<asp:CustomValidator ID="cvDateControlValidator" runat="server" ErrorMessage="Invalid Date"
ValidateEmptyText="True" ClientValidationFunction="validateDateOnClient" ControlToValidate="tbDate"
Display="Dynamic"></asp:CustomValidator>
<script type="text/javascript">
function validateDateOnClient(sender, args) {
if (args.Value.length > 0)
args.IsValid = false;
return args.IsValid;
}
</script>
</code></pre>
<p>One suggestion was: </p>
<pre><code>if (tbDate.value != '' || tbHour.value != '' || tbMinutes.value != '')
</code></pre>
<p>I want to make sure tbDate, tbHour, tbMinutes together is greater than blank before I perform the client-side validation.</p>
|
javascript asp.net
|
[3, 9]
|
4,629,682
| 4,629,683
|
Passing data between PHP webpages from a dynamically generated list
|
<p>I have a PHP code which generates a dynamic list inside a form like the following, note that the list is built dynamically from database:</p>
<pre><code>echo '<form name="List" action="checkList.php" method="post">';
while($rows=mysqli_fetch_array($sql))
{
echo "<input type='password' name='code' id='code'>";
echo "<input type='hidden' name='SessionID' id='SessionID' value='$rows[0]' />";
echo "<input type='submit' value='Take Survey'>";
}
</code></pre>
<p>What I need is to POST the data corresponding to the user choice when he clicks on the button for that row to another page.
If we use hyperlinks with query strings there will be no problem as I'll receive the data from the other page using a GET request and the hyperlinks would be static when showed to the user.
Also I need to obtain the user input from a textbox which is only possible with POST request.</p>
<p>Simply from the other page (checkList.php) I need these data for further processing:</p>
<pre><code>$SessionID=$_POST['SessionID'];
$Code=$_POST['code'];
</code></pre>
<p>As I have a while loop that generates the fields, I always receive the last entry form the database and not the one corresponding to the line (row) that the user chosed from the LIST.</p>
|
php javascript jquery
|
[2, 3, 5]
|
3,229,949
| 3,229,950
|
Combobox event is not geting invoked
|
<p>On click of a button a Combo Box gets displayed and on select of a Combo Box .
The change event is not getting called .</p>
<p>Please let me know where i am making the mistake .</p>
<pre><code><html>
<head>
<script src="jquery17.js" type="text/javascript"></script>
<script>
$("select").change(function(){
alert(this.id);
});
$(document).ready(function(){
$("button").click(function(){
var s = $('<select />');
var data = {
'foo': 'bar',
'foo2': 'baz'
}
for(var val in data) {
$('<option />', {value: val, text: data[val]}).appendTo(s);
}
s.appendTo('body');
});
});
</script>
</head>
<body>
<div id="div1"></div>
<button>Get External Content</button>
</body>
</html>
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,408,657
| 3,408,658
|
DetailsView how to save a field in underlying data
|
<p>I have a DetailsView which I use to edit some Fields.
In my code belove I try to
- Find the TextBox where User has left inout
- Sanitize using my own class the data inserted
Till now all is working just fine.</p>
<p>My questions is how to SAVE this data in the underlying Data Source using DetailsView?
Thanks for now!</p>
<pre><code> protected void uxAuthorListDetailsView_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
{
// Find out Controlls
TextBox myContentAuthor = (TextBox)uxAuthorListDetailsView.FindControl("uxContentAuthorInput");
myContentAuthor.Text = UserInputSanitizer.CapitalizeFirstLetterTrim(myContentAuthor.Text);
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
885,712
| 885,713
|
Replicating functionality of stackoverflow's tag system
|
<p>On stackoverflow, while in the Tag-inputbox if you hold the left key button, it will go all the way to the left and open every tag for editing, same goes for the right key, and the backspace.
<br>I am trying to replicate the same functionality on mine.</p>
<p>I have the following code: <a href="http://jsfiddle.net/hAKMN/" rel="nofollow">JSFiddle</a></p>
<p>The problem with the current code is that I am not sure how to implement the arrow keys movements.</p>
<p>Any ideas?</p>
|
javascript jquery
|
[3, 5]
|
2,583,353
| 2,583,354
|
jQuery - Building object arrays with html5 data attribute selection
|
<p>I'm using HTML 5 data attributes to key rows of data in a table. I need to iterate the rows and gather the data into an object collection. I created a class to represent my row data:</p>
<pre><code>function SomeItem(description, finalPrice, percentDiscount) {
this.Description = description;
this.FinalPrice = finalPrice;
this.PercentDiscount = percentDiscount;
}
</code></pre>
<p>An event fires which triggers the collection of this data.</p>
<pre><code>$.each($('.ItemPriceBox'), function () {
var uniqueid = $(this).data('uniqueid');
var finalPrice = $(this).val();
});
</code></pre>
<p>The final piece of data, percentDiscount should be retrieved using the <code>data-uniqueid</code> attribute. I'm not sure how to do this.</p>
<p>I want...</p>
<pre><code>SomeItem[] items;
$.each($('.ItemPriceBox'), function () {
var uniqueid = $(this).data('uniqueid');
var finalPrice = $(this).val();
var percentDiscount = $('.ItemDiscountBox').where("uniqueid = " + uniqueid);
items[i] = new SomeItem(uniqueid,finalPrice,percentDiscount);
});
</code></pre>
<p>How can I solve this?</p>
|
javascript jquery
|
[3, 5]
|
5,336,807
| 5,336,808
|
How to share variables between classes in javascript
|
<p>I am expanding my JS knowledge by building custom libraries on-top of jQuery/JS and the classes have to interact between each other. I am coming from PHP, so there I could use static variables, but have no idea in JS. Here is an example of what I want:</p>
<pre><code>var A = function() {
this.myPublicVar = "thisShouldBePrintedFromClassB";
}
A.prototype = {
showMyVar : function() {alert(this.myPublicVar);} // This gets triggered on direct access.
}
var B = function() {}
B.prototype = {
// I have no idea how to to access A.myPublicVar
}
</code></pre>
<p>Anyone could provide me with simple tutorial or anything?</p>
<p>PS: I have just started to expand my JS knowledge, have used JS/jQuery for easy design purposes (using selectors and building data validators and etc.)</p>
|
javascript jquery
|
[3, 5]
|
677,884
| 677,885
|
Local jQuery.js file not working
|
<p>I had downloaded jQuery.js file from jQuery.com .I have saved this file in 3 places, including JRE/Lib and desktop (where my HTML file which calls it is), to be sure that the jQuery.js file is found. I reference this js file as :</p>
<pre><code><head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(function(){
$("#clas").click(function(){
$(this).hide();
});
});
</script>
</head>
<body>
<p id="clas"> Hello</p>
<p>Hi</p>
</body>
</code></pre>
<p>When I ran this HTML file on Mozilla browser, I expected 'Hello' to vanish when I clicked on it, but it did not. It remained as solid as ever.
But when I used a jQuery CDN:</p>
<pre><code><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js">
</code></pre>
<p></p>
<p>And when I used an online HTML editor called Tryit Editor v1.5, it worked correctly!
It seems only the local jQuery.js is not doing its part. The JavaScript works fine, only the $() part doesn't. I'm using jdk1.6. I wonder why this snag has occurred. How to resolve it? Help.</p>
|
javascript jquery
|
[3, 5]
|
3,975,123
| 3,975,124
|
javascript formatting opinion: ' vs "
|
<p>In looking up jquery examples, I see that authors tend to go with ' or " to enclose, selectors, for example.</p>
<p>As in:</p>
<p>$('#tags').click ...</p>
<p>or </p>
<p>$("#tags").click</p>
<p>Is this a personal style thing, or is there a reason why one is better than the other?</p>
<p>In my brief experience, I find that ' is faster to type. Also, building up json parameters is easier with ' because you can easily escape " in strings.</p>
|
javascript jquery
|
[3, 5]
|
5,172,599
| 5,172,600
|
Not closing cursor or database object?
|
<p>I get this error after going to this activity, starting a new one, coming back. It doesn't happen when I first load the activity. functionally everything works... but I still get this error.</p>
<blockquote>
<p>ERROR/Cursor(1059): Finalizing a
Cursor that has not been deactivated
or closed. database =
/data/data/com.roger.testapp/databases/data,
table = null, query = SELECT MAX(_id)
FROM record</p>
<p>03-02 16:47:21.835:
ERROR/Cursor(1059):
android.database.sqlite.DatabaseObjectNotClosedException:
Application did not close the cursor
or database object that was opened
here</p>
</blockquote>
<p>In onCreate:</p>
<pre><code> mDbHelper = new CommonDbAdapter(this);
mDbHelper.open();
fillData();
</code></pre>
<p>fillData() calls fetchNote in my dbhelper, the cursor is used for a couple things, if rowId == 0, that means I didn't select an item to get into this activity and I want to get the last row in that table. if rowId = something else, then I grab that row. I think the problem is in here somewhere, I'm just not sure.</p>
<pre><code>public Cursor fetchNote(long rowId, String table, String columns) throws SQLException {
if (rowId == 0) {
String query = "SELECT MAX(_id) FROM record";
Cursor cursor = mDb.rawQuery(query, null);
rowId = 0;
if (cursor.moveToFirst())
{
rowId = cursor.getInt(0);
}
}
Cursor mCursor =
mDb.query(true, table, new String[] {KEY_ROWID,
columns}, KEY_ROWID + "=" + rowId, null,
null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
</code></pre>
<p>In onDestroy:</p>
<pre><code>super.onDestroy();
if (mDbHelper != null) {
mDbHelper.close();
}
</code></pre>
<p>Also, I am startManagingCursor</p>
|
java android
|
[1, 4]
|
4,645,829
| 4,645,830
|
Resize external javascript
|
<p>Can the <code>div</code> added by the below external javascript be resized?</p>
<p>Below I have attempted to wrap it in a div and set the width on the div, but it is not resizing.</p>
<pre><code><div width = "100"><script type="text/javascript" charset="utf-8" src="http://static.polldaddy.com/p/23232.js"></script>
<noscript><a href="http://polldaddy.com/poll/23232/">Test</a></noscript>
</div>
</code></pre>
<p>The js adds a <code>div</code> to the page, and i want to resize that.</p>
<p>Note, this poll does not actually exist.</p>
|
javascript jquery
|
[3, 5]
|
4,227,088
| 4,227,089
|
DOM insertion into source
|
<p>Im trying to insert data into the DOM with:</p>
<pre><code>$("#item_384_week_49").append("test");
<td id="item_384_week_49"></td>
</code></pre>
<p>Works great, but the data is only displayed not inserted into the DOM.</p>
<p>Is there a way to do that, so that the source code contains the inserted data?</p>
<p><strong>EDIT</strong>
Im trying to work with docraptor to create pdf and excel files.
One of the methods to do so i to refer to a web page and the page then gets converted. <a href="http://docraptor.com/documentation#referrer_based" rel="nofollow">http://docraptor.com/documentation#referrer_based</a></p>
<p>If i have the above jquery working to insert data, the data wont be displayed in the generated file.
If the above adds data to the source code, can someone please explain to me why the data isn't displayed when the page is called?</p>
|
javascript jquery
|
[3, 5]
|
2,283,933
| 2,283,934
|
significant figures in edittext
|
<p>I have an <code>EditText</code> where the user enters a number.</p>
<p>Is there a way of setting the significant figures?
So it would automatically change <code>"003645"</code> to <code>"365"</code> at 3.s.f.</p>
|
java android
|
[1, 4]
|
3,805,046
| 3,805,047
|
Breaking out of jQuery loop vs native JS for loop. Which is better?
|
<p>First of all, apologies if the heading question doesn't exactly match with what I am going to ask. </p>
<p>My problem is that I want to have a loop, and the control is suppose to break out of this loop, once a condition is met. </p>
<p>Now, is it better to use the native JS 'for loop' and use 'return' or is it better to use the jQuery.each() and use return false, to break out of the loop? </p>
|
javascript jquery
|
[3, 5]
|
5,902,097
| 5,902,098
|
"Request.Cookies ("iduser"). Value" equivalent in C#
|
<p>I have an application in VB.net and I'm doing a new one in C# (ASP.NET 4). Users has just one username to login in both app.</p>
<p>The point is... how can I get the cookie's value in C#???</p>
<p>This is how I get it in VB...</p>
<pre><code>IdUser = Request.Cookies("iduser").value
</code></pre>
<p>Thks</p>
|
c# asp.net
|
[0, 9]
|
4,891,556
| 4,891,557
|
How can I call LinkButton OnClick Event from JavaScript?
|
<p>In my case a have a LinkButton on the page:</p>
<pre><code><asp:LinkButton ID="LinkButton5" runat="server" OnClick="LinkButton5_Click">Delete</asp:LinkButton>
</code></pre>
<p>When a user clicks it, the choosen file is deleted. And to make it easy to use I added a HotKey JavaScript:</p>
<pre><code><script type="text/javascript" src="Java/Jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="Java/Jquery.hotkeys-0.7.9.js"></script>
<script type="text/javascript">
function domo() {
jQuery('#platform-details').html('<code>' + navigator.userAgent + '</code>');
jQuery(document).bind('keydown', 'esc', function (evt) { alert("ESC"); return false; });
jQuery(document).bind('keydown', 'space', function (evt) { alert("SPACE"); return false; });
jQuery(document).bind('keydown', 'del', function (evt) { alert("DEL"); return false; });
}
jQuery(document).ready(domo);
</script>
</code></pre>
<p>So, ones you press Delete Button on your KeyBoard JavaScript alerts you that it was clicked. :) I need ones I click Del Button LinkButton5 should be clicked. I dont realy know how I can connect the javascript call the folowing OnClick event. Please Help!</p>
|
c# javascript jquery asp.net
|
[0, 3, 5, 9]
|
2,254,690
| 2,254,691
|
Resizing images JavaScript/jQuery without losing quality
|
<p>I am looking for a way to resize images with JavaScript or jQuery without losing the quality of the image. I have found solutions using PHP but I am not a server-side programmer.</p>
<p>I am trying to develop a portfolio website for me and a friend and I created a lightbox effect. The problem arives when the website examples get clicked; their original size shrinks to 55% width and 90% height so that they have a decent view in all resolutions.</p>
<p>On monitors of 1366x768 the photos start looking very pixelated but on bigger resolutions they are ok.</p>
<p>Here is my website:</p>
<p><a href="http://www.foxteam.net/portfolio.php" rel="nofollow">Foxteam.net</a></p>
<p>So can anyone tell of a solution for this problem?</p>
|
javascript jquery
|
[3, 5]
|
4,344,294
| 4,344,295
|
how to display the items in the combobox in any given manner?
|
<p>I have a dropdown getting populated by fetching a query on the database.
Say it fetches items given as follows:</p>
<p>Teacher,
Student,
Pricipal,
Sweeper,
FinanceManager.</p>
<p>While showing it in the dropdown, I wish to show it in the following order:</p>
<p>Principal,
FinanceManager,
Teacher,
Student,
Sweeper.</p>
<p>This isn't any specific order (ascending or descending), but just a order that has some relevance according to the personalities.</p>
<p>How do I acheive ?</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
1,428,465
| 1,428,466
|
Proper handling of input change event
|
<p>It may be a correct behavior of change event, but the below behavior is bit annoying. When the value is updated from the field history (see explanation below), the event is not triggered.</p>
<p>Please see example code below. the result input field is updated with the change in input field 'input1'. The form and submit button is not fully relevant, but needed to submit a form to make the browser keep the history of field values.
To test:</p>
<ol>
<li>enter any input in the field (say ABC)</li>
<li>Submit the form</li>
<li>enter first character of input from 1 (A)</li>
<li>use the down arrow to select the previous value + Enter</li>
<li>or use the mouse to select the previous value from the history
No input change is detected.</li>
</ol>
<p>Which event/ how should this code should modify so that an event is generated whenever the input value is changed.</p>
<p>thanks.</p>
<hr>
<pre><code><html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
</head>
<body>
Result:<input type="text" id="result" readonly></input>
<form method="post" action="">
<input type="text" id="input1" />
<button type=submit>Submit</button>
</form>
<script >
$(document).ready(function() {
$('#input1').change(
function(){
$('#result').val($('#input1').val());
});
});
</script>
</body>
</html>
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,828,298
| 4,828,299
|
jQuery - call function onmouseout but only if the cursor wasn't moved to a certain area
|
<p>I have this link:</p>
<pre><code><a class='itemshow'>Show Details</a>
</code></pre>
<p>When this link is hovered over, a div opens up below it with some content. That works fine. Now, I need a .mouseout() event which closes the div that was opened (div's id is gen_details) but ONLY if the cursor wasn't moved down to the div itself.</p>
<p>I have written a function which closes the div (see below, slideToggle does it), I just need a modification - a condition that checks whether the cursor is within the div's boundaries, and only executes the code if it's not.</p>
<pre><code> $('a.itemshow').mouseleave(function()
{
//if(condition here to check if cursor is out of the div's boundaries){
if($('#gen_details').hasClass("open")){
$('#gen_details').slideToggle(300);
$('#gen_details').removeClass("open");
return false;
}
//}
});
</code></pre>
<p>Shouldn't be too complex but I can't figure out how to do it without any complicated hacks.</p>
|
javascript jquery
|
[3, 5]
|
3,634,305
| 3,634,306
|
Wifi Float switch sensor app for phone
|
<p>I want to have a float switch sensor in a tank of water and when the water reaches a certain level, i want the float switch to send a signal to my phone or my computer in the form of a app/program through wifi.</p>
<p>What are the main mechanics on how to do this? Particularly how would i send a signal throught he wifi network to my phone or computer?</p>
<p>i can't find much stuff on google or maybe im searching the wrong terms. any help or a link to a guide on how to do this would be appreciated. thanks.</p>
|
android iphone
|
[4, 8]
|
5,889,874
| 5,889,875
|
Why does jQuery complain about an "invalid left-hand assignment"?
|
<pre><code>function auditUpdate(newval) {
jQuery("#audit").val() = newval;
jQuery("#auditForm").submit();
}
</code></pre>
<p>Why do I get an error where I try to assign newval to the <code>#audit</code> value?</p>
|
javascript jquery
|
[3, 5]
|
1,551,939
| 1,551,940
|
JavaScript lastIndexOf()
|
<p>In C# I can do this</p>
<pre><code>string ID = "ContentPlaceHolderDefault_MainSiteSectionArea_MyPagePlaceHolder_Item4_FavoritAmusementCalender_6_deleteRight_2";
ID = ID.Substring(ID.LastIndexOf("_") + 1);
</code></pre>
<p>to return the last int <code>2</code></p>
<p>How can I most easily do this in jQuery/JavaScript</p>
<p>The id is created dynamic and can for now be up to 3 digit.</p>
<p>Thanks in advance.</p>
|
javascript jquery
|
[3, 5]
|
4,571,412
| 4,571,413
|
How to get line of code to accept single quote
|
<p>Because of a single quote I am receiving a expecting ) after argument list error:</p>
<pre><code>window.top.stopAudioUpload(1, '43', 'Thorne, Grandma's Goodbye excerpt.m4a');
audioupload.php (line 11, col 54)
</code></pre>
<p>My question is how can I get the line of code to accept single quote?</p>
<p>Code:</p>
<pre><code> <script language="javascript" type="text/javascript">
window.top.stopAudioUpload(<?php echo $result; ?>, '<?php echo $id; ?>', '<?php echo $_FILES['fileAudio']['name'] ?>');
</script>
</code></pre>
|
php javascript
|
[2, 3]
|
5,812,414
| 5,812,415
|
How to load picture images via click on a picture?
|
<p>At the moment i load default images for every picture in my app. I want to load the real picture of all images in div 5 if i click on any picture of div 5. At the moment i use the onclick event of the img tag with: </p>
<pre><code>switchImg(this, "LINK_FOR_PICTURE")
</code></pre>
<p>my js snippet:</p>
<pre><code>function switchImg(img, url){
$(img).attr("src", url);
}
</code></pre>
<p>At the moment it only loads the picture that i clicked on.</p>
<p>here the HTML snippet:</p>
<pre><code><div id="1">
</div>
<div id="2">
</div>
..
<div id="5">
<img src="DEFAULT_IMG" onclick="switchImg(this, "LINK_FOR_PICTURE_1")" alt="No_picture">
</div>
<img src="DEFAULT_IMG" onclick="switchImg(this, "LINK_FOR_PICTURE_2")" alt="No_picture">
</div>
<img src="DEFAULT_IMG" onclick="switchImg(this, "LINK_FOR_PICTURE_3")" alt="No_picture">
</div>
.....
</div>
</code></pre>
<p>How do i need to change my code that following condition is true:</p>
<ul>
<li>i click on any picture in div id=5 and all this pictures gets the correct picture link (LINK_FOR_PICTURE_1, LINK_FOR_PICTURE_2, etc) as src. The other pictures in the other divs don`t change and still display the default img. (Div id 5 is an example the same procedure should be possible for other divs with pictures).</li>
</ul>
<p>Please keep in mind that the img link changes for every picture.</p>
|
javascript jquery
|
[3, 5]
|
1,615,791
| 1,615,792
|
When to use document.write()?
|
<p>I was told not to use <code>document.write()</code> by and SO member. That innerHTML is better, or better yet, manipulate the DOM directly.</p>
<p>However, If I'm loading a page for the first time and there is content that is stored on a mysql table, and hence it will be converted to HTML, how can I do this if I don't want the server doing this task?</p>
<p>If the server did it then I could just have PHP code generate the html and place it where needed..but b.c. I want Javasrcript(client) to render the HTML I use this code (which is generated by php, but less processing time, as it does not create the HTML)</p>
<pre><code> <script type='text/javascript'>document.write(Arc.ViewHBookmark('google.com|http://www.google.com|Google||ideeli.com|http://www.ideeli.com|Ideeli||kikin.com|http://www.kikin.com|Kikin||lot18.com|http://www.lot18.com|Lot18||twitter.com|http://twitter.com|Twitter'))</script>
</code></pre>
<p>This is how I have the client generate HTML on a page reload. Embedded Javascript with a document.write().</p>
<p>Is there a better way to do this? By better I mean a way that does not use document.write().</p>
<p>I can call a javascipt function that renders the HTML on the onload event, but how would I have access to the JSON data or similar(AML) in this case.</p>
<p>I could write it into the page..and then read it back in, generate the content, and write it back to the page...but this seems more inefficient than just using <code>document.write()</code></p>
<p>Is it O.K to use <code>document.write()</code> in this case?</p>
<p>If not, is writing structured data to the page and having javascript convert it to HTML considered good practice?</p>
|
php javascript
|
[2, 3]
|
892,072
| 892,073
|
loading secondary resources like images and such
|
<p>I want to show image and its text initially as we open the page for my Image Slider.</p>
<p>This is my demo: <a href="http://codebins.com/bin/4ldqp9c/15" rel="nofollow">http://codebins.com/bin/4ldqp9c/15</a></p>
<p>here i am showing as all the DOM elements is loaded, but the need is to show the first image and its text initially for my slider as we open the page.</p>
<p>So I am not understanding how to load my initial image for my slider, so that its functionality starts after all DOM elements load.</p>
|
javascript jquery
|
[3, 5]
|
340,917
| 340,918
|
Using jQuery to replace an element including all the HTML tags
|
<p>Supposing I have the correct location of an element whats the best way to replace all the html including the tags of a given block of HTML code using jQuery()? I'm looking to do something similar to the following. Is this a good way to do this? What other ways are available or useful to know about?</p>
<pre><code>var location = 'td[id^="A0.R0.Work"]';
var element = jQuery(location).prev();
element.html('<h1>some code</h1>');
</code></pre>
<p>Thanks.</p>
|
javascript jquery
|
[3, 5]
|
4,527,882
| 4,527,883
|
how to get country phone prefix from iso
|
<p>I got the country iso by the code from this <a href="http://stackoverflow.com/questions/3659809/where-am-i-get-country">answer</a>: </p>
<pre><code>TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String countryCode = tm.getSimCountryIso();
</code></pre>
<p>how can I get the prefix phone number for country?<br>
for example +972 for il.</p>
|
java android
|
[1, 4]
|
1,999,065
| 1,999,066
|
What are the advantages to putting your Javascript in a .php file?
|
<p>I occasionally come across pages where some Javascript is included via a PHP file:</p>
<pre><code><html>
<head>
<script type="text/javascript" src="fake_js.php"></script>
</head>
<body onload="handleLoad();">
</body>
</html>
</code></pre>
<p>where the contents of <strong>fake_js.php</strong> might look something like this:</p>
<pre><code><?php header('Content-type: text/javascript') ?>
function handleLoad() {
alert('I loaded');
}
</code></pre>
<p>What are the advantages (or disadvantages) to including Javascript like this?</p>
|
php javascript
|
[2, 3]
|
1,049,594
| 1,049,595
|
Load new image when a user clicks on a link
|
<p>I'm trying to figure out how to load a new image with ajax when a link is clicked on.</p>
<p>The link looks like this (there are several links like this on the page they have little image thumbnails inside them so user can know approximately what image will load when he/she clicks on the link):</p>
<pre><code><div class="box-content2">
<a href="/path/to/image/2.jpg" id="2">
<img src="/path/to/image/thumbnail/2.jpg" title="Image Title 2" />
</a>
<a href="/path/to/image/3.jpg" id="3">
<img src="/path/to/image/thumbnail/3.jpg" title="Image Title 3" />
</a>
</div>
</code></pre>
<p>Href attribute contains relative path to the image and the id is the image name (also it's id in the database if it's relevant).</p>
<p>And on the same page I have this markup:</p>
<pre><code><div id="media-photo">
<img src="/path/to/image/1.jpg" alt="Image Title 1" />
</div>
</code></pre>
<p>I would like the image in #media-photo div to change without the page being reloaded.</p>
<p>This is what I have so far:</p>
<pre><code>$(document).ready(function() {
$('.box-content2 a').click(function() {
var path = $(this).attr('href');
$('#media-photo img').html('<img src="' + path + '" />');
});
});
</code></pre>
<p>Not sure if what I'm doing is possible, maybe I need ajax?</p>
|
javascript jquery
|
[3, 5]
|
533,036
| 533,037
|
Jquery .post and form data
|
<p>I am using .post to post my data to my controller. I would like to pass all the data that I have in a form. Is there an easy way to take all the form data and add it to the .post command to send it?</p>
|
javascript jquery
|
[3, 5]
|
3,154,204
| 3,154,205
|
++i operator in Python
|
<p>I'm trying to translate one of my Java projects to Python and I'm having trouble with one certain line. The Java code is:</p>
<pre><code>if (++j == 9)
return true;
</code></pre>
<p>What I think this is supposed to be in python is </p>
<pre><code>if (j += 1) ==9:
return True
</code></pre>
<p>...but I am getting an error <code>SyntaxError: invalid syntax</code>.</p>
<p>How can I translate this Java to Python?</p>
|
java python
|
[1, 7]
|
5,058,589
| 5,058,590
|
How can I pass a variable as the value for jQuery .attr?
|
<p>Using <a href="http://api.jquery.com/attr/" rel="nofollow">jQuery attr()</a> what would be the proper syntax to pass a variable in as the value. What I am trying to do is :</p>
<pre><code>var under700 = 'image.jpg'
$('.two_images img').attr('src', (under700) );
</code></pre>
<h2>Edit</h2>
<p>Judging from the responses, I may have oversimplified this. Here is the rest of the function if that adds any clarity.</p>
<pre><code> $(document).ready(function() {
function imageresize() {
var contentwidth = $('#two_up').width();
var under700 = '<?php bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo $image_img_tag[0] ?>&w=340'
if ((contentwidth) < '700'){
// I also tried defining the variable here
$('.two_images img').attr('src', under700 );
} else {
// this one works fine
$('.two_images img').attr('src','<?php echo $image_img_tag[0] ?>');
}
}
imageresize();//Triggers when document first loads
$(window).bind("resize", function(){//Adjusts image when browser resized
imageresize();
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,498,863
| 2,498,864
|
What is the preferred pattern for re-binding jQuery-style UI interfaces after AJAX load?
|
<p>This always gets me. After initializing all lovely UI elements on a web page, I load some content in (either into a modal or tabs for example) and the newly loaded content does not have the UI elements initialized. eg:</p>
<pre class="lang-js prettyprint-override"><code>$('a.button').button(); // jquery ui button as an example
$('select').chosen(); // chosen ui as another example
$('#content').load('/uri'); // content is not styled :(
</code></pre>
<p>My current approach is to create a registry of elements that need binding:</p>
<pre class="lang-js prettyprint-override"><code>var uiRegistry = {
registry: [],
push: function (func) { this.registry.push(func) },
apply: function (scope) {
$.each(uiRegistry.registry, function (i, func) {
func(scope);
});
}
};
uiRegistry.push(function (scope) {
$('a.button', scope).button();
$('select', scope).chosen();
});
uiRegistry.apply('body'); // content gets styled as per usual
$('#content').load('/uri', function () {
uiRegistry.apply($(this)); // content gets styled :)
});
</code></pre>
<p>I can't be the only person with this problem, so are there any better patterns for doing this?</p>
|
javascript jquery
|
[3, 5]
|
5,795,850
| 5,795,851
|
How can I pass a ASP.NET server control to a function?
|
<p>I have a class in a separate file (stripped out a lot for simplicity)</p>
<pre><code>public class navigation
{
// Adds to menu
public static void addMenuToList(ListView parent)
{
parent.Items.Add(newItem);
}
}
</code></pre>
<p>Where parent is a control on my .net page:</p>
<pre><code><asp:ListBox SelectionMode="Single" Rows="8" id="parent" runat="server" CssClass="tbox widebox">
</code></pre>
<p>How do I pass the control to the function so it can be accessed?</p>
<pre><code>navigation.addMenuToList(parent);
</code></pre>
<p>This doesn't seem to work. Am I going about it wrong?</p>
|
c# asp.net
|
[0, 9]
|
5,000,484
| 5,000,485
|
GUI items and elements in Javascript
|
<p>How do i make boxes similar to theses? I would like a X on the top right. Text on the left of it and the text below the image where the black area is. When i click on X it will remove these and the box on the right moves over and takes it place. How might i create this using jquery? is there some kind of GUI and container i could use to automate boxes moving when i close/delete them and etc <img src="http://i47.tinypic.com/29wpj5f.jpg" alt="alt text"></p>
|
javascript jquery
|
[3, 5]
|
1,236,745
| 1,236,746
|
is it better to pass an image through classes or recreate the image in each class (android)?
|
<p>Im creating a simple application that converts the image dimensions to a size that the user wants, im laying it out over a 3 screens
the first screen allows a user to select an image and it is displayed on screen.
the second screen then displays the attributes of the file (path, name, height and width) with the option of adjusting the name, height and width.
the third screen displays the resized image with an option to save the new image.
at the moment im only passing the image url between the classes and decoding the bitmap within each class eg</p>
<pre><code>Bitmap bmap = BitmapFactory.decodeImage(image_URL);
</code></pre>
<p>my question is it better to pass the URL between the classes or pass the Bitmap?</p>
<p>many thanks</p>
|
java android
|
[1, 4]
|
997,570
| 997,571
|
document.getElementById("id") works, but $("#id") does not jQuery
|
<p>I am iterating over some elements and I have found that <code>document.getElementById("id")</code> works, but <code>$("#id")</code> does not. Why?</p>
<p>Edit: I suppose it wouldn't hurt to post code?</p>
<pre><code>function myFunction() {
var token, tokens, id, input;
$("[id^=\"some_id_\"]").each(function() {
tokens = this.id.split("_");
id = tokens[tokens.length - 1];
input = document.getElementById("some_form_element_" + id); //WORKS
//input = $("#some_form_element_" + id); //DOESNT, alerts undefined
alert(input.value);
});
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,200,912
| 5,200,913
|
Unable to pass values between Activities in Android
|
<p>I am using 2.3.3 version of the Android SDK and I'm trying to pass data between two activities using the following code</p>
<pre><code>Intent myIntent = new Intent(MainAct.this, FriendsActivity.class);
myIntent.putExtra(USER_NAME, ((EditText)findViewById(R.id.username)).getText());
MainAct.this.startActivity(myIntent);
</code></pre>
<p>In the <code>FriendsActivity</code> i'm retrieving the value using </p>
<pre><code>Bundle b = getIntent().getExtras();
String user = b.getString(MainAct.USER_NAME);
</code></pre>
<p>But the <code>user</code> is null after these lines are executed. Not sure whats wrong here. Read similar questions on SO <a href="http://goo.gl/zOJfa" rel="nofollow">http://goo.gl/zOJfa</a> but still the problem continue to be seen.</p>
|
java android
|
[1, 4]
|
4,288,005
| 4,288,006
|
java RAM problems
|
<p>I've a problem with my android. First I wrote an application in C language (for PC), which used lot of RAM - about 500 MB for tables. Then I tried to rewrite the same code for Android in Java (Eclipse)... and the problems started.</p>
<p>It has taking a lot of time to create (on htc desire hd) static tables (the same size = 500MB) - first I think that is working but...then somebody told me that single aplication on Android can only use 24 MB RAM. it is true? How can I make this size bigger? How can I solve this restriction?</p>
|
java android
|
[1, 4]
|
2,460,190
| 2,460,191
|
Java - XML Pull Parser not working
|
<p>I tried to use an example XML Pull Parser I found online, but for some reason I t does not work. Can somebody say why?</p>
<p>Code:</p>
<pre><code>public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView txtv = (TextView) findViewById(R.id.textview2);
try {
txtv.setText(parseInputStream());
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
txtv.setText(parseInputStream());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
public String parseInputStream() throws Exception
{ InputStream input = new URL("my website. see xml below").openStream();
XmlPullParser parser = Xml.newPullParser();
parser.setInput(input, null);
int eventType = parser.getEventType();
while (eventType != XmlPullParser.END_DOCUMENT) {
switch (eventType){
case XmlPullParser.START_DOCUMENT:
break;
case XmlPullParser.START_TAG:
String tagName = parser.getName();
if (tagName.equalsIgnoreCase("tag"))
{
String statusText = parser.nextText();
return statusText;
}
}
eventType = parser.next();
}
// No status tag found so throw an exception
throw new RuntimeException("No Status tag found in XML document");
}
}
</code></pre>
<p>XML:</p>
<pre><code><item>
<tag>hallo</tag>
</item>
</code></pre>
<p>thank you for every tip. </p>
|
java android
|
[1, 4]
|
946,814
| 946,815
|
Javascript mailto causing IE issues
|
<p>In my html page, I have:</p>
<pre><code>var e_values = $("a.envelope");
e_values.each(function(index){
$(e_values[index]).attr('href','mail'+'to:'+eval($(e_values[index]).attr('eparts')));
})
</code></pre>
<p>When I click on this in FF and Chrome, my email clients starts and offers me a new email with the email address pre-populated.</p>
<p>However, with IE, in addition to opening my email client, a 2nd tab is opened with the email address only.</p>
<p>Can anybody tell me why that is that a 2nd tab opens with only the email address and how to prevent that from happening?</p>
<p>Thanks
Eric</p>
|
javascript jquery
|
[3, 5]
|
4,908,874
| 4,908,875
|
combine jQuery Objects
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1881716/merging-jquery-objects">Merging jQuery objects</a> </p>
</blockquote>
<h2><a href="http://jsfiddle.net/nZRLD/" rel="nofollow">See Demo</a></h2>
<pre><code>a = $('diveq(0)');
b = $('diveq(1)');
c = $('diveq(2)');
d = $('diveq(3)');
e = $('diveq(4)');
f = $('diveq(5)');
console.log($([a,b,c,d,e,f]).find('a'))
</code></pre>
<p></p>
<p>What I'm trying to do is add multiple jQuery objects to a single set.</p>
<p>I know I can add them one at a time by using <code>.add()</code> but I'm looking for a way to turn an array of jQuery objects into a single jQuery set.</p>
<p>Is there any way to do this?</p>
|
javascript jquery
|
[3, 5]
|
5,729,054
| 5,729,055
|
Javascript API writing
|
<pre><code><div id ="filter">
<select id= "s1"/>
<select id= "s2"/>
<select id= "s3"/>
<select id= "s4"/>
<select id= "s5"/>
<select id= "s6"/>
</div>
</code></pre>
<p>So basically I create filters with select elements of different ids in each of many but the data population and change events are similar. So I wanted to create an API something like this:</p>
<pre><code>new Filter({ele1:$("#s1"), ele2:$("#s2"), ele3:$("#s3"), ele4:$("#s4")})
</code></pre>
<p>This filter should handle the population and its change events.</p>
<pre><code>function Filter(map)
{
this.ele1 = map.ele1.id;
this.ele2 = map.ele2.id;
//similarly for all the other elements.
this.e1e1.change(function(){
//these elements uses selectors of other elements So how can I access the ele2, ele3 and so on...
});
}
</code></pre>
<p>The problem here is the change events should be able to access the other variables ele2,ele3 of the filter object. </p>
|
javascript jquery
|
[3, 5]
|
3,503,833
| 3,503,834
|
How to ensure offsite javascript doesn't impede site performance?
|
<p>I need to include an offsite javascript file on my page, however I don't want it to be able to affect the performance of my site, in case the server where the javascript is on is down or not responding.</p>
<p>What I'd like to know, is if it's posible with javascript to make some sort of wrapper function to ensure that the page where the offsite javascript is hosted is responding within an acceptable timeframe.</p>
<p>I've considered adding the "defer" attribute to where I include the javascript, but that would as far as I know still leave the site hanging after the rest of the page is loaded.</p>
<p>If it's not possible to do in javascript are there any good alternatives?</p>
<p>My site is made C# asp.net.</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
2,549,229
| 2,549,230
|
Jquery .eq plus contains
|
<p>When trying to get from all [tr] the second [td] that contains some information, i keep getting stuck on logic. Here is some example.</p>
<pre><code><table class="todos">
<tbody>
<tr>
<td>info1</td>
<td>info2</td>
<td>info3</td>
</tr>
</tbody>
</table>
</code></pre>
<p>And here is the Javascript to find it for me...</p>
<pre><code>$(".todos tbody tr").css('display','none');
$(".todos tbody tr").each(function(){
if($(this).find("td:eq(0):contains("+procurar+")"))
$(this).css('display','table-row');
if($(this).find("td:eq(1):contains("+procurar+")"))
$(this).css('display','table-row');
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,520,652
| 3,520,653
|
Get alert if all they(ul) are empty
|
<p>How can done if all tags ul in <code>.empty</code> is empty alert ok?(with jQuery)</p>
<p><strong>EXAMPLE:</strong> <a href="http://jsfiddle.net/pqgGr/" rel="nofollow">http://jsfiddle.net/pqgGr/</a></p>
<pre><code><div class="empty">
<ul>1</ul>
<ul></ul>
<ul></ul>
</div>
if ($('.empty ul').is(":empty")) {
alert('ok')
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,353,791
| 5,353,792
|
How can I capture window close event?
|
<p>I have Ajax DHTML window. I want to redirect the page on different location when some one closed the window by clicking on cross image of window. </p>
<p>I have used following code to open window. </p>
<pre><code>ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", popupURL, "Error Message", "width=450px,height=200px,resize=1,scrolling=1,center=1")
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,491,469
| 3,491,470
|
How to make code wait while calling asynchronous calls like Ajax
|
<p>I am looking for something like this</p>
<pre><code>function someFunc() {
callAjaxfunc(); //may have multiple ajax calls in this function
someWait(); // some which waits until async calls complete
console.log('Pass2');
}
function callAjaxfunc() {
//All ajax calls called here
console.log('Pass1');
}
</code></pre>
<p><strong>What i have tried?</strong></p>
<p><strong>1</strong>
Jquery.when()</p>
<p>tried using it..it works fine. But not the way i want. <code>$.when</code> will wait but the code next to <code>$.when()</code> runs with out waiting. The code inside <code>do callback</code> only runs after ajax calls</p>
<p><strong>2.</strong>
setTimeOut() with a global flag</p>
<p>i was so confident this will work. i tried like following.</p>
<pre><code>GlobalFlag = false;
function someFunc()
callAjaxfunc(); //may have multiple ajax calls in this function
setTimeOut(waitFunc, 100); // some which waits until async calls complete
console.log('Pass2');
}
function callAjaxfunc() {
//All ajax calls called here
onAjaxSuccess: function() {
GlobalFlag = true;
};
console.log('Pass1');
}
function waitFunc() {
if (!GlobalFlag) {
setTimeOut(waitFunc, 100);
}
}
</code></pre>
<p>Still not able to get wanted result..Am i doing something wrong here? This is not the way?</p>
<p>Result i wanted should come like this</p>
<pre><code>Pass1
Pass2
</code></pre>
<p>Not able to make any fiddle as it needs AJAX calls</p>
<p><strong>EDIT</strong>: As many were suggesting callbacks..i know about them..but still the code next to <code>somewait()</code> will get executed...i want browser to completely stop executing code next to <code>somewait()</code> until the ajax call..Also it may be a bad practice but worth to know and try if possible...</p>
|
javascript jquery
|
[3, 5]
|
3,123,022
| 3,123,023
|
label element is not a known element
|
<p>i change my asp website to ajax enabled website. in my page .cs files for the elements like labels,dropdownlist, gridview says element is not a known element. </p>
<p>i am currently using visual studio 2005 version. i used it by first put the "scriptmanager" from ajax tool box and put a update panel and put my masterpage into the updatepanel. </p>
|
c# asp.net
|
[0, 9]
|
2,202,052
| 2,202,053
|
Why do we love using i?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://programmers.stackexchange.com/questions/86904/why-do-most-of-us-use-i-as-a-loop-counter-variable">Why do most of us use 'i' as a loop counter variable?</a> </p>
</blockquote>
<p>Maybe this questions seems to be extreamly stupid but I wonder why we use i as variable in most cases in for loops (and not other letter). This might be a historical cause.</p>
<p>eg.</p>
<pre><code>for(int i = 0; i < 10; i++)
</code></pre>
|
c# java c++
|
[0, 1, 6]
|
3,366,620
| 3,366,621
|
Date methods marked deprecated, but recommended Calendar equivalents don't do what I want
|
<p>I'm working with Date objects in my code, and the documentation on many of the methods I'm using say that the method is deprecated and that I should use the Calendar object and its equivalent methods. The easiest example to remember is <code>Date.getHours()</code> and <code>Date.getMinutes()</code> methods say to use <code>Calendar.get(Calendar.HOUR)</code>, etc.</p>
<p>But, in the case where I'm working with two dates, performing some math on them and then comparing them, they seem to be referring to the same instance on Calendar. The documentation for Calendar says to use <code>Calendar.getInstance()</code>, but that seems to be returning a singleton Calendar instance.</p>
<p>The Date object was working just fine for me, but I'm afraid to use methods marked deprecated because that makes me feel like my code could break in a future version of the api.</p>
<p>Is it safe to use Date? Or is there a way to fetch unique Calendar instances?</p>
|
java android
|
[1, 4]
|
535,285
| 535,286
|
[PHP/JavaScript]: How to call a JavaScript function through PHP and fetch value returned?
|
<p>I want to call a JavaScript function through PHP and store the returned value in a PHP variable. How to do this?</p>
|
php javascript
|
[2, 3]
|
2,506,921
| 2,506,922
|
Summary of form in a <div> with jQuery
|
<p>I have two input boxes and two select boxes and would like to display a summary of data selected and entered in real time prior to submitting the form. jQuery seems the way to go, but how! </p>
<pre><code><form id="form1" name="form1" method="post" action="">
<select name="Select1" id="Select1">
<option value="Item 1">Item 1</option>
<option value="Item 2">Item 2</option>
<option value="Item 3">Item 3</option>
</select>
<br />
<select name="OtherItem" id="OtherItem">
<option value="OtherItem 1">OtherItem 1</option>
<option value="OtherItem 2">OtherItem 2 </option>
<option value="OtherItem 3">OtherItem 3</option>
</select>
<input type="text" name="textfield1" id="textfield1" />
<input type="text" name="textfield2" id="textfield2" />
</form><div id="FormSummary"></div>
</code></pre>
<p>Many thanks</p>
|
javascript jquery
|
[3, 5]
|
2,125,976
| 2,125,977
|
class relations and site architecture
|
<p>I'm building a asp.net web site<br>
i build a class localiziedpage that inherit from System.Web.UI.Page this class in dealing with all localization of the page. ii have a class basepage that inherit from localiziedpage that get all simple data from db for a page (h1,title,main content,description...)</p>
<p>now i need to create a page that bring another type of data (news list,albums ...)
do i need to build a separate class for every type of page?</p>
<p>for rss page a rssPage class that inherit from basePage ?<br>
for newslist page a newsListPage that inherit from basePage ?</p>
|
c# asp.net
|
[0, 9]
|
1,883,599
| 1,883,600
|
Prevent user download Videos from my web site
|
<p>I make a new web application and I'll display more videos on it, but I need to prevent the users from downloading these videos by the browser or any download program.
Is there a way to do this by java script, JQuery, C# or asp.net?</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
5,148,570
| 5,148,571
|
Get Current System Time And After That Want To add 30 minutes in That Time
|
<p>I want to <code>get current time</code> in my application.<br>
Then i want to <code>add 30</code> minutes in the current time.<br>
can any one help me how to achieve this?</p>
<p>I am getting start and stop time from my web service.
eg: ((start time)11:00 am to (stop time) 11:00 pm)
now i want to add 30 minutes in the current time till the stop time reach.</p>
|
java android
|
[1, 4]
|
5,869
| 5,870
|
add element in certain place
|
<p>When I use document.createElement javascript will add an element at bottom of body.
How can I add an element in certain place ? (with document.createElement property, I mean store in a new variable)</p>
|
javascript jquery
|
[3, 5]
|
2,550,144
| 2,550,145
|
string was not recognized as valid Date Time using C#
|
<p>i have tried every possible solution online but can't figure out why i am still getting this error
"string was not recognized as valid Date Time"
the funny thing is that i am converting 2 date times, one is cell 3 in my gridview and the other one is cell 7 but the Cell 3 works fine and but Cell 7 does not want to convert and both of them are the same data types!!. I am pulling these data from my sql server table and the data types are varchar but the format should be mm/dd/yyyy.<br>
I have tried this method but it did not work:</p>
<pre><code>foreach (GridViewRow gr in GridView1.Rows)
{
CheckBox cb = (CheckBox)gr.FindControl("chkItem");
if (cb.Checked)
{
DateTime ExpectedSubDate = DateTime.Parse(gr.Cells[3].Text);
DateTime strTargetDate = DateTime.ParseExact(gr.Cells[7].Text, "MM/DD/YYYY HH:MM:SS TT", System.Globalization.CultureInfo.InvariantCulture);
</code></pre>
<p>I have also tried this method but did not work either</p>
<pre><code>DateTime strTargetDate = DateTime.Parse(gr.Cells[7].Text);
</code></pre>
<p>I have also tried this way but did not work either:</p>
<pre><code>DateTime strTargetDate = DateTime.ParseExact(gr.Cells[7].Text, "MM/DD/YYYY", System.Globalization.CultureInfo.InvariantCulture);
</code></pre>
|
c# asp.net
|
[0, 9]
|
3,333,354
| 3,333,355
|
Route url to php file with javascript/jQuery
|
<p>I have researched this but found luck and my question really is a hope and I'm doubting this is possible. </p>
<p>Can you route URLs to a specific PHP file using JavaScript? Like you would with rewrites in .htaccess. It would be a lot easier for several reasons for me to just link a fake URL to a PHP file with JavaScript. </p>
<p>The scenario is that I am creating a user profiles with PHP, a database and jQuery. Since I am using a history API script I can easily provide a profile for users without editing the .htaccess file IF a user navigates to a profile with a link. To do this I would preventDefault on the link click so you don't get a 404, get the href value, use AJAX to get JSON data from a PHP file and then AJAX in the template with info loaded in. </p>
<p>The problem is when a user directly enters the URL for example www.example.com/joebloggs, this would just cause a 404 since that file does not exist. I would like to intercept the page load with jQuery and instead load up the PHP template and ajax in info with JSON.</p>
<p>If not possible I will use .htaccess it would just be easier to do it with JavaScript </p>
|
javascript jquery
|
[3, 5]
|
4,681,450
| 4,681,451
|
How to get jQuery added values in aspx page at server side on Submit button click?
|
<p>When user clicks 'add new' button I want to add more textbox into the page, so that he can add n number of values. I will do this with jQuery. But on submit click I want to get values from all the fields at server side. How can I accomplish this? </p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
644,355
| 644,356
|
Show elements, after task on all is done, do this?
|
<p>Hi I'm having some problems to figure how I would do this task. I got a wrapper with elements, and on a click I'm gone show them. After they are visible I want to perform another task, issue here is that it triggers it for each element in the wrapper. </p>
<p><strong>EDIT</strong>
Sorry meant to be <code>.fadeIn()</code></p>
<p>example code: <a href="http://jsfiddle.net/HbrPs/" rel="nofollow">Jsfiddle</a></p>
<pre><code><div id="wrapper">
<div class="div-item"></div>
<div class="div-item"></div>
<div class="div-item"></div>
<div class="div-item"></div>
<div class="div-item"></div>
</div>
<a href="#" id="click-me">click me</a>
$('#click-me').on('click', function() {
$('#wrapper > div.div-item').fadeIn(600, function() {
console.log('show');
});
return false;
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,403,162
| 2,403,163
|
Looking for some sort of pattern
|
<p>I have a library project which contains an abstract class, let's say <code>ClassA</code>. In the project that uses that library project, I have <code>ClassB</code> that extends <code>ClassA</code>.</p>
<p>Now here's my problem. In the library project I want to use an instance of the implemented <code>ClassB</code>, but I have no idea how to retrieve that instance. Is there any pattern or other ideas for this?</p>
<p><a href="http://s3.amazonaws.com/twitpic/photos/full/326584019.png?AWSAccessKeyId=AKIAJF3XCCKACR3QDMOA&Expires=1308603198&Signature=N4yDX66sr7fDCGDaHXmY/MXBcmY=" rel="nofollow">Here's</a> a simple diagram of the situation.</p>
<p><strong>Edit</strong></p>
<p>The reason I'm asking is that I'm creating multiple applications, which only have different methods in <code>ClassB</code>. Therefore I'm creating a library that all of these applications can use, only having to extend <code>ClassA</code>. These applications are separate projects, using the library.</p>
|
java android
|
[1, 4]
|
5,224,941
| 5,224,942
|
Android: [aapt] nothing matches overlay file - during ant build
|
<p>I am building my app with the ant build script. The build shows successful, but I see lot's of the following messages about several of png files in res\drawable-xxxx folders.
Here is an example of one of them:</p>
<pre><code>[aapt] nothing matches overlay file ic_launcher.png, for flavor ,,,,,,,,,,,hdpi,,,,,,,
</code></pre>
<p>What does it mean? Does the resulting .apk file has problems? Is it just a warning?</p>
|
java android
|
[1, 4]
|
4,897,164
| 4,897,165
|
Javascript never gets called
|
<p>Any reason for the Javascript is NOT firing ? </p>
<pre><code><asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<script type="text/javascript">
function ChangeDisplay()
{
alert("Changing");
document.getElementById('warningDiv').innerHTML = "<h1>Change Text</h1>";
setTimeout(finalize,6000);
}
function finalize()
{
alert("Done");
document.getElementById('warningDiv').innerHTML="<h1>Done</h1>";
}
</script>
<h2>
Welcome to ASP.NET!
</h2>
<p>
<div id="warningDiv">Hello World</div>
</p>
<script>
window.onload = setTimeout(ChangeDisplay, 3000);
</script>
</code></pre>
<p></p>
|
javascript asp.net
|
[3, 9]
|
4,168,419
| 4,168,420
|
Hide asp.net Wizard next button in javascript
|
<p>I want to hide the Next button on my ASP.NET Wizard control using JavaScript. Can anybody tell me if this is possible and post a javascript snippet on how to do this? Thanks!</p>
|
asp.net javascript
|
[9, 3]
|
232,059
| 232,060
|
jquery image change doesnt work
|
<p>The following code should work but I cant seem to find the problem why it doesnt work, I am testing it with google chrome</p>
<pre><code><html>
<head>
<script type="text/javascript" src="js/jquery_1.7.1_min.js"></script>
<script type="text/javascript">
$('#unos').click(function() {
$("#tre").attr('src', '/012/11/image2.jpg');
});
</script>
</head>
<body>
<img id="tre" class="aligncenter" title="images" src="/012/11/image1.jpg" alt="" width="940" height="207" />
<input id="unos" type="submit" name="change_src" value="change image" />
</body>
</html>
</code></pre>
|
javascript jquery
|
[3, 5]
|
723,589
| 723,590
|
javascript bind validators
|
<p>Ive got some validators in my UpdatePanel. If OnServerZValidate returns false corresponging message is displayed atthe wrong field but all javascript I used to bind some options on click to some classes isnt working.</p>
<p>this is the script, it works if the page is loaded for the first time:</p>
<pre><code>$(document).ready(function() {
InitiateData();
});
function InitiateData() {
$('.shade').bind('click', function() {
alert("test");
}
</code></pre>
<p>if there is a postback from validators alert doesnt work :)</p>
<p>thanks for any suggestions</p>
|
jquery asp.net
|
[5, 9]
|
1,526,307
| 1,526,308
|
ASP.NET Masterpage and Context.RewritePath
|
<p>In my ASP.NET Website, I am trying to use Server.Transfer to redirect client to different url(all pages resides in same domain) instead of using Response.Redirect because of performance issue and heavy flickering. But when I use Server.Transfer, all session values are wiped out and getting NullReference error even though if I enable page level EnableSessionState. After several attempt, i tried Context.ReWritepath just to change the url and lost all masterpage contents like menus, headers. Any idea? Any help? Am i doing anything wrong?</p>
|
c# asp.net
|
[0, 9]
|
229,332
| 229,333
|
how to pass large data to a jsp without submitting to server
|
<p>I need to open a pop up window from a jsp and pass a json data to the new window. I have tried passing data through a query string / setting it in cookies i.e. setCookie("dataString",dataString,10);<br>
But they are not able to hold large amounts of data. The pop up window shows preview of the form, so i don't want to store this data anywhere.</p>
|
java javascript
|
[1, 3]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.