In javascript, is there any different between these two:
// call MyFunction normal way
MyFunction();
// call MyFunction with setTimeout to 0 //
window.setTimeout('MyFunction()', 0);
The reason I asked was because recently came across the situation where the code only works if i use setTimeout(0) to call the function.
To my underst...
Greetings,
I am trying to run an SQL Script uploaded using Application Express (APEX), the web based interface for Oracle DBMS.
However, upon clicking the Run button, it does nothing, suspecting any javascript error, I pulled out firebug and there appears to be an error on the js.
this.endLine.isPreceding is not a function
http://loca...
I'm just learning JS, trying to do things without jQuery, and I want to make something similar to this however I want to use an array of images instead of just the one.
My image array is formed like this
var image_array = new Array()
image_array[0] = "image1.jpg"
image_array[1] = "image2.jpg"
And the canvas element is written like t...
Most people talk about progressive enhancement right now as serving browsers with javascript (enhanced version), and browsers without javascript (simple version).
But there is such a big difference in javascript performance between browsers that it may be useful to apply that term to support for choosing between javascript based feature...
I am using slider module for sliding the content page.
I want change the "next" and "previous" button.
When the slider page is loaded, I want to hide the "previous" button.
When I click the "next" button, the "previous" button should display, and when I go to the last slide, the "next" button should hide.
How can i do this?
I am using ...
I am looking for a way to do Horizontal text scrolling that only scrolls ONLY WHEN the text length is longer than the container DIV. Any suggestion how to do that?
...
Looks like you can't call setInterval() from the onMouseDown event handler. I tried, didn't work.
By John Resig's explanation, this makes sense:
http://ejohn.org/blog/how-javascript-timers-work/
So is there any way to measure the difference between the mouse button gets depressed and when it gets released?
...
I have had not trouble passing primitive values from Javascript to Silverlight through the HTML bridge, but I keep getting stuck when trying to pass a Dictionary. Furthermore, I can't find a single sample of this working anywhere online, though the MSDN documentation says it should just happen automatically. Instead, I get an error tha...
function getSelectedRadio(seeker_provider) {
var sign;
for (var i=0; i<seeker_provider.length; i++) {
if (seeker_provider[i].checked)
{
sign=i;
}
}
if(sign==0)
{
alert(sign);
window.location='updatcty.php';
}
if(sign==1)
{
alert(sign);
window.location='../registration_provider.php?proid=2...
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
NurseCounter nc;
protected void Page_Loa...
Is it possible to hide the mouse cursor in a web browser?
I've done this in Flash for a touch screen application, where a mouse cursor is distracting and unneeded. This time it's for a display screen that is non-interactive, so a mouse cursor is not needed.
My gut feeling is there's no easy way to achieve this in the web browser, only ...
Is there something like "die" in JavaScript? I've tried with "break", but doesn't work :)
...
IE seems to add automatically a "selected" attribute on the option tag.
But then if you cloneNode it, things get weird.
If you open a page in IE8 with the code below:
<html>
<body>
<form><select><option>o1</option></select></form>
<script>
// without clone node
var elm = document.getElementsByTagName('form')[0];
...
Current state:
I have a lot of additional buttons in my editor-implementation. I already do need two rows of buttons. The linebreak is made automatically and is dependant of the width of the surrounding div. In my case this div can change its size. Now everytime this happens, the buttons are realigned and some buttons move up in the firs...
We're using jQuery UI Tabs at the top of the page (with no themes, using our own styles in the screen.css file) and using jQuery UI Datepicker later on down the page.
We want to use a jQuery Theme for the Datepicker, but we want to use our own styles for the Tabs. But as soon as we include the Themes, it (obviously) styles both complete...
Hi,
Is metaprogramming possible in javascript??
During my routine work, i happened to write the chained javascript function which is something like LINQ expression to query the JSON result.
var Result = from(obj1).as("x").where("x.id=5").groupby("x.status").having(count("x.status") > 5).select("x.status");
It works perfectly and giv...
I have a asp image control. ImageUrl="images/avator.jpg". I'm changing this picture on the server and then setting imageUrl same as previous url on the client. but image don't changed. When i click refresh button, image changed.
How to change cached image won't changing url?
...
Hi,
I have used Javascript onlaod like this:
function check()
{
var pic = new Image();
pic.src= "images/first.jpg";
pic.onload = function()
{
alert("Uploaded");
}
}
This is html code where the function is called.
<input type="button" onclick="check()" value="Check" />
It works for both safari and firefox. Bu...
I have scripts in my aspx page, in header section.
I want to debug it(with breakpoints) in firefox.
...
I am using this code to sum values from multiple radio buttons :
$(document).ready(function(){
var total = 50000;
$("input[type=radio]").change(function(){
$("input[type=radio]:checked").each(function(){
if (isNaN($(this).val())) {
total = total;
}
else
...