Mozilla Onload: "no Properties"; IE OK
Jul 23, 2005
This problem is driving me nuts. The code at the end of this post
below works fine with IE, but fails with Mozilla.
With Mozilla 1.4 and 1.6, the function msg works fine if it's
installed as an onclick handler for the button, but fails as an
onload handler for the page. The error is "console has no properties",
and is triggered by the line.
console.document.open("text/plain");
The code works fine on all versions of IE I've tested it on.
Is there an error in my code (that IE is letting slide), or is this
a bug in Mozilla? If the latter, is there a workaround? ....
View 3 Replies
ADVERTISEMENT
Jul 23, 2005
I am trying to rersize the window it works find in IE but doea not work with mozilla
window.attachEvent(onload,MWSOnLoad);
window.onload = function (MWSOnLoad)
{
alert('hello');
window.resizeTo(810,750);
top.outerWidth=810;
top.outerHeight=750;
}
<body marginwidth="0" marginheight="0" scroll="yes" onload="MWSOnLoad()">
View 4 Replies
View Related
Nov 13, 2009
how to add extra properties to html elements as I was storing data in html attributes. After looking at some others code including Raphael and this addEvent code. [URL] They seem to treat objects just like an array. obj[property] = value; This would have been extremely helpful to know previously as I have needed to be able to include variables in property names - but have resorted to making the whole thing a string and calling exec() on it.
View 2 Replies
View Related
Jul 16, 2009
had this in browsers areas but people told me I should put it here in Javascript because more people here would probably have seen it before and know why it happens. I have basic Javascript that rotates images. I've noticed any kind of Javascript code that rotates images has this same problem only in Mozilla. When the images rotate in Mozilla in between the rotations, Mozilla browser adds a little colored square that represents a blank image that are able to be seen does anyone know why Mozilla Browser adds that? For example when looking at this page in Mozilla can see it. if you know if this is some Mozilla problem with Javascript and images. Doesn't happen with IE and other browsers shows the images only and nothing else.
View 2 Replies
View Related
Nov 30, 2010
I've a BIG Problem With a HUGE JS application , i'm modifying its javaScript code to work on both IE/Mozilla , currently it works fine on IE but not on Mozilla.
My main Point now is events.
Lets try with a little module, consider this function :
And it is attached in this place like :
This works fine in IE , i want to modify it to work on Mozilla.
View 2 Replies
View Related
Jul 23, 2005
I'm having a hard time figuring out why the onload event is not being
called for the frameset window in the following simple example. It is
being called for each of the component frames. Code:
View 5 Replies
View Related
Dec 3, 2005
I wander what gets loaded the fastest (1-2 or 3) in what succession:
<head>
<script type="text/javascript">
function andAction() {
// doing stuff
}
</script>
</head>
<body onload="andAction();">
<script type="text/javascript">andAction()</script></body>
just in the head and nothing more
This I am sure off:
<head>
<script type="text/javascript">
window.onload = function andAction() {
// doing stuff
}
</script>
</head>
<script type="text/javascript">andAction()</script></body>
just in the head and nothing more (should be 1)
Third and last which is faster:
body onload or window.onload
View 3 Replies
View Related
Jul 23, 2005
I'm seeing a difference in behaviour between
window.onload = f();
and
<body onload="f();">
Specifically, window.onload appears to fire before all the elements of
the page have been rendered. As the difference is consistent across
IE/Moz/Opera, I'm assuming it's deliberate - can anyone point me
towards where this behaviour of window.onload is defined in the
documentation? TIA. Code:
View 2 Replies
View Related
Jul 23, 2005
I am getting a Javascript error from Firefox 1.0.5 when I try to reference a
table within a window that has just been opened and written to. I get the
Javascript error "cartTable has no properties" where cartTable is the
variable I assigned the table reference to.
cartTable=winDVDCart.document.getElementById("cartTable")
Previous to this, I have just opened a new window, used the document.write
method to write some HTML into it, and then used the document.close method.
At that point I call a new function to add some extra things into the new
window and this is the first statement that gets run. It seems as if the
table isn't quite finished loading when I try to reference it and that is
causing problems. I am not getting any errors in IE6 and it is working just
fine. I figured that maybe I could implement a loop to just wait until the
table is fully loaded but that will just loop infinitely for some odd
reason.
while (!winDVDCart.document.getElementById("cartTable")) {}
This code just loops infinitely, but if I just put an alert within the {}
for the while loop, it shows the alert once, I click ok and everything works
great after that. Could anyone point me in the right direction on this?
View 5 Replies
View Related
Nov 23, 2005
When i assign some css properties should i allways use the postfix like
measurment units (so use: 150px instead of only 150).
View 5 Replies
View Related
Mar 29, 2011
AwebappI am working onmust use millimeters instead of pixels for the top, left, width, height and font-size style attributes. There happens something strange when setting these style attributes with mm values.
[Code]...
View 4 Replies
View Related
Aug 26, 2006
It would appear that it is not possible to retrieve CSS properties such as min-width if they have been set from a class. However, I don't want to have to style everything directly with the style attribute whenever I need these properties. Is there a reliable method of getting these properties as applied to element from a CSS class?
View 2 Replies
View Related
Jul 11, 2011
I'm trying to get the properties for the following objects:
0: [object Object]
1: [object Object]
2: [object Object]
3: [object Object]
This was generated by using the following code:
[Code]...
Since object names can't simply be a number ie(this.oProducts.Product.0), how can I access the object properties in the list above?
View 1 Replies
View Related
Aug 15, 2003
i want to set page properties within the page itself. i can easily open a new window, but i don't want to have to do that. width, height, toolbar, scroolbar, navigation, etc... it seems like i've done this before, but for some reason i'm drawing a blank. any suggestions out there?
View 2 Replies
View Related
Apr 15, 2006
I only get an error telling me "test has no properties"...
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript" type="text/javascript">
var test = document.getElementById("test");
var title = test.getAttribute("title");
alert(title);
</script>
</head>
<body>
<p id="test" title="test title">This is a test</p>
</body>
</html>
View 2 Replies
View Related
Jun 20, 2006
I'm trying to iterate thru form elements and pull out the ones with "note" in their name. getting "elementName has no properties" with the following code, and i don't understand why?[code]...
View 2 Replies
View Related
Jan 9, 2007
I have been working on an Ajax class, but have encountered a problem in IE which i cant seem to work around. In IE i get the following error, referring to the requestChange method.
"this.objParent.objRequest" is null or not an object
As the requestChange method is called as the onreadystatechange function, ive had to assign a variable referencing the parent Ajax object to the requestChange method, which is done in the Ajax construct method. This allows me to reference the Ajax Request Object from the requestChange function.... in firefox at least. Code:
View 3 Replies
View Related
Jul 3, 2007
I would like to know the difference in Javascript between those two lines of code:
JavaScript Code:
oneobject.oneproperty = onefunction;
and
JavaScript Code:
oneobject.oneproperty = onefunction();
View 5 Replies
View Related
Jul 20, 2011
I have a quere.How to get the url from the properties window in internet explorer using the java script.Ex: I opened browser and navigated to[url]....Now I right clicked on the page selected properties option.In the properties window i need to get the url using java script.
View 1 Replies
View Related
Nov 6, 2011
I am trying to perform an elementary animation using javascript to manipulate the CSS properties of a <div> tag.
I use getElementById in my first function to draw a line inside a <div> box like this:
function line(x1){
var cd=+1;
var c = (x1);
var division = document.getElementById("line1");
[Code]....
View 3 Replies
View Related
Nov 7, 2011
I am drawing lines inside of a <div> (wrapper) using <div> id's by incrementing the height and width properties using javascript functions. I use setTimeout to gauge the speed and clearTimeout for when the current line is finished being drawn. Then we call the next function to draw the next line ... etc.... etc.
At first I was going to go the whole "createElement" route. Then I thought "Why not go ahead and define all the lines and id's in the body of the page and just set the initial heights/widths to "0" (hence they will not be seen until we start to increment).
XHTML Transitional looks like this:
What do I have to do be able to set multiple style properties?
I am getting an invalid argument:
I have been through this once before. This time I am not leaving anything out in hopes that someone could elaborate on why does:
But:
To me, it looks like the same approach is being used.
View 1 Replies
View Related
Aug 17, 2005
I have a number of show/hide images on my site which allows the user to click on various thumbnails to open up the full image using layer based styles.
However, my Javascript seems to have developed an error saying that the object has no properties and then takes me to the following line of code:
obj.visibility='hidden';
This code was written for me so that i could use the script dynamically with PHP an alter the number of div layers it needed to generate.
The full(?) javascript for this function is:
function showImg(myShow)
{
var loopNum=99;
for (x=1; x<=(loopNum); x++) //1 based loop
[Code].....
View 14 Replies
View Related
Oct 29, 2006
I have an 'input' that is of type= "image", and name="butt",
that I need to enable/disable from time to time.
In IE (6) I used [document.theform..butt.disabled=condition] and it worked
fine. However, in a Mozilla (latest vers, no number avail) it doesn't see
this as an object. As a workaround I declared a global var 'theButton' and
used 'onLoad="theButton=this;"' within that 'input' to set the value, and
this works fine in both Moz & IE.
Having to use a global var is not a problem, but I would like to know why
the original attempt didn't work in both browsers? The 'form' that 'butt'
is a member of contains 1 select, 3 type="text" inputs, and finaly the
type="image" input.
Perhaps Moz doesn't add an 'input' of type="image" to the collection if the
types are mixed?
View 4 Replies
View Related
Jul 20, 2005
I have this script and I want to adapt it to the DOM of most / all well
known browsers like mozilla and netscape.. at the moment it only works in
ie4+ en ns6. can anybody give me some hints?
This is used for making a tree <li><ul>
var ns6 = document.getElementById && !document.all;
var ie4 = document.all && navigator.userAgent.indexOf("Opera") == -1;
function checkcontained(e)
{
var iscontained = 0;
cur = ns6 ? e.target : event.srcElement;
if (cur.id == "foldheader")
{
iscontained = 1;
}
else
{
while (ns6 && cur.parentNode || (ie4 && cur.parentElement))
{
if (cur.id == "foldheader" || cur.id == "foldinglist")
{
iscontained = (cur.id == "foldheader") ? 1 : 0;
break;
}
cur = ns6 ? cur.parentNode : cur.parentElement;
}
}
if (iscontained)
{
var foldercontent = ns6 ? cur.nextSibling.nextSibling :
cur.all.tags("UL")[0];
if (foldercontent.style.display == "none")
{
foldercontent.style.display = "";
cur.style.listStyleImage = "url(images/open.gif)";
}
else
{
foldercontent.style.display = "none";
cur.style.listStyleImage = "url(images/fold.gif)";
}
}
}
if (ie4 || ns6)
{
document.onclick = checkcontained;
}
View 6 Replies
View Related
Jul 23, 2005
I would like to generate a page of links including some of the pdf properties (title, author, version, etc.) for a folder full of pdf's. Is this possible from Javascript?
View 4 Replies
View Related
Jul 23, 2005
I want to display information on a page in a static way. That is, not
as part of text elements. I can't find an appropriate struts tag to
use.
This what I did find. The form bean will be named the same as the
"name" attribute of the <form-bean> element in the struts-config.xml.
So if I have a form bean with 2 string properties, such as str1 and
str2, I can get the values on my jsp this way:
View 3 Replies
View Related