Could i try something with a recursive (?) function that copies with a special copy if the type is an Object and normal copy else?
Does an Array has the same behaviour???
I already thought of this. The only problem is that I hav recursive objects and i want them to be copyed (not reffed) as well. I don't think this will work for my application.
in Mozilla (NS) events are called in a different way. The first parameter of an on... function has the event object, while IE has a (sortof) global event object.
use some what like this:
function fixEvent(evnt)
{
if (typeof(evnt) == "undefined") evnt = window.event;
if (typeof(evnt.layerX)...
Hi all,
Is there a way to make the following script work as i would expect it to?
<script language="javascript">
function constr () {
this.value = 'oldval';
this.someotherval = 'xxx';
}
var obj = new constr ();
obj.someotherval ='yyy';
var obj2 = obj;
obj2.value = 'newval'...
this is what i finally found :)
var x,y;
if (self.innerHeight) // all except Explorer
{
x = self.innerWidth;
y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
// Explorer 6 Strict Mode
{
x = document.documentElement.clientWidth;
y =...
How do i find out the available width and height of a browser window. I checked out some docs and it said window.innerHeight and window.innerWidth. But:
when i do
alert (window.innerHeight); using IE 6.0 it says 'undefined' while using Mozilla 1.6 it gives me a reasonable 698...
i also checked...
Hi all,
Does anyone know a good way to 'log' javascript activity.
Preferably to a file, but something like a separate window or something is just fine.
I have 2 pieces of html:
<body>
<form style="border: 1px solid gray;">
<br>
<br>
some text 1<br><br>
</form>
some text 2
</body>
the other one
<body>
<form style="border: 1px solid gray;">
<br>
<br>
some text 1<br>
</form>
some text 2
</body>
Obviously the difference is...
I knew i was right, this means i have to rearrange my whole structure :(
My tables don't know how much cols there are gonna be, and if i don't know that i can't create the td's before i fill them. The major downside to this is that i'll want a colspan somewhere along some tr, and that's not...
view the following simple script:
<body>
<table border=1>
<tr id='row'>
</tr>
</table>
<script language="JavaScript">
<!--
document.getElementById('row').innerHTML = '<td>hello world</td>';
//-->
</script>
</body>
This should display 'hello world' with a border around it.
Mozilla...
This is what i ended up with:
<script language="JavaScript">
<!-- Data retrieval functions via xmlhttp request
var xmlhttp = null;
var xmlhttpSupport = false;
var xmlhttpDestination = null;
var xmlhttpCustomCallback = null;
var xmlhttpParser = null;
function loadXmlhttpSupport()
{...
Does anyone know a way to retreive - platform/browser independently! - data using javascript and php.
The situation is like this: i'm building a page with several basic elements, like textboxes checkboxes etc.
Another - less basic - element, called listview, has a great deal of relevant...
OK, i have fixed width/height <div> blocks, other layers depend on there sizes... So i want to know if the text inside a <div> is bigger than usual
I can't use relative, because strange thing happen if i do that.
Another Problem:
Textzoom in Mozilla and Netscape resizes text even if the font-size: is somewhat like 11px. IE doesn't resize these if the user tries to resize tekst... It's not that i don't want text to be resized by the browser (Maybe there is a way, if you know please tell).
I want to...
If i'd create a spacer IMG with exactly the same width and height in that DIV, it might just work.
This is gonna be a pain, because all de DIVs can change their horizontal sizes :-(
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.