I have this code that drags stuff around perfectly in IE - however in firefox the onmousedown-drag of the object does not immediately drag but shows the no-entry cursor and then after onmouseup the object drags around freely. The object does stop draging on the next onmouseup. The object should only drag in the onmousdown state, while th...
Is it possible to create the following behavior with one or more existing JQuery plugin(s)/widget(s)... or with some other web framework?
Rectangular divs with textual content are arranged in rows (left to right) based on their sort order, and then flow to the next line if needed (top to bottom).
...
Is there a way to disable the status bar in iPhone web apps? I'm working on something that requires a fixed, fullscreen view, and the status bar is rather annoying.
...
I know 'this' can be a problem when you don't understand Javascript well but this one got me a little puzzled.
var ControlTypes = {
TextBox: function () {
console.log(this);
this.Name = "TextBox";
console.log(this);
}
}
ControlTypes.TextBox();
Firebug gives the following result:
Object {}
Object { Nam...
Dear experts, I was trying to dynamically generate DOM elements using JS.
I read from Douglas Crockford's book that DOM is very very poorly structured.
Anyways, I would like to create a number of DIVISION elements and store the reference into an array so it could be accessed later.
Here's the code
for(i=0; i<3; i++) {
var div =...
I want to add a class to a list item when I hover over it, and then remove it and add it to a different list item if a different list item is hovered over.
Here's what I tried:
jQuery -
$(document).ready(function() {
$("#results").text("Tournaments");
$("#Tournaments").addClass("box-active");
$("#box ul li").h...
How do I access values set by $.data() inside a function or object
$('#timers').data('firsttimer', 100);
//prints 100
document.write($('#timers').data('firsttimer'));
function blah(){
//Prints nothing
document.write($('#timers').data('firsttimer'));
}
blah();
See this jsfiddle for easy access...
Use JS,I can check a flash object in a webpage when mouse over it, but how to check a flv or mp4 object when mouse over or out ?
check flash:if(event.target.tagName == "EMBED"),but check flv or mp4 , which tagName I can use ? Thank you very much!
...
I have an issue with rails Autocompletion from some code that i've inherited from an old Rails 1.2.3 project that I'm porting to Rails 2.3.5. The issue revolves around javascript execution within the auto_complete helper :after_update_element.
The scenario is: A user is presented with a popup form with a number of fields. In the fi...
I'm exploring my options for modifying urls in the browser bar for bookmarking purposes.
Ideally, I'd like to add querystring parameters and cannot determine if this is even possible. I don't want the page to refresh and want to add querystring values on link clicks, ajax calls, etc.
If I can't add querystring parameters, then I'd lik...
I have created some code to popup a confirm dialog if a user tries to leave a page without saving their changes. However, I don't want the confirmation dialog to popup if the user has clicked the "Save" button.
I have some code at the top of my file which looks like this:
var confirmClose = false;
window.onbeforeunload = function(evt)...
I'm trying to find out if an IPhone application. after installed, can email or text the IPhones number to a designated email or sms message location. And or convert a received email message to a text message and send it. Automaticaly.
...
I've written a fairly simple script that will take elements (in this case, <p> elements are the main concern) and type their contents out like a typewriter, one by one.
The problem is that as it types, when it reaches the edge of the container mid-word, it reflows the text and jumps to the next line (like word wrap in any text editor)...
TLDR I have a function that runs on the end of a pan in an openlayers map. Don't want it to fire continously.
I have a function that runs on the end of panning a map.
I want it so that it will not fire the function until say 3 secconds after the pan has finished. Although I don't want to queue up the function to fire 10 or so times li...
Duplicate: http://stackoverflow.com/questions/2891476/converting-html-tag-object-to-json-object
Hi,
Is there is any Javascript API that converts complex Javascript Objects To JSON String???
...
Hi guys:
I get two frames, says A and B. Clicking a link in A will trigger page in B changing from URL_A to URL_B.
How do I remember URL_A, so that when users click cacnel button in URL_B, they can go back to URL_A?
how do I get mainFrame's URL in fraTopMenu?
<frameset rows="60,*" cols="*" frameborder="no" border="0" framespacing="0...
when i call uploadifySettings("scriptData", { 'description': description });
it mean that param description is set one time after click button upload, how can i set param description on each file that uploads ? for example i want to upload 10 files so i can change param description 10 times
...
Hi,
for example:
#!/usr/bin/python
print "This is python."
print "<script type="text/javascript">
var pass_to_python = new Number(7)
</script>"
the_number = pass_to_python???
How do i get the pass_to_python in python?
Thanks.
...
Hi All,
In my web page there is a textbox with width and height equal to 0. This textbox is used to get the scanned bar code value which should not be visible to the user.
Needs:
I want to set focus to the textbox, when i click anywhere in the form.
I want to make the cursor invisible.
Geetha.
...
I am working on ASP.NET3.5 platform.
I have used a file upload control and a asp button to upload a file.
Whenever i try to upload a file which contain special characterlike (file#&%.txt) it show
crash and give the messeage
--------------------------------------------------------------------------------
Server Error in 'myapplication'...