SetTimeout Erratic - Some Times It Show 20 Mins Has Passed When Only 6 Has In Reallity?

Aug 22, 2009

The JavaScript below behaves erratically - sometimes the timing is perfect, at other times it show 20 mins has passed when only 6 has in reallity - quite some gain - I'm baffled!

Public Function SessionTime(ByVal DivName As Panel) As String
Dim vTime As String = "var sessionTimeout = 19; " & vbCr
vTime += "function ReadCookie(cookieName) " & vbCr[code]....

View 3 Replies


ADVERTISEMENT

JQuery :: TimePicker - Prevent User Form Selecting Passed Times?

Aug 10, 2011

I am looking for a TimePicker that will prevent users form selecting times that have already passed, is this possible?

View 4 Replies View Related

SetTimeout() Updates Over 100 Times A Second But Set Its Delay To 1 Minute?

Jun 2, 2011

I am writing this Javascript function that runs every 1 minute using the setTimeout() function. asically it is ment to run every 1 minute and post a user id and a unique key to a PHP script and then the PHP script updates the database. This is the code:online.phpPHP Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

[code]....

View 6 Replies View Related

Show Div Based On Passed Form Variable?

May 6, 2009

I'm trying to make a form that passes a value to a second page that shows either DivA or DivB (using CSS display:none) depending on the value passed.

View 1 Replies View Related

Why Does Alert Show 3 Times?

Oct 9, 2009

When you click on the "Printer Friendly Order Summary" button, an alert for the req'd fields popups up THREE times and I don't know why.... it's also popping up EVEN when all req'd fields have been filled out, and then it proceeds to the next page as it should. This used to work, I have no idea what happened! http:[url]....

View 3 Replies View Related

Download A File Automatically In Every 3 Mins?

Dec 4, 2009

I want javascript to download a file automatically in every 3 mins and save it to my server.

Is it possible. What will be the javascript code?

View 1 Replies View Related

Make Slide Show Stop After Running So Many Times?

Mar 3, 2009

I followed the tutorial on this site how to create a slide show. The slide show works great. What I am wondering is there anyway to make the slide show stop after running so many times?

View 9 Replies View Related

Working But Erratic And Messy?

Feb 4, 2011

I have sort of got it working....... The javascript seems to be very erratic though. Sometimes it just won't bother executing it's commands!! For example, I've asked it to reload the page after it has completed it's job. And also to output the result so I can see what's happening. Sometimes, even though it does the database part, it doesn't bother to let me know or to reload the page!Also, sometimes, it will let me know it's done it's job, and then it will reload the page, but then I will find it hasn't actually done anything in the database! I can't understand why a script can appear to have a mind of its own!!

The other thing I'm bothered about is the messy look of my script. Because I have 3 forms, one to add a category, one to remove a category, and one to rename a category, I have had to duplicate the javascript function 3 times, giving each one a unique name to be called by the relevant form.Here's the full script.

