I want to make auto partial page refresh in asp.net. There is UpdatePanel but it sends too much data. So I've found that I can make a webservice and call it by the JavaScript code. But I don't know how to call webservice automatic. There are many examples showing how to call webservice by the button click event:
http://www.asp.net/ajax/...
I want to push all individual elements of a source array onto a target array,
tartget.push(source);
puts just source's reference on the target list.
In stead I want to do:
for (i=0;i<source.length;i++) {
target.push(source[i]);
}
Is there a way in javascript to do this more elegant, without explicitly coding a repetition loop?...
Hi,
I am trying to get my JavaScript working in IE7 which works smoothly in all other browsers.
document.write('<li><a class="bookmarklet" href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');open(\'<?php echo createURL('bookmarks', $GLOBALS['user']); ?>?act...
I developed article rotator where 5 articles with images rotate automatically and user can focus one (and stop rotating) by mouseover. Click will open the article.
The article rotator is here: http://antizena.df.sk/ and it is just devel version.
How to name it? What is the best name for this feature?
...
Hi, i need to verify that an input file in an html form is an image, i've made the follow code inside the html page, but don't work...
script type="text/javascript" language="javascript"
function valida(f){
var campo = f.immagine.value;
//window.alert(campo);
var er = /^+.[\.]([jpg]|[gif]|[png])$/;
...
Hello,
I'm using php's json_encode() to convert an array to json which then echo's it and is read from a javascript ajax request.
The problem is the echo'd text has unicode characters which the javascript json parse() function doesn't convert to.
Example array value is "2\u00000\u00001\u00000\u0000-\u00001\u00000\u0000-\u00000\u00001...
Hi!
I'm currently in the planning stages for a real-time multiplayer game that would be built using Javscript at the frontend and PHP on the backend and I'm just wondering if anyone here knows of any good libraries for such a game?
Thanks,
DLiKS
...
Hi there,
I know that it is bad practice to write code like this:
var createBox = function(width, height, margin){
alert("Margin is set to " + margin);
//margin is undefined in this context or why?
var margin = margin || 2;
alert("Margin is now " + margin);
}
createBox(0,0,0);
But can someone please explain, why marg...
Hi,
I was wondering how to resize a div containing some text by setting a width and height so it would stretch to fill that area like an tag? E.g. when you set the width and height attribute of an image, it resizes the image to fill that area. I need to take an arbitrary width and height value and stretch a div containing text to those...
Hello,
We would like to do a replace in our string like this:
- Every time a \n (new line) or \t (tab) or \r (carriage return) appears, it should be replaced by the string "\n" or "\t" or "\r".
For example, this string:
"Hello, how
are you?
Fine thanks."
Should be replaced by:
"Hello, how\n\tare you?\nFine thanks."
Could you help ...
Before I rewrite an app I figured it's best to ask this question first.
With sqlite, is it possible to do a between statement like this?
select * from database where date between '2010-10-01' and '2010-10-31'
As a side question, how do I get the last date of a month in javascript using the above format?
...
Hi guys :)
Can I prevent the loss of selection in the "onblur" event ?
<!DOCTYPE html>
<html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en">
<head>
<meta http-equiv = "Content-Type" content = "text/html; charset=utf-8">
<script type = "text/javascript">
window.onload = function () {...
Ok lets say I have div with form elements inside of it. I want to be able to clone that div with a button click using jQuery and add a version 2 of the form, so ALL of the element IDs will increment by 1 in their name.
<div id="card">
<!-- PART 1 -->
<h1 class="card_build">Build your card options:</h1>
<select id="country...
Hey!
The following code:
jQuery(document).ready(function($) {
function getBooks() {
var query = "ajax.php?do=allbooks";
$.ajax({
dataType: "jsonp",
url: query,
jsonp: "callback",
success: showBooks
});
}
function showBooks(data)...
I'm looking to implement a build system that will run unit tests and JSLint on the Javascript, generate documentation and compress JavaScript and CSS into minified packages.
I might also add an integration step, which automatically uploads the code to a server on each build.
I feel overwhelmed by all the choices in build systems - some...
Hi!
As I understand there is no way I can get dynamic server time in IE with settimeout() in script.. I found this example:
function timeExam(){
$.ajax({
url : "inc/clock.php",
success : function (data) {
$("#clock_time").html(data);
}
});
var func = function()
{
timeExa...
I have three values that I want to pass via a link, but don't want them visible in the URL.
...
I know nothing about javascript, and not a whole lot about programming, but I wanted to create a page which checked the user's os, and if they are using a mobile OS (iphone, android, etc...), forward them to a mobile website, and if they are using a computer, forward them to the normal website. Here is the page I made:
<head>
<title>O...
hello.. i just want to ask if how to convert the number to String.. what i want to output is "000000" incremented per second "0000001".. i tried different methods but it will output to 1,2,3... i tried this but still won't work..
$(document).ready(function(){
xx();
var x = 0;
function xx()
{
x++;
if(x.length==5) {
...
Hello there, i have a JSP page that surprisingly stops rendering when its deployed to a server.But when i place javascript alert() at different positions on that page the page starts rendering as it should.Eventually , when i remove those alerts the page keeps on rendering.When i run that page on my eclipse as localhost it runs fine and ...