Simple (simply Irritating) Page Refresh Error In NN

May 22, 2002

I have a VERY simple script to reload a page with fresh values when the value of a scroll menu changes. Trouble is, of course, NN 4.- freaks and closes the browser when this runs. No error warning, no error log?

The line..

<select name="Country" size="1" onChange="repopmenu(this,17)">

The script..
<script language="JavaScript">
<!--
function repopmenu(which,key)
{
n = which.value;
var url = ("eventedit.asp?country=" + n + "&key=" + key)
location.href = url;
}
//-->
</script>

View 2 Replies


ADVERTISEMENT

Ajax Synchronous Request - Page Refresh And The Error

Dec 12, 2009

I have been using asynchronous requests for a long time. so the response was processed in a callback function. I thought of not using async so i made synchronous requests. The reason is that i dont have to have two more lines for checking the status and the onreadystatechange.... my synchronous requests would be like this...

[Code]....

so from the code you can understand that there is no need of a callback function and if conditions to check ready state... ... So there is no problem in the above code. The problem araises here... if i press the F5 (refresh) key or do a page refresh when the process is waiting for the response i get an (NS ERROR - firefox ( i have not yet checked that in IE browsers) (javascript error) though the process completes successfully. why?

Do we have to check whether the page is navigating away while in synchronous operation and abort the request? or what could be the reason for the error. This will not happen in async requests because that is also the reason for async...

View 3 Replies View Related

Auto Refresh The Page If 503 Apache Error Message Appear ?

Dec 18, 2009

Is there a code to auto refresh the page if 503 apache error message appear ?

View 3 Replies View Related

Auto-refresh The Page If 503 Apache Error Message Appear?

Dec 19, 2009

is there a code to auto refresh the page if 503 apache error message appear ?

View 8 Replies View Related

Mac / Firefox Bug - Flash / Tool Odd Bug - Logo Ball On Page Load Simply Doesn't Appear?

May 4, 2009

I have a very strange issue which happens only on the Mac/Firefox 2 (and 3 I believe) : [URL] The top left logo (ball) is a simple flash 'spin' animation, that is activated using javascript via the navigation (onmouseover effect). This works fine on Windows - Firefox, IE and Mac - Safari. However on Mac/Firefox, the logo ball on page load simply DOES NOT APPEAR. However, when you simply SCROLL down or if you move your mouse over the navigation (which calls the flash), then the logo appears. Basically, it's really odd because the logo ball is there, but Mac/Firefox does not show it until you do something to the page, like scroll.

View 1 Replies View Related

JQuery :: .ajax And Page Refresh In Firefox - Can't Send Form Data In FF Without Page Refresh

Apr 15, 2010

So my problem is that i can't send form data in FF without page refresh (though in IE7-8 everything works smoothly).

My code fragments:

View 1 Replies View Related

Simple Image Refresh

Jan 4, 2006

I need a very simple script that will refresh a single image every blank seconds. I have this one, but I am having trouble getting it to work: Code:

View 2 Replies View Related

When Try To Close Browser In IE On The Main Page - Get An Popup With An Error - An Error Has Occured On The Script On This Page

Apr 14, 2009

I'm having a problem on a particular site I am working on.

The URL is [url]

The problem is that when I try to close the browser in IE on the main page I get an popup with an error which says: "An error has occured on the script on this page"

Do you want to continue running scripts on this page?

"Yes" or "No" (Buttons to Click)

I have to click the 'Yes' button about thirty times before the browser will finally close. Does anyone have any idea what this is?

Here is the source code.

Code:

View 2 Replies View Related

Getting Nan Error With Simple Math

Mar 5, 2010

why I am getting Nan

<script type="text/javascript">
var num1;
var num2;
var num3;

[Code]....

View 3 Replies View Related

Simple Error Checking

Jan 27, 2006

Sorry this will be an ignorant question I know, but I'm just trying to implement some quick JS in my form to check if the fields were filled in:


function check_form() {

if (survey.form_firstname.value == "") {
firstname_error = "-Please enter your first name
";
}

if (survey.form_lastname.value == "") {
lastname_error = "-Please enter your last name
";
}

if (survey.form_phone.value == "") {
phone_error = "-Please enter your phone number
";
}

if (survey.form_email.value == "") {
email_error = "-Please enter your email
";
}

if (!survey.form_agree.checked) {
agree_error = "-You must be over 18 and provide accurate information
";
}

errors = firstname_error + lastname_error + phone_error + email_error + agree_error;

if(!errors) {
return true;
} else {
alert("There were errors:
" + errors);
delete firstname_error;
delete lastname_error;
delete phone_error;
delete email_error;
delete agree_error;
delete errors;
return false;
}
}

It only seems to work if no values are filled in, if one of the fields is filled in the error checking fails. Again, I'm extremely new to JS, i've only ever copy/pasted and this is the first time i've tried writing a piece.

View 2 Replies View Related

IE Runtime Error On Simple JS Code?

May 21, 2010

I'm getting a runtime error on the code in red. These functions are called by an onBlur by the way.

<script type="text/javascript">
//THIS GENERATES QUANTITY OF MATERIALS
function generate3()

[code]....

View 2 Replies View Related

Simple JSON Callback Error?

Mar 18, 2009

I'm trying to create a "Books I'm Reading" widget using the Readernaut API. I'm using JSON with a callback. This is a portion of what the JSON URL returns:

Code JavaScript:
parseResponse(
{
"version": "1.0", [code]...

View 1 Replies View Related

JQuery :: Refresh DIV With Full Page Refresh?

Aug 11, 2009

How to refresh DIV , without refresh entire page,Am having four DIV ,

DIV1,DIV2,DIV3,DIV4

I want to refresh only DIV! without affecting the DIV3,DIV4 ,

View 8 Replies View Related

Remove Element Simple Script Error?

Dec 27, 2009

I am new to Javascript. I copied this script from the web, but I get an error at this line:parent.removeChild(child);The error says "Invalid argument".

<div id="parent" align=center>
<form name=mainfrm method=post>
<script language="JavaScript">

[code]....

View 1 Replies View Related

Simple DHTML Not Working - Syntax Error

Jan 19, 2011

I know I have a simple syntax error. Trying to call a function which changes the style of a div element on mouseover. Heres my code.
Javascript
function countermarker1(){
var box1 = document.getElementById('countermarker1box').style.display
box1 = "block" }
Variable is used cause I will have to use it more often later in the script.

HTML
<div id="countermarker1">
<img src="countermarker.jpg" width="20" height="14"
onmouseover = "countermarker1()"; /></div>
CSS (know its not really relevant just to avoid questions about whether its right)
#countermarker1box {
height: auto;
width: 80px;
display: none;
}
JS and css is externally srced.

View 6 Replies View Related

Simple Calculation - Error On Function Call

Aug 15, 2011

I have written the following javascript code which makes a simple calculation and writes between the <span> tags using Inner HTML

My code is:
Code:
<html><head>
<script type="text/javascript">
function hesapla() {
kredimiktari = document.hesapla.miktar.value
kredivadesi = document.hesapla.vade.value;
faiz = document.hesapla.faiz.value;
ayliktaksit1 = (kredimiktari * faiz) / kredivadesi;
geriodeme1 = kredimiktari * faiz;
document.getElementById('ayliktaksit').innerHTML = "<strong>Taksit / Ay :</strong>" + ayliktaksit1;
document.getElementById('geriodeme').innerHTML = "<strong>Taksit / Ay :</strong>" + geriodeme1;}
</script></head><body>
<form name="hesapla">

<input type="text" name="miktar" value="Kredi Miktarı" onfocus = "if (this.value == 'Kredi Miktarı') this.value = '';" onblur = "if (this.value == '') this.value = 'Kredi Miktarı';" />
<input type="text" name="vade" value="Kredi Vadesi" onfocus = "if (this.value == 'Kredi Vadesi') this.value = '';" onblur = "if (this.value == '') this.value = 'Kredi Vadesi';" />

<input type="text" name="faiz" value="Faiz Oranı" onfocus = "if (this.value == 'Faiz Oranı') this.value = '';" onblur = "if (this.value == '') this.value = 'Faiz Oranı';" />
<div id="gosterim"><span id="ayliktaksit"></span><span id="geriodeme"></span></div>
<input type='button' value='Hesapla' onClick='hesapla()'><br><br>
<img src="images/dot2.png" width="180" height="2" alt="dot"/>
</form></body></html>

I am really confused as similar code on Tizag web site works fine.
Code:
<script type="text/javascript">
function changeText(){
document.getElementById('boldStuff').innerHTML = 'Fred Flinstone';
}</script>
<p>Welcome to the site <b id='boldStuff'>dude</b> </p>
<input type='button' onclick='changeText()' value='Change Text'/>

View 2 Replies View Related

Image Refresh On Error

Nov 14, 2006

I am building a preloader using the usual:

var img = new Image();
img.onload = done;
img.onerror = image_error;
img.src = 'image.gif'

Things seem to work fine except some times the loading will fail due to a problem such as network error or dropped connection or something. Then the browser will actually cache the image as failed and will not re-attempt to get it again from the server even though it would have probably succeeded on the second attempt.

I have done some testing and it seems that with Firefox I can go through the above procedure (img.src = ....) and it will attempt to get the image again. IE doesn't do that. It will immediately fire onerror again even though if it had attempted to load the image again it would have succeeded.

Any ideas how to get IE to drop the failed image from the cache and request it again from the server?

View 1 Replies View Related

JQuery :: Results.push Is Undefined - Getting Error When Trying To Simple Traversing

Mar 29, 2010

I'm getting this error when trying to simple traversing.

results.push.apply( results, checkSet ); jquery-1.4.2.js (line 2743)

I read that it might have something to do with arrays?

View 2 Replies View Related

Simple Error Handling For Form - Avoid Alert Boxes?

Jul 21, 2011

I was trying to create JavaScript error handling for a form, and I was trying to get an error message to show up underneath the field where there was an error. (I am trying to avoid alert boxes.) I only have two fields, and my problem is that only one field is showing an error message. If I place an error in the input for the second field, the error shows up under the first field. How can I get the error messages to show up under the correct form field?

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]">
<html xmlns="[URL]">
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>Carrots</title>
<style>
.qty {
width: 25px;
text-align: right;
}.blank {
display: none;
} .....

View 1 Replies View Related

JQuery :: Part Page Refresh - Load Page It Does Nothing Only Blank Page

Feb 1, 2011

[Code]...

when i load page it does nothing only blank page, may have code in wrong place but not sure so can someone show me a working example so i can find out what i'm doing wrong also i would like the part of page to refresh evey 120 seconds is this possibe with jquery?

View 7 Replies View Related

Cookie Reading - Create A Simple Checkout System That Utilizes Cookies To Pass Information From Page To Page

Nov 9, 2010

I'm trying to create a simple checkout system that utilizes cookies to pass information from page to page. Currently, my entire script works fine except for the read cookie portion. I cannot figure out what is wrong with it. It has been validated and the syntax is fine; it just doesn't work. I use the function with the onload call on my html file such as:

[Code]...

View 3 Replies View Related

When Should I Prefer StopPropagation To Simply Returning False?

Oct 8, 2006

On this page I'm given the impression that stopPropagation is a lot
like returning false:

http://www.brainjar.com/dhtml/events/default3.asp

"preventDefault() Can be used to cancel the event, if it is
cancelable. This prevents the browser from performing any default
action for the event, such as loading a URL when a hypertext link is
clicked. Note that the event will continue propagating along the normal
event flow.preventDefault() Can be used to cancel the event, if it
is cancelable. This prevents the browser from performing any default
action for the event, such as loading a URL when a hypertext link is
clicked. Note that the event will continue propagating along the normal
event flow."

But often, if I want to stop a hyperlink from working normally, I can
simply return false from whatever action I've attached to that
hyperlink. Suppose I have this link:

<a id="link1" href="index.htm">link text</a>

Suppose I attach the function "alertDanger" to this link:

function alertDanger() {
alert("Danger!");
return false;
}

Because I return false, the default behavior doesn't occur. Would there
ever be a benefit to doing this instead:

function alertDanger() {
alert("Danger!");
preventDefault();
}

Perhaps preventDefault is only for those occassions when the code can
not or should not return?

View 3 Replies View Related

JQuery :: How To Send Simply Variable Outside Function

Oct 4, 2011

As it is shown in line 2 does everything perfectly, but I must declare the variable outside the function, as it implies the following code (line 1).
marcel
var
wert = "text";
$('#bChange'
).click(function() {
$.ajax({
url:"content/nextpage.php",
type:"POST",
timeout: 5000,
dataType:'html',
cache:false,
data: { rNeuRecht: wert },
success:function
(msg){
$("#leer").html(msg);
}});});
$('#bChange'
).click(function () {
$.ajax({
url:"content/nextpage.php",
type:"POST",
timeout: 5000,
dataType:'html',
cache:false,
data: { rNeuRecht: "text" },
success:function
(msg){
$("#leer"
).html(msg);
}});});

View 1 Replies View Related

Overlay Simply Wont Center Vertically?

Jan 30, 2011

I'm using jquerytools overlay on a site and i cannot get the overlay (which pulls in content from a url) to center on the page. I simply cannot see why and my brain hurts. I've been trying different things for about a week now to no avail.The url of the site is (and the page in question) http://bruce.ourcollective.eu and the overlays are in the bottom right hand corner of the screen: Credits Contact and Copyright symbol.

View 11 Replies View Related

Simple Search-type Page To Enable Users To Input A Model Number And Its Page Appears In A Inline Frame?

May 6, 2009

I am using a very simple search-type page to enable users to input a model number and its page appears in a inline frame. Its not a true search as it is simply relying on a person entering the correct html page name to find it. But this works perfectly in my application.The problem I have is that I cannot get the type box to accept enter key as a submitt, only a click of the mouse will submitt the request. If enter is pressed the box loses the users input but no action is taken.I think this may be a javascript issue. I have posted the code below.

[CODE]
<html>
<head>

[code]....

View 2 Replies View Related

JQuery :: Validation Plugin To Simply Change A Class Of An Element?

Dec 20, 2011

What options do I need to specify for the Validation plugin to simply add the error class to a specified element such as a "required" em that shows all the time. And so on to remove the class when valid.

Say we have a text input that I want to have a red border when not valid and the red border to disappear once valid. So I do not want to generate an error label.

View 3 Replies View Related







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