Code:
<script type="text/javascript">
function remove_category()
{[code].....

View 2 Replies View Related

Erratic Behaviour OnMouseDown?

Sep 6, 2010

I have 9 boxes which I can drag around an invisible grid however when the onMouseDown function is called for the first time on each of the boxes, they behave erratically, then once all boxes have been clicked once, the entire script works as it should. I've tried using default values when declaring the variables however it doesn't seem to do anything.

<html>
<head>
<script language="javascript">[code].....

View 6 Replies View Related

JQuery :: Menu SlideUp Is Very Erratic?

May 11, 2009

I've inherited some unfinished code for a menu system (previous developer left the company before he could finish it). The menu worked fine until the client wanted some nested lists, which is when the height was being set incorrectly. I had a fiddle and I can get the height to report correctly, but it's extremely erratic as to when it will actually drop down. I've stripped the code out into a file on its own, complete with a lovely colour scheme. the code I added can be streamlined somehow. I'm only just getting to grips with JavaScript & jQuery. Test version:[URL]..

View 3 Replies View Related

MooTools Scroller - Ticker Scrolls Horizontally At Times - Vertically At Times

Feb 11, 2009

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

Is it just extraneous code possibly? It seems to be ok (from right to left) in Firefox 3 but using IE and Opera, it scrolls from btm to top and I cannot figure out why.

View 1 Replies View Related

User Clicks On Image - Show "X" Multiple Times

Feb 6, 2010

I found this code sample that when a user clicks somewhere on the image, then an "X" will appear. I would like to have the "X"s remain visible even when the user clicks on a different area of the image. As you can imagine, a user clicks clicks clicks then there are "X"s everywhere. How do I do this? Do I need to create more "div" tags with the mouse click locations?

[Code]...

View 3 Replies View Related

How To Convert Display To Mins:secs Instead Of Secs In A Timer?

Mar 4, 2006

I have this javascript timer which counts down the number of
secs that i put in and then then redirects my page, what i want to know
is how to i modify the code so that i can input the number of seconds
and this creates a DISPLAY of the form MM:SS (minutes:seconds)? Which i
feel is more aesthetically pleasing to the intended users of the site. Code:

View 2 Replies View Related

SetTimeout Inside A SetTimeout?

Jul 12, 2010

I have the following function that's supposed to say "Please make a guess" 20 seconds after an initial confirmation is displayed. However, it's immediately displayed as soon as someone hits "Cancel". If I change it's time to 40000 (20 seconds after the initial function is called), it does do it 40 seconds total, so it kind of does what I want. So it seems that the second setTimeout is initiated from the time the script is called generally, but I'm looking for a way specifically to have the 20 seconds start only after the "cancel" button is hit.

[code]...

View 1 Replies View Related

References Themselves Are Passed By Value

Jul 23, 2005

Is it true that Javascript has no clone() method, to pass an object by copy of value instead of reference?

If I have an object and want to make an array out of all of its instance variables, I can loop through it and pass its values to a new array, and the class instances will be passed by copy and not by reference?

Example 9.3: References Themselves Are Passed by Value

// This is another version of the add_to_totals() function. It doesn't
// work, through, because instead of changing the array itself, it
tries to
// change the reference to the array.
function add_to_totals2(totals, x)
{
newtotals = new Array(3);
newtotals[0] = totals[0] + x;
newtotals[1] = totals[1] + x;
newtotals[2] = totals[2] + x;
totals = newtotals; // this line has no effect outside of the
function.
}

Note that this rule applies not only to pass-by-reference, but also copy-by-reference. You can modify an object through a copy of a reference, but changing the copied reference itself does not affect the object nor the original reference to the object. This is a more intuitive and less confusing case, so we don't illustrate it with an example.

View 5 Replies View Related

To Remove + And & When Value Is Passed

Sep 28, 2005

I had made a form in which dynamic rows are added to a table. Now when i send there values to next page by GETmethod then in between alphabets where space is given + is shown and where new line is there & is shown.

View 9 Replies View Related

JQuery :: Getting A Value Passed In A URL?

May 31, 2011

Here's the deal: I have a JQuery page in which I'm using AJAX to call a classic ASP back-end. For example purposes, let's call the page "JQuery.asp", and we'll call the back-end "BackEnd.asp".My BackEnd.asp is set up as reusable code, using JQuery.asp as my wrapper.BackEnd.asp includes the following line:

GetID = request("GetID")
So, my JQuery.asp would look like this:
$(document).ready( function () {

[code]....

View 4 Replies View Related

Variables Passed In The URL

Oct 5, 2006

I have used PHP to send a variable in the url and I then need to use Javascript to send it on again. How would I pick up the variable? It is passeed as var=x. I am fairly sure I know how to pass it on I jsut need to get this value into a variable.

View 4 Replies View Related

Passed Variables In <SELECT>

Jul 20, 2005

I have a problem with the following code. It generates a
<FORM><SELECT><OPTION> list. There is no problem in the generating. The
problem is in the execution as follows.

It works fine in Mac IE with and without the <FORM></FORM>.

In Mac Netscape 6 the onChange does not activate if there is no
<FORM></FORM>. When I put it in a form as indicated below the value of
train.options.value is undefined. What am I doing wrong?

As I said there is no problem in IE and mayby other browsers. It may be
just a Mac Netscape 6 problem. Code:

View 3 Replies View Related

JQuery :: Grab Value Passed In From URL?

Apr 26, 2011

I'm trying to grab a value passed in from a URL, i.e:
test.html?foo=bar
And I would like to grab the "foo" entry, with the value passed in. I'm guessing this can be done, but I can't find a way?

View 3 Replies View Related

Nothing Is Being Passed Into The Function When It's Being Called?

Jul 31, 2011

I've come across functions like the one below in many scripts.I just don't understand the purpose of the parameter! Nothing is being passed into the function when it's being called- so what's the point of specifying an argument???

function doSomething(e) {
if (!e) var e = window.event;
alert(e.type);[code].....

View 8 Replies View Related

Duplicate Variables Being Passed To GET

Nov 8, 2010

The problem I am having is when the following script is executed within my page and the user submits the form, the variables passed to the GET array are duplicated only for the inputs created by my script. I have other inputs in the form that are created within the HTML of the page that work fine (i.e. they only try to pass their value once) but I cannot get my script to work properly.

Here is my script:

Here is an example of what the url looks like after the form containing this script has been submitted:

The input (segments) created in my page only submits itself once, while anything created by the script (segment_type_1, segment_type_2, etc.) submits itself twice with the second, blank value overriding the first, correct value.

View 3 Replies View Related

ID Not Being Passed To Function Undefined

Jul 9, 2009

I am making a drop down menu in javascript using a function in an external js file. Problem is in FF error console it keeps coming up that my ID that's being called in getElementByID in the function is not defined. Please help if you can, why is saying my ID is undefined??

View 2 Replies View Related

Cant Use Passed Variables In Function

Oct 11, 2010

I'm trying to reuse a script I have but, I'm not able to due to the fact I can't use some variables in a function.

I would like to know why I am not able to use passed variables in javascript.

For example: I call a function submit_data( 'newDomainForm', 'add_domain', 'list_div' ), in the function itself I would like to use the form name (first variable passed) as document.form.domain_name.value.

Later on I would like to use the div id: list_div in document.getElementById( div_id ).innerHTML. This doesn't work.

I have to put the name of the actual div like this: document.getElementById( 'result' ).innerHTML

And to get the value of a form element I have to put the actual name like this:

HTML Code:

View 9 Replies View Related

Arguments Passed By Window.setInterval

Jan 6, 2007

I'm calling `setInterval(myfunc, 100);`.
That function receives one parameter which seems to be -3, 0, 3, 6 or 9.
This isn't a problem, but I'm wondering what it is. Does someone know?

Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.1) Gecko/20061204
Firefox/2.0.0.1

View 2 Replies View Related

JQuery :: Getting The Class/id Passed Into A Plugin

Jun 24, 2009

If I have a plugin thats being called...

$('.myClass').somePlugin();

How do I pull out the ".myClass" part inside the plugin?

jQuery.fn.somePlugin = function(o) {
// Defaults
var o = jQuery.extend( {
option1 : 'something',

[Code]....

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved