I have a big html page, like 4000x6000 px with images and text.
I'd like to have something like a map overview of this page in a small div. A scaled version of the whole page which i could use to navigate.
Does anyone know some js script or example how to do that? Thanks.
...
Hello all,
I am trying to alert something when ever a drop down box changes and when ever something is typed into an input. I don't think I can use change for input fields? What would you use for input fields? Also, what about input fields of type file? Same thing. Here is what I have so far and its not working:
$('input#wrapper, s...
Hi i've got a problem evaluating json. My goal is to insert json member value to a function variable, take a look at this
function func_load_session(svar){
var id = '';
$.getJSON('data/session.php?load='+svar, function(json){
eval('id = json.'+svar);
});
return id;
}
this code i load session from php file that i've store befor...
Is there any way to find which input character fails the regex pattern.
For ex: consider [A-Za-z\s.&] is only allowable but the user enter like "test/string" where '/' invalidates input. How to find who fails regex (our case '/')
...
I have a page where a javascript will be triggered when the user closes the browser tabs / browser window. Language is in c# thanks.
im using window.onbeforeunload, something along the line like this:
<script type="text/javascript">
window.onbeforeunload = myFunction;
function myFunction()
{
//call my function here
}
the ...
Hi all,
I'm building a quiz and user has 5 seconds to respond to the qeustion if he doesn't resond within the time the answer is 3(wich is a code for no answer). Timer updates just fine until you answer a qeustion from that point the timer runs out of control you see 5,3,4,0 and go to the next qeustion with the answer 3 does anyone know...
I have a ff extension which creates a popup and shows dynamic data in it. basically when the popup opens a js function is run which then constructs the popup list by appending the items like this
var myMenuPopup = document.getElementById("file-popup4");
newItem = document.createElement("menuitem");
newItem.setAttribute("label", namelist...
Hi,
Im currently building a new discount-webpage and Im looking for a solution to be able to hover over a discount button to reveal a small text without clicking. And after clicking on the button that the text in the flash button is copied into the clipboard and a new page open with a small frame from my window with the new page undern...
I want to use the append() function from inside the <head>, in a function to be specific, like so:
function custom_img(src_img)
{
$("div").append("<img src='"+src_img+"'>");
}
var myimg = new custom_img("test.jpg");
This is a quick example that I just wrote out. I want my function to make a new image like that every time I create a n...
Hi,
I am trying to intercept links clicked on a page including those inside an iframe. This is the code that I have but it is not working. Any ideas what I need to do?
$("#container").delegate('a', 'click', function(e){
//do stuff
}
Container is the id of the div just inside the iframe.
Thanks in advance for any advice
...
I am trying to understand the purpose of addListener in node.js. Can someone explain please? Thanks! A simple example would be:
var tcp = require('tcp');
var server = tcp.createServer(function (socket) {
socket.setEncoding("utf8");
socket.addListener("connect", function () {
socket.write("hello\r\n");
});
socket.addListener(...
I'm using a fairly simple system to load javascript dynamically:
include = function (url) {
var e = document.createElement("script");
e.src = url;
e.type="text/javascript";
document.getElementsByTagName("head")[0].appendChild(e);
};
Let's say I have a file test.js which has the following contents:
var foo = 4;
Now, in my or...
I was wondering if it is possible to set background-color with help of mouse coordinates.
What i have is:
I have a DIV-A which is draggable and some other divs which are droppable.
What i need is :
I need to highlight other divs on my page which are droppable, whenever my DIV-A passes over them. What i have is mouse coordinates, is i...
I need a way to turn my 2 character string dates (i.e. '04/10/2010' & '05/24/2010') into an integers to see if one is greater than the other. If the user enters an end date that is less than the begin date I need to popup an "invalid date range" error.
...
Hello guys,
I'm creating a website for iPhone and i use the native app (cliqcliq Quickpick) to upload photos. I use the script like the following to check if the application is installed. The basic idea is to send user to a custom url, if application is there it is launched, if it is not there the url should be ignored and user is take...
Currently all JavaScript files are served from our static/media directory in the top level project directory. When running makemassages -d djangojs it will generate the locale directory in the top level too.
However, javascript_catalog will only consider locale directories created in apps, i.e. listed in the INSTALLED_APPS setting.
Wha...
I am using this script to display an image as popup on mouseover. The difficulty I am facing is that it is not positioning well in different monitor. It must be something to do with resolution.
function LargeImage(obj, e)
{
var imgbtn=document.getElementById('<%=imgbtn1.ClientID%>');
imgbtn.src=obj;//source of the image
document...
I am trying to write a report-generator to collect user-comments from a list of external HTML files. User-comments are wrapped in < span> elements.
Can this be done using JavaScript?
Here's my attempt:
function generateCommentReport()
{
var files = document.querySelectorAll('td a'); //Files to scan are links in an HTML table
v...
I am using localgetstorage and setstorage to load a list of links and show them as in a slideshow. The problem is that when I preview it on my PC it works, as soon as I try to use the page in my server online it won't work. Have I done something wrong?
Here's a link:
http://hem.bredband.net/noor/bildspelet/bildspelet.html
It is very b...
I need to imitate Google Tasks look and feel with a few minor changes.
Is there an open-source JavaScript control that I may reuse?
The main feature that I look for is "plain-text-like" feel of the in-place task editing process.
...