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,479,429 | 2,479,430 |
jQuery DatePicker and .NET- one calendar control but multiple instances on one .aspx page
|
<p>Scenario: I have an .aspx page containing multiple collapsible panels. Each panel represents a different report. To run a report, you click a panel and the report's user controls will appear. The date range control I created could be contained "within" more than one panel. </p>
<p>The code below does not work in the multiple panels instance. It sets all of the "to date" text boxes equal to the start date instead of just the active panel's "to date" text box.</p>
<p>How do I only work with the text boxes in the panel I have expanded?</p>
<p>Thanks for your help!</p>
<pre><code><script type="text/javascript">
$(document).ready(function(){
$('#dFrom').datepicker();
$('#dTo').datepicker();
$('#dTo').click(function(){
try{
var from = $('#dFrom').datepicker("getDate");
$('#dTo').datepicker("setDate",from);
}
catch(Error)
{
alert(Error);
}
});
});
</code></pre>
|
asp.net jquery
|
[9, 5]
|
4,395,193 | 4,395,194 |
jQuery generated input fields: read form values in php?
|
<p>I'm getting a json string with jQuery and then for each value, I add a checkbox.</p>
<pre><code>function dateClick(url){
$.getJSON(url,
function(data){
var row = $("#HourSelectionTable tbody").html();
$("#HourSelectionTable").empty();
$("#HourSelectionTable").append(row);
$.each(data, function(i,data){
if(data.free == 'true'){
$("<tr><td><input id='"+data.date+"-"+data.hour+"' value='"+data.date+"-"+data.hour+"'type='checkbox' onclick='hourClick(this.id);' /></td><td>"+data.hour+"</td></tr>").appendTo("#HourSelectionTable");
}else {
$("<tr><td>&nbsp;</td><td>"+data.hour+"</td></tr>").appendTo("#HourSelectionTable");
}
if ($("#HourSelectionTable").is(":hidden")) {
$("#HourSelectionTable").slideDown("slow");
}
});
});
</code></pre>
<p>}</p>
<p>Now, when I post the form and look at $_POST, there is nothing there.</p>
<pre><code>echo ("<pre>");
print_r($_POST);
echo ("</pre>");
</code></pre>
<p>Gives:</p>
<pre><code>Array
(
[Submit] => Bevestig
)
</code></pre>
<p>How can I solve this?</p>
<p>Dennis</p>
|
php jquery
|
[2, 5]
|
4,830,919 | 4,830,920 |
how to get the previous H3 tag
|
<p>i have this code:</p>
<pre><code> <nav role="nav" id="primary-nav" class="overview">
<h3 class="section active">
<span class="menu-toggle open"></span>
<span data-content="the-basics">The Basics</span>
</h3>
<ul class="active">
<li><a href="#" class="nav-link" data-content="0">Introduction</a></li>
<li><a href="#" class="nav-link" data-content="1">A Chapter in the Zeitgeist Movement</a></li>
</ul>
<h3 class="section">
<span class="menu-toggle"></span>
<span data-content="setting-up-a-national-chapter">Setting up a National Chapter</span>
</h3>
<ul>
<li><a href="#" class="nav-link" data-content="0">Gathering Volunteers &amp; Social Media</a></li>
</ul>
</nav>
</code></pre>
<p>and this javascript code</p>
<pre><code> // Load page
$('a.nav-link').on('click', function( event ) {
event.preventDefault();
var $this = $(this);
var parent = this.parentNode;
console.log(parent);
var dataContent = $this.attr("data-content");
console.log(dataContent);
});
</code></pre>
<p>what is the correct way to get the data-content="" of the parent H3 span for this specific section, for example i want to return the "the-basics" in the The Basics</p>
<p>any advice much appreciated.</p>
|
javascript jquery
|
[3, 5]
|
1,718,679 | 1,718,680 |
jquery reference this from parent
|
<p>Google is not being helpful trying to find the answer to this question! :(</p>
<p>How do I properly reference <code>this.colour</code> from the parent object from within a jQuery function like this:</p>
<pre><code>var obj = {
colour: 'blue',
do: function() {
$.getJSON('getcolour.php', function(resp) {
if (resp.colour == this.colour) { //<== this.colour doesnt = blue
//match
}
});
}
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
961,976 | 961,977 |
How to do user selectable background in own app in android?
|
<p>I have an android app which is a simple home screen. What I want is to create an option where users can select background by themselves. Currently I have made the option but it does not hold the background after I restart or press back button. It goes back to the background what I set in the xml file as android:background. Is there any way out? I heard by using shared preference it's possible. but don't know how to do it. Can any one help on this?</p>
|
java android
|
[1, 4]
|
4,452,745 | 4,452,746 |
Error : "Uncaught Typeerror: cannot read property 'innerHTML' of null" when appending a new <script> to div
|
<p>In below fiddle I am receiving this error :
Uncaught TypeError: Cannot set property 'innerHTML' of null </p>
<p>Looking at the code it the error seems to be thrown here : </p>
<pre><code>_$("pds-answer6343621").innerHTML=y6343621
</code></pre>
<p>I think this is occuring because the script is executing before the document is parsed but since the function is being called within $(document).ready it should work ?</p>
<p>How can fiddle be modified so that script is loaded when function update() is invoked
<a href="http://jsfiddle.net/m7q3H/121/" rel="nofollow">http://jsfiddle.net/m7q3H/121/</a></p>
<p>Fiddle code : </p>
<pre><code> <body>
<div id="toupdate">
<div id="toremove">
<script type="text/javascript" charset="utf-8" src="http://static.polldaddy.com/p/5968383.js"></script>
<noscript>
</div>
</div>
</body>
$(document).ready(function() {
update();
});
function update(){
$('#toremove').remove();
alert('removed');
$('#toupdate').append('<div id="toupdate"><script type="text/javascript" charset="utf-8" src="http://static.polldaddy.com/p/6343621.js"></scr'+'ipt></div>');
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,361,364 | 2,361,365 |
How to: compare array elements with a String
|
<p>I have predefined an array:</p>
<pre><code>$tags = array('PHP', 'Webdesign', 'Wordpress', 'Drupal', 'SQL');
</code></pre>
<p>Now I am inputting a value into a text area:</p>
<pre><code>$text = 'Working With Wordpress Shortcodes and doing some NoSQL and SQL';
</code></pre>
<p>How can I compare the string value with the predefined array?</p>
<p>The desired result I want based on the above is 'Wordpress' and 'SQL'</p>
<p>Can I do it in PHP and JQuery?</p>
<p>Also, if it will contain a regular expression like</p>
<pre><code>Working With Wordpress; Shortcodes: and doing some NoSQL and ""SQL
</code></pre>
<p>Then what to do?</p>
|
php jquery
|
[2, 5]
|
1,262,821 | 1,262,822 |
Why use $ in the name of javascript variables?
|
<blockquote>
<p><strong>Possible Duplicates:</strong><br>
<a href="http://stackoverflow.com/questions/205853/why-would-a-javascript-variable-start-with-a-dollar-sign">Why would a javascript variable start with a dollar sign?</a><br>
<a href="http://stackoverflow.com/questions/2880926/jquery-what-is-the-difference-between-var-test-and-var-test">JQuery : What is the difference between “var test” and “var $test”</a> </p>
</blockquote>
<p>What is the difference between this two ways of initializing variables?</p>
<pre><code>var $val = 'something'
OR
var val = 'something'
</code></pre>
<p>as I see they are the same thing.</p>
<p>Maybe in this case <code>$</code> is only the part of name in variable?
(it will become a meaningless question in that case:/)</p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
1,658,849 | 1,658,850 |
C#: Object reference not set to an instance of an object
|
<p>I get the following error:</p>
<blockquote>
<p>Object reference not set to an
instance of an object</p>
</blockquote>
<p>This is my C Sharp code:</p>
<pre><code> DataTable tableAcces = dsAcces.Tables["dsPrinterAcces"];
DataTable tableMDF = dsAcces.Tables["dsPrinterMDF"];
DataRow newrow = null;
foreach(DataRow dr in tableAcces.Rows)
{
newrow = tableMDF.NewRow();
newrow["PRINTER_ID"] = dr["PRINTER_ID"];
newrow["MERK"] = dr["MERK"];
newrow["MODEL"] = dr["MODEL"];
newrow["LOKAAL_ID"] = dr["LOKAAL_ID"];
tableMDF.Rows.Add(newrow);
}
daMDF.Update(dsMDF, "dsPrinterMDF");
lblSucces.Text = "Gelukt. De tabel printers is overgezet.";
}
</code></pre>
<p>In this line, he throws the error:</p>
<pre><code>newrow = tableMDF.NewRow();
</code></pre>
<p>Thanks a lot,</p>
<p>Vincent</p>
|
c# asp.net
|
[0, 9]
|
3,511,794 | 3,511,795 |
Any Javascript Library or Jquery plugin for calculating Polygon's Area?
|
<p>Let say I have a polygon with n points. Now I need to calculate the polygon area? Is there is any library exist or a custom function exist?</p>
|
javascript jquery
|
[3, 5]
|
3,505,898 | 3,505,899 |
get web page height through jquery
|
<p>How can I get the height of viewable web page of browser with jquery? I have tried $(window).height() but it did not return accurate result.. Thanks..</p>
|
javascript jquery
|
[3, 5]
|
358,570 | 358,571 |
Pull in random form for testing
|
<p>I would like some help in starting this project, some advice on where to look. On one of my sites we have a jQuery Tools powered overlay that holds a contact form. The form is located in the /forms directory. I would like to create several (5-6) forms that have different layouts and test which works best with our users. </p>
<p>I think that creating a "control" file in php, and linking to it instead of directly to a form to pull in a random form would work.</p>
<p>I am not sure about the code, but know that I need to:
- read the directory with opendir and readdir?
- add FILES to an array (use is_dir )
- generate a random number between 0 and the count() of the array
- include the specified random file.
- call this function on the click event of the link either inline or jQuery </p>
<p>Would I do this in a separate file? Any advice is much appreciated. Let me know if I need to clarify or add more details.</p>
<p>Thank you.</p>
|
php jquery
|
[2, 5]
|
270,273 | 270,274 |
Speed of Java vs. JS / HTML / CSS for web applications
|
<p>I am creating a web application. I have primarily used Javascript specifically jQuery. Because of some very specific functionality, I am running into practical limitations of Javascript--they're not hard limitations but stuff that I would find easy in Java, like making an equation editor where you can edit directly as opposed to entering TeX, is difficult in JS even using MathJax as a base. </p>
<p>I'm going to have to build even more complex functionality that involves 3D and physics engines.</p>
<p>For a large scale application like this--specifically one that involves 3D and physics engines--would Java be slower or faster than Javascript when one is run within a browser? (Assume that code is written well in both cases.) Or is it completely uncertain--i.e. dependent on far too many specific variables?</p>
<p>Thanks.</p>
|
java javascript
|
[1, 3]
|
4,410,093 | 4,410,094 |
comparing two List<>
|
<p>i have gridview control with a checkbox on it</p>
<p>When i hit on save button i able to find the checkbox which have been checked and i able to do it so far so good but the problem is:</p>
<p>let say if the user tries to uncheck the checkedbox so how would i track the changes and save it into the db that has been checked. anyhelp?.. so in that regards i have created two list for comparision... hope i make sense here.</p>
<p>i want to compare the two list and if any changes then save else ....do something...</p>
<pre><code><asp:TemplateField HeaderText="Select"> <ItemTemplate>
<asp:CheckBox ID="chkSelected" runat="server" Checked="false"></asp:CheckBox>
</ItemTemplate> </asp:TemplateField>
List<Employee> listFromDB = new List<Employee>();
listFromDB = EmployeeListFromDB ; //loads the list
List<Employee> selectedEmployee = new List<Employee>();
selectedEmployee = MySelectedEmployee //loads the list
//Employee object looks like this:
id
name
</code></pre>
<p>here is what i got stuck and here is what i am doing...</p>
<pre><code>foreach (Employee item in MySelectedEmployee )
{
bool _flag = false;
_flag = EmployeeService.SaveEmployee(item.Id, item.Name);
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
4,227,382 | 4,227,383 |
Return to Main Activity from arbitrary Activity on android application
|
<p>I'm developing an android application which have a kind of action bar and a dashboard.</p>
<p>When the user click the "application logo" button on the ActionBar from any Activity in the application,
it would then open the dashboard activity. And finish all others Activities behind it.</p>
<p>What is the best way to do that, if I just start the new Dasboard Activity,
then how could I finish others activities behind it?</p>
<p>Thanks.</p>
|
java android
|
[1, 4]
|
3,322,638 | 3,322,639 |
decoding ISO characters
|
<p>I got Chinese characters encoded in ISO-8859-1, for example <code>&#20860; = 兼</code><br>
Those characters are taken form the database using AJAX and sent by Json using json_encode.<br>
I then use the template Handlebars to set the data on the page.<br>
When I look at the ajax page the characters are displayed correctly, the source is still encoded.<br>
But the final result displays the encrypted characters.</p>
<p>I tried to decode on the javascript part with <code>unescape</code> but there is no foreach with the template that gives me the possibility to decode the specific variable, so it crashes.<br>
I tried to decode on the PHP side with <code>htmlspecialchars_decode</code> but without success.</p>
<p>Both pages are encoded in ISO-8859-1, but I can change them in UTF8 if necessary, but the data in the database remains encoded in ISO-8859-1.</p>
<p>Thank you for your help.</p>
|
php javascript jquery
|
[2, 3, 5]
|
3,200,940 | 3,200,941 |
Set phone format in php?
|
<p>hi I have a simple text field for "Phone Number" in a contact form on a client's website so The format script returns like this(xxx) xxx-xxx whatever the user types into the field example user enter first three numbers than automatically show textfield data like above i mention </p>
<p>please guide me</p>
<p>Thanks for advance</p>
|
php javascript
|
[2, 3]
|
3,505,098 | 3,505,099 |
JavaScript does not replace the last symbol of the string
|
<p>I have try to replace a symbol in JavaScript, but somehow this is always only replace the 1st symbol of the string instead of replaced all the symbol. </p>
<p><strong>JavaScript</strong>:</p>
<pre><code>var note = "test'test'test'";
note = note .replace("'", "&#39;");
</code></pre>
<p><strong>Output</strong>:</p>
<pre><code>test&#39;test'test'
</code></pre>
<p>Does anyone know how can I can replace all <code>'</code> symbols with <code>&#39;</code> ??</p>
|
javascript jquery
|
[3, 5]
|
358,812 | 358,813 |
jquery entering only numbers in text box
|
<p>Need to restrict entering alphabets and special characters in a textbox using jquery. Need to enter only numbers.
How to implement using keypress() functionality in jquery for a text box in jsf?.</p>
<p>Code :</p>
<pre><code> <table>
<tr>
<h:inputlabel value="Actual"></h:inputlabel>
<td>
<h:inputtext id="Actual" styleClass="input-tex" value="#bean.customer"></h:inputtext>
<td>
</tr>
<table>
</code></pre>
<p>Any help is appreciated.</p>
|
javascript jquery
|
[3, 5]
|
3,338,428 | 3,338,429 |
What personal information about website visitor can be collected with PHP and JavaScript?
|
<p>For example I am thinking about things like this:</p>
<ul>
<li>IP - <code>$_SERVER['REMOTE_ADDR']</code></li>
<li>User Agent - <code>$_SERVER['HTTP_USER_AGENT']</code></li>
<li>Referer - <code>$_SERVER['HTTP_REFERER']</code></li>
<li>Language - <code>$_SERVER['HTTP_ACCEPT_LANGUAGE']</code></li>
<li>Screen resolution <code>JS: screen.height, screen.width</code></li>
<li>Browser Plugins <code>JS: navigator.plugins</code></li>
<li><a href="http://stackoverflow.com/questions/440160/detect-version-of-java-using-javascript">Detect Java Version</a></li>
<li><a href="http://stackoverflow.com/questions/159261/cross-browser-flash-detection-in-javascript">Detect Flash Version</a></li>
<li>Operating system <code>JS: navigator.platform</code></li>
<li>(User GPS Position <code>JS: navigator.geolocation</code>)</li>
<li>...</li>
</ul>
<p>I guess this list is not complete so please help me out. What else can you collect about the visitor? I would like to limit this question to PHP and JavaScript methods only.</p>
<p>Disclaimer: You should only collect data you <em>really</em> need and delete it as soon as possible! </p>
|
php javascript
|
[2, 3]
|
5,006,357 | 5,006,358 |
Is there a good way to identify a word, even if it's misspelled in javascript?
|
<p>I have a bunch of words (mostly locations, like Stockholm and London) and a bunch of strings. like "I want to go from stockholm to london". I want to find out what words are in what strings.</p>
<p>I currently use .indexOf to perform this task.</p>
<p>Is there a library, method, function etc, in javascript that identifies misspelled versions of words?</p>
|
javascript jquery
|
[3, 5]
|
428,213 | 428,214 |
Clicking a div that opens a corresponding div
|
<p>I am dynamically creating a div class for a set of divs. The class corresponds with the class of another set of divs (also dynamically generated). I gave them the same class so as to be able to click on the div that displays by default and have the corresponding div appear (which is not displayed by default). The setup would be something like this with divs 'foo' being displayed and 'bar' being hidden</p>
<pre><code><div id="foo" class="one">1</div>
<div id="foo" class="two">2</div>
<div id="foo" class="three">3</div>
<div id="bar" class="one">One</div>
<div id="bar" class="two">Two</div>
<div id="bar" class="three">Three</div>
</code></pre>
<p>I dont know how to put this in jQuery. I know it is going to be a click function, I'm just not sure how to grab a class where I'm not sure what the value is. Any help is really appreciated!</p>
|
php jquery
|
[2, 5]
|
653,559 | 653,560 |
jQuery - Setting field values in the action page while loading it through the load function
|
<p>I have two html pages, directory.html and customer.html</p>
<p>I'm trying to set values to the text fields presented in my action page (customer.html) from my directory.html page.</p>
<p>I'm using the jQuery's load function to load my directory page, Can someone please guide me how I can set the text field's value (automatically) as soon as I load the action page through the load function?</p>
<p>TIA</p>
|
javascript jquery
|
[3, 5]
|
537,949 | 537,950 |
How to create and use a two dimensional array of classes
|
<p>I was just experimenting with a two dimensional array of classes in java. I wrote the following (wrong) code:</p>
<pre><code>public class GameEvent
{
static int LAUNCH_ALIEN = 0;
static int END = 1;
long time;
long cum_time;
int alien_type;
int event_code;
}
</code></pre>
<p>then</p>
<pre><code>GameEvent[][] event_array = new GameEvent[MAX_LEVELS][MAX_EVENTS];
</code></pre>
<p>and accessed it with code like below (read comment in code):</p>
<pre><code>event_array[lev][ctr].event_code = code; // nullpointer exception at runtime
</code></pre>
<p>So my question now is, what is the least painful way to change my code so that it works.</p>
|
java android
|
[1, 4]
|
4,492,965 | 4,492,966 |
How can I include javascript in content loaded with jquery using $.ajax
|
<p>I want to load some HTML which include a bit of javascript, using jQuery. I've tried using both load() and ajax(). The HTML is inserted nicely into the DOM, but any script-tags seems to be filtered out. If I alert() the returned HTML, the scripts are included, but when i use html() or append(), the scripts are missing.</p>
<p>Any ideas?</p>
|
javascript jquery
|
[3, 5]
|
1,642,697 | 1,642,698 |
How to hide the full url of a website and only display the domain name?
|
<p>How would I hide the pages that the user is surfing and just show
him/her the domain name. E.G. www.google.com as opposed to
www.google.com/index.aspx etc...</p>
<p>Thanks</p>
|
c# asp.net
|
[0, 9]
|
3,630,875 | 3,630,876 |
How to convert an image into ASCII
|
<p>I want to send an image to the server through XML. For that i need to change my image in ASCII. Can any one help me</p>
<p>Thanks in Advance. </p>
|
java android
|
[1, 4]
|
476,642 | 476,643 |
How to develop application for both 320x480 and 480x854?
|
<p>i to implement my same application for both 320x480 and 480x854 resolutions. For this purpose i copied my images in hdpi and mdpi drawable folders but still it is not working with480x854 resolution. What i must do other than this to solve my problem?
Thanks</p>
|
java android
|
[1, 4]
|
987,867 | 987,868 |
Abstract question about Dom Object as Value Object in Javascript
|
<p>I've got an image gallery where each item in the gallery has a unique ID I'm using to tie it to my backend so that I can run DB actions etc. I'm using the data attribute to hold the 'imageid' on the parent div of each image for example: data-imageid="168"</p>
<p>The image gallery items have alot of nested divs so on rollover/click I find myself doing alot of the below in order to run actions:</p>
<pre><code>$(this).parent().parent().attr('data-imageid');
</code></pre>
<p>It doesn't feel like a clean solution or the best performance wise. How are other people handling this? What's the best solution? Whatever the solution, this must be a problem solved everyday.</p>
<p>Edit: I realize my subject line is vague but it further explains where my heads at with this problem.</p>
|
javascript jquery
|
[3, 5]
|
1,624,607 | 1,624,608 |
Sharedpreferences in android
|
<p>Well, I am beginner in Android and java, but I'm trying to learn.</p>
<p>My question is. I have these methods in my class (to save and load Sharedpreferences):</p>
<pre><code>private String Load_pref(String key){
SharedPreferences sharedPreferences = getPreferences(MODE_PRIVATE);
String strSavedMem1 = sharedPreferences.getString(key, "");
return strSavedMem1;
}
public void Save_pref(String key, String value){
SharedPreferences sharedPreferences = getPreferences(MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putString(key, value);
editor.commit();
}
</code></pre>
<p>Well, Its work well, but I would call these methods from another class (other screen activity). I tried to do this in my other activity:</p>
<pre><code> MyActivity1 A = new MyActivity1();
A.Save_pref("ACCOUNT","Myname");
</code></pre>
<p>The code compiles without problem, but the program crashes in this part of the code.
Someone could help me solve this problem?</p>
<p>Thanks,
Alexandre</p>
|
java android
|
[1, 4]
|
4,018,250 | 4,018,251 |
View the changes made by the user on the screen c#?
|
<p>I have a gridview where the user will be able to enter values and save the changes made. I want to show the user the changes he made so far in the grid and traverse him through the changes on next and previous button clicks like how we do in TFS and other compare tools.</p>
<p>Can you please suggest me how can I achieve this compare functionality in c#?
Are there any open source dll's available to do the comparison and traverse through the changes. Any help will be appreciated..Thanks.</p>
|
c# asp.net
|
[0, 9]
|
2,931,249 | 2,931,250 |
JQuery multiply and add
|
<p>Let's say I have some numbers that I want to multiply and add. </p>
<pre><code>var a = 5;
var b = 10;
var c = 2;
var d = 3;
</code></pre>
<p>I want to sum b and c then multiply that by a, then add d. Easy right?</p>
<p>If if were a normal equation the formula would look like: (a * (b + c) + d)</p>
<p>But how do I do that in JQuery? </p>
<p>(Note: the reason for JQuery is that I'll be getting these numbers from fields and divs... and placing a total elsewhere, etc.)</p>
|
javascript jquery
|
[3, 5]
|
3,665,231 | 3,665,232 |
Jquery function remain focus in text fields in all forms even div tag displayed
|
<p>I am using this function to show div tag in master page</p>
<pre><code>$("#div_NotificationOuter").show(1000);
$("#div_NotificationOuter").animate({ bottom: '+=30px' }, 4000);
</code></pre>
<p>But in some pages I have textfields and when this div tag display fields loosing focus.
How I remain focus in text fields in all forms even div tag displayed.</p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
2,142,066 | 2,142,067 |
Javascript alert when user closes the tab ot the window
|
<p>I want when a user closes the tab or window or when he tries to move to another location different from my site to pops a confirm box, and if he confirm to execute an ajax script and then to close or change the window. I don't know how to do that. PS: I'm using jQuery.</p>
|
javascript jquery
|
[3, 5]
|
179,023 | 179,024 |
Overriding a global variable in Javascript
|
<pre><code>$(document).ready(function(){
var min="1.2.2";
$.validator.addMethod('xyz', function(value, element, param) {
alert(min);
min=minAorB();// I want to call a function which will return the minimum among A and B.
alert(min);
return (validateAnmcComp(value,param));
}, "Please enter a value less than or equal to "+min);
})(jQuery);
</code></pre>
<p>I want the message to be displayed as "Please enter a value less than or equal to 1.4.5"</p>
|
javascript jquery
|
[3, 5]
|
899,613 | 899,614 |
How to remember form values across different pages?
|
<p>I need to send form values from one page to another and from that page to a third page. I would need the form values from the first page in the third page. How can I do it?</p>
<p>I have the code that transfers form values to the next page. How can I send the same form values to the third page?</p>
<pre><code><script type="text/javascript" src="jquery-1.2.6.min.js"></script>
<script type="text/javascript">
// we will add our javascript code here
$(document).ready(function(){
$("#ajax-contact-form").submit(function(){
var str = $(this).serialize();
$.ajax({
type: "POST",
url: "contact.php",
data: str,
success: function(msg){
$("#note").ajaxComplete(function(event, request, settings){
if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
window.location.href = "http://www.google.com";
$("#fields").hide();
}
else
{
result = msg;
}
$(this).html(result);
});
}
});
return false;
});
});
</script>
</code></pre>
|
php javascript jquery
|
[2, 3, 5]
|
874,465 | 874,466 |
How to download images from url?
|
<p>I want to download the image from reome URL and I get SSL error</p>
<pre><code> String imgURL="http://whootin.s3.amazonaws.com/uploads/upload/0/0/23/82/Note_03_26_2013_01_10_55_68.jpg?AWSAccessKeyId=AKIAJF5QHW2P5ZLAGVDQ&Signature=Za4yG0YKS4%2FgoxSidFsZaAA8vWQ%3D&Expires=1364888750";
final ImageView ivCurrent;
ivCurrent = (ImageView)findViewById(R.id.imageView1);
// calling DownloadAndReadImage class to load and save image in sd card
DownloadAndReadImage dImage= new DownloadAndReadImage(imgURL,1);
ivCurrent.setImageBitmap(dImage.getBitmapImage());
</code></pre>
<p>The error:</p>
<pre><code>javax.net.ssl.SSLException: Read error: ssl=0x19a4a0: I/O error during system call, Connection reset by peer
</code></pre>
|
java android
|
[1, 4]
|
3,505,700 | 3,505,701 |
Dynamically change style of panels through javascript
|
<p>I am trying to display a new panel after the user clicks an add button, for some reason this is not working (it refreshes the page as well, even though my button has a return true) I have tried different ways, but nothing seems to work that well.</p>
<pre><code><asp:Button ID="btnAdd" runat="server" Text="Add Property" CssClass="btn" OnClientClick="addProperty(); return false;" />
<script type="text/javascript">
var num = 1;
function addProperty()
{
num++;
var panelName = "<%=pnlProperty" + num.toString() + ".ClientID%>";
alert(panelName);
document.getElementById(panelName).style.display="inline";
}
</script>
</code></pre>
<p>Any helps would be great!</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
720,311 | 720,312 |
How to cancel/kill window.setTimeout before it happens on the client?
|
<p>I have a few places where I use the line below to clear out a status for example. I have a few of these that hang out for 10 seconds or more and if the user gets clicking around the action can occur at incorrect time intervals. Is it possible to cancel or kill this w/ some jQuery or JavaScript so I don't have this process hanging around?</p>
<pre><code>window.setTimeout(function() { removeStatusIndicator(); }, statusTimeout);
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,636,105 | 1,636,106 |
missing ; before statement jquery error
|
<p>I get this error that I don't understand: </p>
<pre><code>`missing ; before statement`
</code></pre>
<p>Here is the code</p>
<pre><code> },
'addevent' : function(data, formData){
var entry = fx.deserialize(formData);
},
'deserialize' : function(str){
var data = str.split("&"),
pairs = [], entry{}, key, val; //ERROR
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,422,079 | 3,422,080 |
Disabling the asp.net link button n radios using Jquery
|
<p>How to disable the asp.net Link buttons and asp.net radio buttons.
I have used
</p>
<p>to enable
$("#sLbtnFirst").attr("disabled", "");
to disable
$("#sLbtnFirst").attr("disabled", "disabled");</p>
<p>but i'm able to click the buttons they are just greying</p>
|
asp.net jquery
|
[9, 5]
|
5,468,982 | 5,468,983 |
Update variable when value is present
|
<p>I have a simple string of code. I want to show a default value when the page is loaded where the function <code>numResults()</code> is. At some point I want to update <code>numResults()</code> with a new value and then change the string without reloading the page.</p>
<pre><code>$('#step1').before('Showing results 1 - ' + numResults());
function numResults(value) {
var results = 10; // default number
if (value) {
return value; // show updated value
} else {
return results; // show default
}
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,080,182 | 1,080,183 |
Pass checkbox values to php script page jquery
|
<p>I have a following code it is getting the values of checked checkboxes and submit the data on button click.Pls look into the code and do let me where i am wrong.It is not working</p>
<pre><code>$(document).ready(function() {
$(function(){
$('#btnClick').click(function(){
var val = [];
$(':checkbox:checked').each(function(i){
val[i] = $(this).val();
$.ajax({
url: 'server.php',
type: "POST",
data: ({val[i]}), ????
success: function(data){
}
});
});
});
});
});
</code></pre>
|
php jquery
|
[2, 5]
|
3,544,644 | 3,544,645 |
Android Application that makes HTTP calls in multiple Activities does not return data correctly
|
<p>The app makes calls (utilizing HttpPost) to a PHP files that sends a queries to a MySQL database. The PHP file parses the data into a Java-friendly string statement that can easily be converted to a <code>String[]</code> array (<code>String[] str = data_from_php.split(",");</code>); so the data id formatted like so: "Item 1,Item 2,Item 3".</p>
<p>Multiple Activities run that type of code back-to-back: </p>
<p>(1) Activity 1 will use the <code>String[]</code> array to build a ListActivity, which is working fine. When the user clicks a list item, it pulls the Text from that Object and forwards it to the next Activity (using putExtra).</p>
<p>(2) Activity 2 uses the extra data from A1 in the HttpPost method to get another <code>String[]</code> array to build another ListActivity. Again, the user chooses an item and extra data gets sent to Act 3.</p>
<p>(3) The 3rd Activity in the chain sends the data in the same manner as above, but this Activity display a chunk of data in a TextView.</p>
<p>The issue is that from both Activities that have a List Array, if I choose the LAST item on any list (either Act 1, or 2), the next resulting Activity will return no data.</p>
<p>Has anyone encountered an issue like this? I feel as if I am overlooking something.</p>
|
java android
|
[1, 4]
|
3,158,973 | 3,158,974 |
How could I find an element with similar ID in JS?
|
<p>In my page I have labels that look like this:</p>
<pre><code>ContentPlaceHolder1_gvGroups_lblName_0
</code></pre>
<p>with corrosponding:</p>
<pre><code>ContentPlaceHolder1_gvGroups_lblHidden_0
</code></pre>
<p>I can assert that any *lblName has a corrosponding *lblHidden.</p>
<p>Now, I have some js:</p>
<pre><code>//use to make any label with 'edit' class editable
function makeLabelsEditable() {
$(".edit").focusout(function () {
setLabel(this);
});
$(".edit").click(function () {
editLabel(this);
});
}
//used to edit labels
function editLabel(source) {
source.innerHTML = '<input type="text" maxlength="40" value="' + source.innerHTML + '"/>';
$(source).unbind('click');
source.children[0].focus()
}
//used to edit labels
function setLabel(source) {
if (source.children[0].value != '') {
$(source).click(function () {
editLabel(this);
});
source.innerHTML = source.children[0].value;
}
}
</code></pre>
<p>I can assert that anything marked with class edit will be valid.</p>
<p>I need to modify this code like so:
//used to edit labels</p>
<pre><code>function setLabel(source) {
if (source.children[0].value != '') {
$(source).click(function () {
editLabel(this);
});
source.innerHTML = source.children[0].value;
var hidden = someHowGetHiddenFromSource(source);
hidden.innerHTML = source.children[0].value;
}
}
</code></pre>
<p>I'm sure this is possible, I just do not know how.</p>
<p>Essentially, it would be something like:</p>
<pre><code>getElementByID(replace(source.id,'lblName','lblHidden'));
</code></pre>
<p>I just do not know what JS / JQ functions can do that.</p>
<p>Thanks</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
1,001,655 | 1,001,656 |
how to call C++ dll function with int& and int* parameters from C#?
|
<p>My C++ DLL have a function like this:</p>
<pre><code>void func1(int& count, int* pValue);
</code></pre>
<p>this function will determine the "count", and put some values into the pValue int array which is the length of "count". </p>
<p>how can I define my C# code? you can ignor the [DllImport ...] part.</p>
<p>thanks,</p>
|
c# c++
|
[0, 6]
|
2,863,957 | 2,863,958 |
display "page loading" message
|
<p>I'm trying to display an image (.gif) for "page loading" in html page until the output from my_script.py gets displayed, and I've no idea how to do that. <a href="http://jsfiddle.net/9X4gW/" rel="nofollow">This</a> is what I've got so far. Many thanks in advance.</p>
<p><strong>HTML:</strong></p>
<pre><code><div id="loading">
<p><img src="./images/loading.gif" /> Please Wait</p>
</div>
<form action="./cgi-bin/my_script.py" method="post" enctype="multipart/form-data" name="fname">
<input type="submit" id="submit" value="Submit" />
</form>
</code></pre>
<p><strong>js:</strong> </p>
<pre><code> $(document).ready(function() {
$("form").submit(function() {
showLoading();
$('#content').load('./cgi-bin/my_script.py', null, showResponse);
});
function showResponse() {
hideLoading();
}
function showLoading() {
$("#loading").show();
}
function hideLoading() {
$("#loading").hide();
}
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,898,575 | 1,898,576 |
jQuery: how to select every cell in a table except the last in each row?
|
<p>I want every cell in each row except the last in each row. I tried:</p>
<pre><code>$("table tr td:not(:last)")
</code></pre>
<p>but that seems to have given me every cell except the very last in the table. Not quite what I want.</p>
<p>I'm sure this is simple but I'm still wrapping my head around the selectors.</p>
|
javascript jquery
|
[3, 5]
|
1,210,049 | 1,210,050 |
Grep strings in jQuery
|
<p>I have a jQuery object (thisClass) that contains 2 or more class names. I am trying to figure out how to return only the class name that is in a predetermined array.</p>
<p>Something like this:</p>
<pre><code>var thisClass = $(this).attr("class");
var icons = ["glass","leaf","dog","home"];
[Use grep here to return thisClass only as a single class name that is filtered by, or contained in icons.]
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,111,340 | 3,111,341 |
Show values from array in jquery
|
<p>Ok, the title might make it sound easy (and maybe it is), but I can't figure out how to show values from an array, not just do a <em>each</em> with them, but put them on the site slowly, with a nice effect... </p>
<p>Like this <a href="https://twitter.com/about/resources/widgets/widget_search" rel="nofollow">Twitter widget</a>, but from an array (maybe wait 2sec, and when throw another value from the array)?</p>
<p>My array contains another array, with 4 values, is it possible to show the first 2 values, wait about 2 sec, and then show the last 2 values? Now when the last two values is out (from the prev array), wait 2 more seconds, and show the next array (again with four values, first show 2, wait 2 sec, and show the next 2, and so on...)</p>
|
javascript jquery
|
[3, 5]
|
2,722,805 | 2,722,806 |
Difference between console.log enabled verification
|
<p>I have seen <code>jquery-ui-1.8.11.js</code> verify <code>console.log</code> functionality by doing</p>
<pre><code>if (this.debug)
console.log()
</code></pre>
<p>I have also seen people define an anonymous function that is a no-op for browsers with no console logging like IE7.</p>
<pre><code>if(typeof console === "undefined") {
console = { log: function() { } };
}
</code></pre>
<hr />
<p>Is there a technical difference or are both functionally equivalent?</p>
|
javascript jquery
|
[3, 5]
|
2,889,464 | 2,889,465 |
Uploading files captured within an android application to a remote server on a desktop
|
<p>I have just finished my android application which uses the native phone camera to take a picture and also record a video. I now want to use my phone to upload these items remotely on my local website(with Apache as the web-server and MySQL as the database scripting language is php). However, this website is running locally. I was hoping to create an ad-hoc. Can someone help me program my submit button on my phone with the right parameters so as to successfully upload my data on my local web application. Thanx in advance. </p>
|
php android
|
[2, 4]
|
3,339,392 | 3,339,393 |
How to pass parameter with a href and onclick function
|
<p>I want to pass parameter when I click in <code><a href></code>, first I have this and works fine:</p>
<pre><code> <a href="#" rel="like{{num}}"> I like </a>|
$("a[rel^='like']").click(function(){
$.ajax({
...
});
</code></pre>
<p>but I don't know how to pass parameter to that function, so I do this:</p>
<pre><code> <a href="#" rel="like{{num}}"
onclick="cap(para1, para2)"> I like </a>
</code></pre>
<p>Finally, in my Javascript I have this simple function:</p>
<pre><code> function cap(para1, para2){
alert('here');
}
</code></pre>
<p>but I obtain this error:</p>
<pre><code>ReferenceError: cap is not defined
</code></pre>
<p>Any idea?</p>
|
javascript jquery
|
[3, 5]
|
4,029,530 | 4,029,531 |
External JS file not finding controls, but work with quickwatch
|
<p>I have the following code in my aspx file:</p>
<pre><code>var blah = "<%= lblErrorsMain.ClientID %>"
</code></pre>
<p>and here is the external js file:</p>
<pre><code>function ShowShowScans2() {
oWebDialogWindow2 = document.getElementById(blah);
oWebDialogWindow2.set_windowState($IG.DialogWindowState.Normal);
return false;
}
</code></pre>
<p>When the code runs, it always bombs out at the oWebDialogWindow2.set_windowState($IG.DialogWindowState.Normal) that Microsoft JScript runtime error: Unable to get value of the property 'set_windowState': object is null or undefined.
When I break into the code and hover over oWebDialogWindow2, it's null. But, when I open a quickwatch window and do document.getElementById(blah), I get access to the object. What is going on?</p>
|
javascript asp.net
|
[3, 9]
|
5,923,848 | 5,923,849 |
Logout in PHP using button onclick event
|
<p>I'm just implementing a login and logout system in PHP and experiencing problems with logout. The system outline is as follows:</p>
<ol>
<li>When the user logs in, a session is created with a session variable "user".</li>
<li>After the session is set up, the user is redirected to <code>index.php</code> file.</li>
<li>In that file, a logout button is placed. When the user clicks the logout button session should be destroyed.</li>
</ol>
<p>I've designed the 2 steps above but can't perform the logout action when the <strong>button is clicked</strong>. How to do that? By using <strong>Javascript</strong> or any other ideas?</p>
|
php javascript
|
[2, 3]
|
118,114 | 118,115 |
Time calculate and compare for best time in Android
|
<p>How to calculate time taken in playing a game in Android using java. Can you please specify which timer you are using?
And how to compare those time slacks taken by user to find which is his best score?</p>
|
java android
|
[1, 4]
|
150,690 | 150,691 |
pnotify refuses to work
|
<p>I downloaded the pnotify jquery plugin from <a href="http://pinesframework.org/pnotify" rel="nofollow">Pines Notify</a></p>
<p>Simply it tells me to add the required js and css files and on document ready the following should work !</p>
<pre><code>$(document).ready(function() {
$.pnotify({
type: 'error',
title: 'Errors found in form',
text: 'Please check all form data, some items were invalid.',
opacity: 0.95,
hide:false,
history: false,
sticker: false
});
});
</code></pre>
<p>But it just keeps giving me the error </p>
<blockquote>
<p>Uncaught TypeError: Object function (e,t){return new v.fn.init(e,t,n)}
has no method 'pnotify'</p>
</blockquote>
<p>And the silliest thing is that im visual VS 2012 and from within the dev environment it shows me pnotify as a function of '$' as intellisense !</p>
<p>What could i be doing wrong ?</p>
|
javascript jquery
|
[3, 5]
|
2,982,573 | 2,982,574 |
Recognize fields from PDF,DOC and etc formats and export them to database
|
<p>is anybody know the solution for reading file(for example pdf format, it has some tax information), recognize fields and write them to DB? It is similiar idea that FlexiCapture has. </p>
<p>Thank you for your attention!</p>
|
java php python
|
[1, 2, 7]
|
3,744,335 | 3,744,336 |
How to override another javascripts css changes without being able to modify that file?
|
<p>I'm customising a Tumblr theme.</p>
<p>Tumblr's lightbox for Photosets is created through their own javascript, on the fly. IE: When i click on a link, the element is created at the bottom of the page. Here's a copy of that file: <a href="http://dl.dropbox.com/u/346800/stackoverflow-questions/tumblr.js" rel="nofollow">http://dl.dropbox.com/u/346800/stackoverflow-questions/tumblr.js</a> and the line in question is #370:</p>
<pre><code> stage.style.backgroundColor = (image.className == "placeholder") ? ((navigator && navigator.userAgent.indexOf("MSIE") != -1) ? "#444" : "rgba(255,255,255,0.05)") : "transparent";
</code></pre>
<p>The question is, how do i make my css declarations take precedence over a JS generated group of elements? Since I can't manipulate their built in JS, I need to do it in my own file.</p>
<p>You can see that here: <a href="http://syndex.me" rel="nofollow">http://syndex.me</a>
The very first post is a photoset.</p>
|
javascript jquery
|
[3, 5]
|
2,000,529 | 2,000,530 |
Clean way to detect if a Java library is being used on Android
|
<p>What is a good way to detect inside a Java library, if it is being used on the Android platform?</p>
|
java android
|
[1, 4]
|
1,183,948 | 1,183,949 |
Keypress anywhere to text field?
|
<p>I'm wanting to mimic the functionality in the new Myspace. What happens is you can simply start typing and the UI changes to a "search". The characters entered are now within a large text field with auto complete showing results.</p>
<p>How do I detect a keypress anywhere on the page, not within a specific text field?
How do I then show the text and/or focus on the text field with the text being entered?</p>
|
javascript jquery
|
[3, 5]
|
5,494,269 | 5,494,270 |
From Java to C++ or C#
|
<p>I am having a technical interview in a week where I expect questions in C++ or C#. I have strong knowledge and experience in Java. Which one (C++ or C#) would be easy to jump and be prepared in a week for simple questions like binary tree, linked list etc? I have never worked with any of them. So syntax similariness, concept etc are important for me. I need start with one of them asap.</p>
<p>Thanks for your comments.</p>
|
c# java c++
|
[0, 1, 6]
|
3,068,554 | 3,068,555 |
Get URL to current background-image and hand over to <a href>
|
<p>I have an issue i couldn't figure out so far. I googled and searched here, found some answers, but I can't get it to work.</p>
<p>I want to figure out the current background image from css and create a link to download the image.</p>
<p>This is my simplyfied code so far:</p>
<pre><code><style type="text/css">
body.custom-background { background-image: url('http://localhost:8888/wp-content/uploads/2012/04/bg2.jpg'); background-repeat: no-repeat; background-position: top center; background-attachment: scroll; }
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
var image = body.custom-background.css('background-image').replace(/^url\((.*?)\)$/, '$1');
document.getElementById('link').setAttribute("href",image);
</script>
<div id="hide">
<a id="hidepage">hide page</a>
<a id="showpage" style="display:none;">show page</a>
</div>
<div id="downloadbg">
<a id="link"><br>Download Background</a>
</div>
</code></pre>
<p>I am pretty new to programming and I am running out of ideas.</p>
<p>Thank you very much for your help.</p>
|
javascript jquery
|
[3, 5]
|
2,186,645 | 2,186,646 |
how to call a javascript fn in Update panel on Partial postback in asp.net
|
<pre><code> <asp:UpdatePanel runat="server" ID="Holder" OnLoad="" UpdateMode="Always" ChildrenAsTriggers="True">
<ContentTemplate>
...
<asp:Timer ID="Timer1" runat="server" Interval="3000" OnTick="Timer_Tick" />
</ContentTemplate>
</asp:UpdatePanel>
</code></pre>
<p>JS:</p>
<pre><code>window.onload = function () {
r.init();
};
</code></pre>
<p>when the page loads the r.init() [to draw graph] is executed. But when the page partial post back happens the graph is not drawn again. How to fire the JS when the update panel isFinite updated</p>
|
javascript asp.net
|
[3, 9]
|
1,713,600 | 1,713,601 |
How to Center Facebox
|
<p>I like to center facebox on a project im working on. when i added this code it will center</p>
<pre><code> $(document).bind('close.facebox', function() {
$(document).unbind('keydown.facebox')
$('#facebox').fadeOut(function() {
$('#facebox .content').removeClass().addClass('content')
$('#facebox .loading').remove()
$(document).trigger('afterClose.facebox')
})
hideOverlay()
})
</code></pre>
<p>problem is it will load on top then move to center. is there anyway to make the facebox load on center? thanks.</p>
|
javascript jquery
|
[3, 5]
|
701,870 | 701,871 |
Time Update Application
|
<p>I am trying to make a digital clock in android.</p>
<p>I looked into the Time and Date classes.</p>
<p>However I cannot find any API that is tells me how to obtain when a minute has passed?
For e.g. when working with locationManagers,</p>
<pre><code> public void onLocationChanged(Location location)
</code></pre>
<p>is called when new location is available.</p>
<p>Similarly I am looking for something that is called when time changes, where time is in format hh:mm or hh:mm:ss.</p>
|
java android
|
[1, 4]
|
4,486,250 | 4,486,251 |
Target iframe body and remove nodeType 3 (=text)
|
<p>I'm trying to access an iframe's content but for some reason it doesn't work. I can do this which will work:</p>
<pre><code>$('iframe').load(function (){
$('#iframeID').contents().find('SOMETHING').remove();
});
</code></pre>
<p>Anything else does work except for this code:</p>
<pre><code>$('iframe').load(function (){
$('#iframeID').contents().find('body *:not(.ThisClass *)').contents().filter(function() {
return this.nodeType == 3;
}).remove();
});
</code></pre>
<p>It should work but it doesn't. What could be the problem? There are no errors in my console.</p>
|
javascript jquery
|
[3, 5]
|
4,792,412 | 4,792,413 |
The import android.os.storage.StorageVolume cannot be resolved
|
<p>I have android.jar in my path. Do I need any other jars?
Thank you</p>
|
java android
|
[1, 4]
|
3,643,793 | 3,643,794 |
jQuery and the this object
|
<p>jQuery is too overpowering :(</p>
<pre><code>String.prototype.trim = function () {
return this.replace(/^(\s|&nbsp;|\u00A0)+|(\s|&nbsp;|\u00A0)+$/g, "");
}
</code></pre>
<p>when I try to add the above code, I get <em>"this.replace is not a function"</em>.</p>
<p>I realise that jQuery references itself as <code>this</code>, so how are you meant to reference <code>this</code>?</p>
|
javascript jquery
|
[3, 5]
|
4,000,640 | 4,000,641 |
Edit output of a pre-compiled generic handler .ashx
|
<p>I've inherited a pre-compiled website that uses javascript created in a generic handler (ashx). I need to modify the js, but I dont have the source, only the pre-compiled libraries. Currently, we're simply doing an http request on the ashx, modifying the result and then outputting it directly on the site:</p>
<pre><code><script runat="server">
protected string getJs()
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri(Request.Url, "/js.ashx"));
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader sr = new StreamReader(response.GetResponseStream());
return = sr.ReadToEnd().Replace("old stuff", "new stuff");
}
</script>
<script type="text/javascript">
<%= getJs() %>
</script>
</code></pre>
<p>This seems like a pretty round-about way of doing this. Is there anyway to modify the output of a generic handler without requesting the page itself?</p>
|
c# asp.net
|
[0, 9]
|
4,025,016 | 4,025,017 |
how to get location of div and highlight it
|
<p>Like stackOverFlow ,after click the message box,the page jump to my question,locate and highlight the answer .</p>
<p>i want to implement it with both <code>javascript</code> and <code>jquery</code> .</p>
|
javascript jquery
|
[3, 5]
|
4,253,836 | 4,253,837 |
Problem regarding mail content
|
<p>I am sending mail to the customers. And the format is like this:</p>
<blockquote>
<p>Name: abc. Company:ccc. Address: sde.</p>
</blockquote>
<p>So the mail is coming out in continuous format which I don't want.</p>
<p>I want it in this format:</p>
<blockquote>
<p>Name: abc.</p>
<p>Company:ccc.</p>
<p>Address: sde.</p>
</blockquote>
<p>I'm currently using <code>string.format</code> to populate each of the values and later on replacing '<code>.</code>' with '<code>\n</code>'.<br />
However, it looks like that is not working.
Any suggestions on how to make it look like this?</p>
|
c# asp.net
|
[0, 9]
|
3,992,427 | 3,992,428 |
return value javascript UIWebView
|
<p>i'm trying to get the return value of a javascript function(for example: <code>return "hello"</code>) with iPhone SDK.</p>
<p>On OS X the WebView method <code>-stringByEvaluatingJavaScriptFromString</code> returns a NSString containing the js function return value, but on the iPhone no value is returned.</p>
<p>How can I solve this?</p>
<hr>
<p>I found a private UIWebViewDelegate method</p>
<pre><code>- (void)webView:(id)fp8 runJavaScriptAlertPanelWithMessage:(id)fp12 initiatedByFrame:(id)fp16
</code></pre>
<p>invoked when the alert() function is used in the js script. So I can get the "return" value just by calling <code>alert(myReturValue)</code>.</p>
<p>That doesn't solve my problem, because I need something in the public SDK.</p>
|
javascript iphone
|
[3, 8]
|
5,958,709 | 5,958,710 |
Dropdown List will not populate
|
<p>I'm not sure how to correct the following problem. I have dropdown list that has a object data source. Then in the code there is a method like this </p>
<pre><code>void InitPageData()
{
MembershipUser user = Membership.GetUser();
DataSetTableAdapters.MemberInfoTableAdapter da = new DataSetTableAdapters.MemberInfoTableAdapter();
DataSet.MemberInfoDataTable dt = da.GetMember((Guid)user.ProviderUserKey);
if (dt.Rows.Count == 1)
{
DataSet.MemberInfoRow mr = dt[0];
//rank.Text = mr.rank;
//position.Text = mr.position;
UserName.Text = user.UserName;
...
}
</code></pre>
<p>This method populates form fields on the page. What I'm trying to do is to have the rank dropdown list populated from the ods but use this method above to populate the selected item of the rank dropwon list with the line rank.Text = mr.rank. In this example the the line of code that throws the error is commented out otherwise it throws this: "'rank' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value".</p>
<p>I've chaned the code to rank.DataTextFiled = mr.rank and rank.DataValueField = mr.rankid.ToString() but this threw another error: "DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Star'." "Star" is the value of the mr.rank.</p>
<p>Here is what the dropdown list and the ods look like:</p>
<pre><code><asp:DropDownList runat="server" ID="rank" CssClass="txtfield" DataSourceID="ODCRanks"
DataTextField="Rank" DataValueField="ID" AppendDataBoundItems="True">
<asp:ListItem Text="--- Select a Rank ---" Value="-1" />
</code></pre>
<p></p>
<pre><code><asp:ObjectDataSource ID="ODCRanks" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetRanks"
TypeName="RanksTableAdapters.RankTableAdapter"></asp:ObjectDataSource>
</code></pre>
|
c# asp.net
|
[0, 9]
|
3,986,888 | 3,986,889 |
How can i call API periodically?
|
<p>I am working in android. I want to draw a comment window. in which I have a list View which shows comment retrieved from a API.</p>
<p>I want to call that API after 30 second again and again so i can show recent comments in my list view.</p>
<p>This is the code which is used to call my API.</p>
<pre><code> HttpClient hc = new DefaultHttpClient();
</code></pre>
<p>HttpGet get = new HttpGet("192.168.1.127/CC/comment");</p>
<p>HttpResponse rp = hc.execute(get);</p>
<p>if (rp.getStatusLine().getStatusCode() == HttpStatus.SC_OK)
{</p>
<pre><code> Then put values in some text boxes.
</code></pre>
<p>}</p>
<p>I want to call this above code again and again after 10 second. Please help me in writing code. Your may give a short example to solve this type of problem. I have very short time and dont have time to search on google so please help how can i call API and change UI periodically ?</p>
|
java android
|
[1, 4]
|
3,995,378 | 3,995,379 |
How to convert all() function to work crossbrowser
|
<p>I have below code. I want to convert this as cross browser compatible. As all() is IE only function i need to convert this. Please help me. </p>
<pre><code> for(j=1,oTblRows=tblSource.rows,tLen=oTblRows.length;j<tLen;j++){
o=oTblRows[j].all("center");
if(o && (o.innerText === selCenter.value)){
$(oTblRows[j]).show();
}
else{
$(oTblRows[j]).hide();
}
</code></pre>
<p>}</p>
|
javascript jquery
|
[3, 5]
|
884,597 | 884,598 |
JQuery method for IFrame functionality
|
<p>I have a aspx page (details page) that needs to be loaded in a modal window on a click of a button. I have buttons in the aspx page that calls server side functionality. So, this is similar to an IFrame way (except that it's now in a modal window)</p>
<p>Is there a JQuery way of doing this? It appears that the JQuery <code>load</code> loads only fragments of HTML</p>
|
asp.net javascript jquery
|
[9, 3, 5]
|
1,429,674 | 1,429,675 |
stream.CopyTo - file empty. asp.net
|
<p>I'm saving an uploaded image using this code:</p>
<pre><code>using (var fileStream = File.Create(savePath))
{
stream.CopyTo(fileStream);
}
</code></pre>
<p>When the image is saved to its destination folder, it's empty, 0 kb. What could possible be wrong here? I've checked the stream.Length before copying and its not empty.</p>
|
c# asp.net
|
[0, 9]
|
2,981,268 | 2,981,269 |
Treeview Expand/collapse not working?
|
<p>i have an asp treeview that expand/collapse work fine on local ...but it give me errors when i upload this on live site...</p>
<p>Errors are below</p>
<pre><code> WebForm_InitCallback is not defined
NetworkError: 404 Not Found ....WebResource.axd?d=gadbiR_oDm56cBQvDxSVvV9T1EihsEfUV2kQ8sK3P5QkJX-ZM7DhAvzOEz7psSfvIeyXpVrkX09ODUOtVSJvasrTp4M1&t=634621105430701734
</code></pre>
<p>Please Help me out..</p>
|
c# asp.net
|
[0, 9]
|
5,227,246 | 5,227,247 |
how to address list-items in the DOM
|
<p>I've this markup</p>
<pre><code><ul id="body">
<li class="item">1</li>
<li class="item">2</li>
<li class="item">3</li>
<li class="item">4</li>
</ul>
</code></pre>
<p>When an item is clicked, is there a way in jQuery to identify in the DOM, the previous and the next li so that I can use jQuery functions on those elements??</p>
<p>Say, if the person clicks on item 2, i want to hide item 1 and item 3.. similarly, if the user clicks on item 3, hide item 2 and item 4 (previous and next item in the list).</p>
|
javascript jquery
|
[3, 5]
|
1,800,044 | 1,800,045 |
How to Fix the width attribute in cross browser environment
|
<p>Please see the JS link here </p>
<p><a href="http://trac.openwebanalytics.com/browser/trunk/modules/base/js/includes/jquery/jquery.ui.selectmenu.js?rev=1436" rel="nofollow">http://trac.openwebanalytics.com/browser/trunk/modules/base/js/includes/jquery/jquery.ui.selectmenu.js?rev=1436</a></p>
<pre><code>(function($) {
$.widget("ui.selectmenu", {
getter: "value",
version: "1.8",
eventPrefix: "selectmenu",
options: {
transferClasses: true,
typeAhead: "sequential",
style: 'dropdown',
positionOptions: {
my: "left top",
at: "left bottom",
offset: null
},
width: null,
menuWidth: null,
handleWidth: 26,
maxHeight: null,
icons: null,
format: null,
bgImage: function() {},
wrapperElement: ""
},
</code></pre>
<p>This width attribute defined below is being browser specific .
For instance this width value is being browser specific , for example for Crome it is 97px , IE 8 it is 67px
So as a result it is not looking good inside IE .
Please tell me how can we fix it ??</p>
|
javascript jquery
|
[3, 5]
|
411,134 | 411,135 |
How to show Image Preview using javascript or jquery in Internet Explorer
|
<p>I'm not able to show the image preview in Internet Explorer.</p>
<p>I'm using FileReader() it working fine all the browsers but not in ie(version 9) and lower versions.</p>
<p>I need the alternative for FileReader to diplay the preview.</p>
<pre><code> $('#FileUpload').live('change', function () {
var result = checkFileType();
alert(result);
var fileList = this.files;
var file = fileList[0];
var r = new FileReader();
r.onload = function () {
var binimage1 = r.result;
// binimage1 = binimage.replace('data:image/jpeg;base64,', '');
//var imag = "<img " + "src='" + "data:image/jpg;base64," + binimage + "' style='width:100px'/>";
// var src = $('#prevImage').attr("src").replace("../../images/nologo.gif", image);
$('#prevImage').attr("src", binimage1);
// $("#partial1").html(imag);
};
r.readAsDataURL(file);
// r.readAsBinaryString(file);
//r.readAsDataURL(file);
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,765,569 | 3,765,570 |
How can I make a redirect page in JavaScript/jQuery?
|
<p>I want to redirect a user from one page to another using jQuery. How can I do that? </p>
|
javascript jquery
|
[3, 5]
|
3,967,524 | 3,967,525 |
With jQuery slideDown/slideUp on hover, how to wait until previous slide finishes?
|
<p>I have a drop-down menu where the drop-down slides open, then slides back closed. </p>
<pre><code>$('nav ul li').hover(
function () {
$(this).children('.subnav').slideDown(300);
},
function () {
$(this).children('.subnav').slideUp(300);
}
);
</code></pre>
<p>If someone hovers over one item, then another before the previous finishes sliding up, they overlap. How do I prevent this overlap and make the previous slide up before allowing the second to slide down?</p>
|
javascript jquery
|
[3, 5]
|
2,421,622 | 2,421,623 |
just displaying only one row[gridview] in the textboxes
|
<pre><code>protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
SqlConnection con = new SqlConnection(" Data Source=SYS022\\SQLEXPRESS;Initial Catalog=Bhagavan;Integrated Security=True");
con.Open();
SqlCommand cmd = new SqlCommand("select * from emp3", con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
txt_eid.Text = dr["eid"].ToString();
txt_ename.Text = dr["ename"].ToString();
txt_sal.Text = dr["esal"].ToString();
}
</code></pre>
<p>my application contains 3 texboxes and a gridview If i click the edit link in the gridview(3 COLOUMNS) the respected row show display in the 3 textBOXES.my code is working as if i click on edit button it is displaying the last record of the gridview in the textboxes..can someone say what is the problem( here i connected from DB to gridview) please say the bug the in this code . I know the other way to edit .. please help me .
markup code</p>
|
c# asp.net
|
[0, 9]
|
3,481,880 | 3,481,881 |
how to run multiple functions and then a callback
|
<p>Once again I am 'dabbling' in the dark art of javascript and jQuery without much of a clue as to what I'm actually doing. All I know is that I managed to get my code to function by cribbing bits of other code and modifying it a bit, and after a lot of cursing, it worked.... in a fashion.</p>
<p>Below is a piece of my code, which correctly builds and displays a dynamic selectbox with values returned from a mysql query. When the user selects one of the items from the list, the code successfully runs a function which displays a map associated with that item.</p>
<p>What I ACTUALLY need it to do is also run the code to display the map for the default/top item returned by the query first, and THEN whenever a new item is selected it should run the function to display the newly selected map.</p>
<p>I hope the explanation has been clear enough, but feel free to chastise me if not.</p>
<p>Many thanks,</p>
<p>Rob.</p>
<pre><code> $(document).ready(function() {
$('#selecthere').load('/temp/php_script.php?r='+ random, function ()
{ //callback
$('select', this).change(function () { //catch onchange event of select
//call your function here, pass the selected value
initialize($(this).val());
});
});
});
</code></pre>
|
php javascript jquery
|
[2, 3, 5]
|
2,060,571 | 2,060,572 |
Assigned variable mysteriously becomes null
|
<p>I have class:</p>
<pre><code>public class Nomenklatura implements Serializable {
ArrayList<String> data = new ArrayList<String>();
ArrayList<String> data1 = new ArrayList<String>();
ArrayList<String> data2 = new ArrayList<String>(6);
}
</code></pre>
<p>And Activity: </p>
<pre><code>public class Smena extends Activity {
public Nomenklatura Asortiment;
ArrayList<String> data = new ArrayList<String>();
ArrayList<String> data1 = new ArrayList<String>();
ArrayList<String> data2 = new ArrayList<String>(6);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.smena);
Intent i= getIntent();
Asortiment = (Nomenklatura) i.getExtras().getSerializable("Nomenklatura");
ArrayList<String> data = Asortiment.data;
ArrayList<String> data1 = Asortiment.data1;
ArrayList<String> data2= Asortiment.data2;
}
}
</code></pre>
<p>In debugger, before <code>ArrayList<String> data =Asortiment.data;</code>I see data in Asortiment.data, but after this operation, <code>ArrayList<String> data</code> is empty. I can't understand why.</p>
|
java android
|
[1, 4]
|
1,839,476 | 1,839,477 |
Close Facebox inside iframe
|
<p>I am using this mod:</p>
<p><a href="http://lnx.shortcutto701.com/2010/05/21/using-iframe-with-facebox-jquery-plugin/" rel="nofollow">http://lnx.shortcutto701.com/2010/05/21/using-iframe-with-facebox-jquery-plugin/</a></p>
<p>My question is, how do I make a button which is inside the iframe to close the facebox. I have been trying varients of this:</p>
<pre><code><button style="height: 50px;" onclick="window.parent.$.trigger('close.facebox')"><span class="button"><span>Cancel</span></span></button>
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,010,413 | 3,010,414 |
Algorithm for 'Shift + Clicking' items in a collection to select them
|
<p>I am trying to mimic the file selecting from Windows Explorer in Javascript. I notice Windows Explorer has two types of "selecting". One is the normal selection which highlights the file and the other one is a dotted line which means that file is currently focussed on. So I am using "selected" and "focus" as css classes.</p>
<p><a href="http://www.enome.be/projects/rowselection.htm" rel="nofollow"><b>Here</b></a> you can find an example of my code working in a webpage. </p>
<p>In my code it just finds the rows between the focussed item and the current item and select those. </p>
<pre><code>select: function (e) {
if (e.ctrlKey) {
rs.removeFocus();
$(this).toggleClass("selected");
$(this).addClass("focus");
}
else if (e.shiftKey) {
var focusItem = $("#Items p.focus");
var currentItem = $(this);
var betweenItems = rs.betweenItems(currentItem, focusItem);
rs.unSelectAll();
rs.removefocus();
$(betweenItems).each(function () {
this.addClass("selected");
});
focusItem.addClass("selected");
$(this).addClass("focus");
$(this).addClass("selected");
}
else {
rs.unSelectAll();
rs.removeFocus();
$(this).addClass("selected");
$(this).addClass("focus");
}
}
</code></pre>
<p>This works "okay" but it's not exactly as advanced as the Windows Explorer selecting. In Windows Explorer they don't always select the rows between last focussed item and the current one. If there are no "gaps" in the selection they will add those items to the selection. But if there is a gap it will start from the focussed item. </p>
<p>I am not sure how I should do this. It seems the algorithm they use in Windows is a little to complex for me. So if anybody can help me or push me into the right direction I would appreciate it.</p>
|
javascript jquery
|
[3, 5]
|
4,818,973 | 4,818,974 |
Bit defines textbox visibility
|
<p>I don't know how to fix or handle this issue. But I currenlty have 2 links as following:
<code>NavigateUrl="~/Admin/ManageProducts.aspx?IsMeal=true</code> and False.</p>
<p>When it is set to TRUE I want txtDescription to be visible, and when set to FALSE I wan't txtDescription to be invisible.</p>
<p>IsMeal is a BIT in my database. So I need to define somehow that, when <code>ManageProducts.aspx?IsMeal=true</code> then txtDescription should be visible, and reverse </p>
<pre><code>FALSE = invisible
</code></pre>
<p>But how do I manage this?</p>
|
c# asp.net
|
[0, 9]
|
5,286,991 | 5,286,992 |
PrettyPhoto Opening on the same page
|
<p>I'm using a few jQuery plugins for a website I'm designing, Prettyphoto as well as ImageFlow, and I'm trying to get Prettyphoto to open imageflow. When I go to actually click on the link to the image gallery the content loads beneath the rest of the content on my site. If you navigate to gallery on this link and click one of the images</p>
<p>I am completely stuck on why this is happening, on my local machine it works fine so it could be that im not linking to the jQuery correctly, but I'm fairly sure I am. </p>
|
javascript jquery
|
[3, 5]
|
2,905,868 | 2,905,869 |
Configure asp.net Web Controls in external configuration file
|
<p>I've an asp.net web application accessed by different users with different roles.</p>
<p>Now I've to enable/disable and show/hide controls (label, textbox, buttons in grid, third party controls) based on a logic involves context variables and users role.</p>
<p>I want to avoid to write IF statements in <code>onLoad</code> method. </p>
<p>I tried to create an xml file like this:</p>
<pre><code><root>
<page name="page1" mode="insert">
<control id="txtName" property="Visible" value="True" />
</code></pre>
<p>then in a <code>basePage</code> class I tried to cycle all <code>Page.Controls</code> to set property with propertyInfo.</p>
<p>Problems starts when I have ascx inside ascx or gridview with command buttons to disable. </p>
<p>It is possible to configure those control's behaviors in an external configuration file?</p>
<p>Is there a framework allowing this? </p>
|
c# asp.net
|
[0, 9]
|
1,672,305 | 1,672,306 |
sort() function in IE
|
<p>So this code doesnt seem to work with IE, I have not found anything that says it shouldn't.
What am I doing wrong?</p>
<pre><code> <ul id="cars">
<li id="2">Ford</li>
<li id="1">Volvo</li>
<li id="3">Fiat</li>
</ul>
var list = $('#cars').children('li');
list.sort(function(a,b){
return parseInt(a.id) < parseInt(b.id);
});
$('#cars').append(list);
</code></pre>
<p></p>
|
javascript jquery
|
[3, 5]
|
151,763 | 151,764 |
How to start Youtube Player a few times?
|
<p>I have code for playing array of Youtube links:</p>
<pre><code>package com.nda.ut;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
public class UTPlayerActivity extends Activity {
/** Called when the activity is first created. */
private String[] mLinks;
private int mPosition=0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
NetworkUtilities utility=new NetworkUtilities();
if (utility.getUTLinks("")) {
mLinks=utility.getLinks();
if (mLinks!=null) {
loadPlayer();
}
else {
Toast.makeText(this, "List is empty", Toast.LENGTH_LONG).show();
}
}
else {
Toast.makeText(this, "Exception with getting of lists", Toast.LENGTH_LONG).show();
}
}
@Override
public void onActivityResult(int a, int b, Intent data) {
super.onActivityResult(a, b, data);
if (mPosition==mLinks.length-1) {
mPosition=0;
loadPlayer();
}
else {
++mPosition;
loadPlayer();
}
}
private void loadPlayer() {
Intent youtube=new Intent(Intent.ACTION_VIEW, Uri.parse(mLinks[mPosition]));
startActivityForResult(youtube, 100);
}
}
</code></pre>
<p>I need to start first activity for 1st video, then first activity will close and start second activity for 2nd video. But when I started Activity it would show me video and wouldn't close. How can I do it? My Android version is 2.2. </p>
|
java android
|
[1, 4]
|
794,264 | 794,265 |
Jquery child elements
|
<p>When I add event handler to a some elements using query:</p>
<pre><code>$('div').mouseover(function () {
});
</code></pre>
<p>Iinside function I have an element for which we add event function ($(this)).
how can I check inside this function next:</p>
<ol>
<li>Have this "DIV"($(this)) child elements
"DIV"? </li>
<li>Have this "DIV"($(this)) child
element "DIV" whith height more than
300?</li>
</ol>
|
javascript jquery
|
[3, 5]
|
3,001,142 | 3,001,143 |
Using Jquery to copy the values of multiple fields
|
<p>I'm trying to write a jquery funciton that will copy specified fields from the element above the current one into matching fields of the current element. Specifically I have a asp.net repeater that is spitting out tables with a few fields in it and I want a "Same as above" function. I'm still new to jquery though and I'm having some trouble with it. Here is some psudo code for what I'm currently trying to do feel free to propose a better method if you know it or simply fix this to work.</p>
<pre><code>function CopyPrevious(sender, rowId) {
var current = $(sender).closest('#wrappingDiv').find('.containingTable').eq(rowId);
var previous = $(sender).closest('#wrappingDiv').find('.containingTable').eq(rowId - 1);
$(current).find('.fieldA').val($(previous).find('.fieldA').val());
}
</code></pre>
<p>wrappingDiv is just a div I put around the table so I could find it with "closest" and each table has the class "containingTable". I put "fieldA", "fieldB", etc as class names on the fields so I could find them to get the values.</p>
<p>The issue I'm having is a javascript error on row 4 of the above: $current is not defined</p>
<p>EDIT: Updated the line 4 per the comments. It works now. Thank you.</p>
|
javascript jquery
|
[3, 5]
|
753,862 | 753,863 |
Not able to check if Tic-tac-toe a square is empty using jQuery
|
<p>I'm coding a Tic-tac-toe game but the code which I'm using to check whether the user is clicking on an empty square or an already filled one is not working for me. Please find my mistake.</p>
<pre><code>function startgame(){
var $board=$('#board');
$('div.square').remove();
for(var i=0;i<9;i++)
$board.append($('<div/>').addClass('square').addClass('empty'));
$('div.square.empty').click(function(){
$this=$(this);
if($('div.square.empty').length==0){
displayendmsg();
}
else {
$this.removeClass('empty');
if(currentplayer=="X")
$this.append($('<div><img src="cross.jpg"> </div>').addClass('cross').css('visibility','visible'));
else
$this.append($('<div><img src="circle.jpg"> </div>').addClass('circle').css('visibility','visible'));
flipturn();
}
});
};
</code></pre>
<p>Even when clicking on an already occupied square I enter the handler, and I don't know why.</p>
|
javascript jquery
|
[3, 5]
|
692,953 | 692,954 |
How to use my PHP function in JavaScript code
|
<p>I'm trying to use my PHP function in JavaScript like this:</p>
<p>PHP code:</p>
<pre><code>function checkevents($date){
$ev = new CalendarModelEventss();
$wh = "`event_date` = '".$date."'";
$all = $ev->getAllEvents('event_date', $wh);
if($all == $date){
//echo 'event is available'.$all;
return true;
} else {
return false;
//echo 'event is NOT available' .'--'. $all;
}
}
</code></pre>
<p>and JavaScript code:</p>
<pre><code>var yyyy = date.getLocalFullYear(true, this.dateType);
var mm = date.getLocalMonth(true,this.dateType);
var dd = iday;
var ddddd = yyyy+'/'+mm+'/'+dd;
if(<?php checkevents( ?>ddddd<?php ) ?>){
cell.className += " eventsss ";
}
</code></pre>
<p>but it doesn't work, and I have PHP error (<code>syntax error, unexpected ';', expecting ')' in ...</code>).</p>
|
php javascript
|
[2, 3]
|
3,668,072 | 3,668,073 |
Custom select option
|
<p>I have requirement to use custom dropdown menu.
I have searched a lot for a custom combobox implementation but I didn't find one that matches my requirements, namely:
I need up/down arrows on the side of the combobox. When the user clicks one of them, the value changes, but not list should be displayed.</p>
<p>The graphic design is similar to this one: <a href="http://jamielottering.github.com/DropKick/" rel="nofollow">http://jamielottering.github.com/DropKick/</a></p>
|
javascript jquery
|
[3, 5]
|
4,960,591 | 4,960,592 |
Cannot read parameters from Msxml2.XMLHTTP ajax call
|
<p>I cannot read parameter in PageHandler when using Msxml2.XMLHTTP ajax call.</p>
<pre><code>function InvokeHandler() {
InitXmlHttp();
xmlhttp.onreadystatechange = XMLHttpRequestCompleted;
xmlhttp.open("GET", "BookmarkletHandler.ashx?target=ww1", true);
xmlhttp.send();
}
</code></pre>
<p>I even tried:</p>
<pre><code>function InvokeHandler() {
InitXmlHttp();
xmlhttp.onreadystatechange = XMLHttpRequestCompleted;
xmlhttp.open("GET", "BookmarkletHandler.ashx", true);
xmlhttp.send("target=ww1");
}
function InvokeHandler() {
InitXmlHttp();
xmlhttp.onreadystatechange = XMLHttpRequestCompleted;
xmlhttp.open("POST", "BookmarkletHandler.ashx", true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
xmlhttp.send("target=ww1");
}
</code></pre>
<p>Here how i am trying to read in HTTPHandler:</p>
<pre><code>public void ProcessRequest(HttpContext context)
{
String param = context.Request.QueryString["target"]; --> this gives null
}
</code></pre>
<p>Can anyone help?</p>
<p>Thanks.</p>
|
c# asp.net
|
[0, 9]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.