I am using jQuery.autocomplete(1.02) on my search box and I want exact string and substring matching. I don't care (yet!) about the database load, I'm happy for it to fire off a query every keystroke and bypass the caching entirely - I just don't want anything missed.
To this end I have tried setting cacheLength=1, the minimum permitted...
Datagrid displays in new window with the javascript function callprint but losers all css formatting. Is there a way to fix this?
...
I've got a bunch of variables being pulled from form ID's before being sent in a query string to a PHP. However, as one input is a checkbox I'm trying to get AJAX to set the variables value according to whether it's checked or not. i.e..
if (document.getElementById('bold').checked) { var bold = "true";
}
else { var bold = "false"; }...
Hi, i'm trying to get this function to work, which does a request for parameter 'url' then sends the responseText to 'callback' which is a function. But it seems that it only gets to readyState 1 (thanks to the firebug commands).
Here it is:
function Request(url, callback){
if (window.XMLHttpRequest) { // Mozilla, Safari, ...
httpR...
I'm trying to detect when an iframe and its content have loaded but not having much luck. My application takes some input in text fields in the parent window and updates the iframe to provide a 'live preview'
I started with the following code (YUI) to detect when the iframe load event occurs.
$E.on('preview-pane', 'load', function(){
...
Learning javascript when I came across the concept of prototype. I succeeded in adding new methods to the cat class but failed in overriding the original talk method.
function cat(name) {
this.name = name;
this.talk = function() {
alert( this.name + " : I'm a girl!" )
}
}
cat.prototype.talk = function() {
alert( th...
I have some javacsript code looking something like below. Notice how it makes a ajax call to "/ContollerName/ActionName" with some parameters. This works fine as long as the application is deployed on a site root in IIS. But if I deploy it on a virtual directory the path will point all the way back to the site root and it will fail.
$.g...
I wish to call a method in my code behind from JavaScript, I sort of know how to do it.. I must call __DoPostBack passing name of control and parameters..
But what if an event doesn't exist i.e. NO CONTROL. Really what i am trying to do is call an event.. but the event doesn't exist as there is no control associated with it..
I sort of...
If I include a JavaScript file in my HTML page, do the variables declared in my JavaScript file also have scope in my <script /> tags in my HTML page? For example, in my included JS file, I declare a variable:
var myVar = "test";
Then inside my HTML page, what will this produce (if it's after my include script tag)?
alert(myVar);
...
We started using Google Maps on our web application rather extensively. It worked fine at the beginning, but as we add more markers we find that the performance are not quite there. Although I'm quite sure we don't use it in the most efficient way.
I am looking for information about Google Maps best practices and tips'n tricks. Any sugg...
I decided to try to create a plugin that calls forth a couple of javascript files and a css file using the Wordpress Plugin Generator.
It is working somewhat - it's calling one of the javascript files but not the other two.
I am using the wp_enqueue_script function, but probably wrong.
Any help would be greatly appreciated!
<?php
/*
P...
Hi,
I want to launch new window, return back result to textbox on the parent page. I have control over both pages obviously so I can add any javascript etc. that might be required.
how can I do this?
...
Is there a way in AJAX or JS to add further inputs upon a button click?
...
Hi there,
Can anyone can confirm the best idea for storing jquery code, initially i was inserting everything in the HEAD of a document but i am seeing more and more code being used across pages,
Is the best way to use include files .. with the extension .JS?
Anything else or better with respect to this?
What would be the best place...
Help, if you can-
The situation:
http://foobar.com includes a remotely hosted javacript file (http://boobar.com/stuff.js).
The goal is to just get an alert from the remotely hosted php script on foobar.com
I have tried the following code in stuff.js:
$.ajax({
type: "GET",
url: "http://www.boobar.com/script.php?callback=?",
dat...
Can someone explain the usage of the dollar sign here..
var updateProgressDiv = $get('updateProgressDiv');
scroll down to the functions..
http://mattberseth.com/blog/2007/05/ajaxnet_example_using_an_updat.html
...
Is $('*').index(currentElement) will give a unique number?i am asking because i can't understand the index method good from the JQuery docs
...
I'm doing some simple web integration work which I'm accomplishing through use of an iframe. My main window has some javascript which interacts with my server to redirect the iframe to the required URL. One of the target pages sadly has the following piece of code inside:
if (top.location != location) {
top.location.href = documen...
I'm using VisualStudio 2008 for doing work in C# and JavaScript (AJAXy stuff).
Here's my issue -- I love Eclipse and especially the code formatted (Ctrl-Shift-F).
Visual Studio's Ctrl-k, Ctrl-d, really sucks in comparison, especially for javascript.
Is there a way to get VS to behave like the IDE that I miss?
TIA,
g
...
Here is my scenario. I am going to have a page with the treeview displayed. A user can add and delete nodes: when the user clicks on the node, a pop up will come up with a form, where a user will enter data, this data then gets saved into the database, and the pop-up script comes back with the id (from the database). This id needs to get...