Search found 64 matches

by UrButtFullOfArr0ws
Mon Jul 30, 2007 2:46 pm
Forum: Javascript
Topic: JS list with style.display trigger
Replies: 11
Views: 1132

feyd wrote:I would just use an else, losing the second if altogether.
That's just what i did, and it works, thanks everyone...
But i still haven't figured out the menu :)
by UrButtFullOfArr0ws
Mon Jul 30, 2007 1:46 pm
Forum: Javascript
Topic: JS list with style.display trigger
Replies: 11
Views: 1132

I wonder if you deserve any help after the aggressive behaviour against me. But i easy forget such a things. Why you close your <ol> with </ul> ? And haha what silly statement if(a.style.display=="none") { a.style.display = "block"; } if(a.style.display == "block") { a...
by UrButtFullOfArr0ws
Mon Jul 30, 2007 12:17 pm
Forum: Javascript
Topic: JS list with style.display trigger
Replies: 11
Views: 1132

What about when a.style.display == null, which it will by default? .... null isn't default for OL and UL but "block". Also it isn't left to default since i set it already... :? I tried ur version but didn't work. Any other ideas? Also on a further note and on a completely different questi...
by UrButtFullOfArr0ws
Mon Jul 30, 2007 11:47 am
Forum: Javascript
Topic: JS list with style.display trigger
Replies: 11
Views: 1132

JS list with style.display trigger

What's wrong with this? I've struggled with it for 10+ hrs ... <ul> <li><a onmouseover="switchit('submenu1')">Menu 1</a> <ol id="submenu1" style="display: none"> <li><a onmouseover="switchit('submenu11')">Sub Menu 1.1</a> <ul id="submenu11" style=&qu...
by UrButtFullOfArr0ws
Mon Jul 30, 2007 10:09 am
Forum: Javascript
Topic: [SOLVED] top attribute change on resize
Replies: 13
Views: 1296

Heh, :(

IE 7 and Opera 9, though ive always had problems on Opera with divs :lol:
The div isn't nested at all.. it's directly on the Body element

You just stunned me....I just figured im using IE 7 and not 6 :?
by UrButtFullOfArr0ws
Mon Jul 30, 2007 2:54 am
Forum: Javascript
Topic: [SOLVED] top attribute change on resize
Replies: 13
Views: 1296

That's... not a solution. Why do you think we needed to create a function? That will only work in Mozilla. IE won't work. I think Safari won't work. I also think Opera won't either (though unconfirmed). For the first time i can say this phrase: you're wrong! :lol: It works in both IE and Opera I ma...
by UrButtFullOfArr0ws
Sun Jul 29, 2007 2:10 pm
Forum: Javascript
Topic: [SOLVED] top attribute change on resize
Replies: 13
Views: 1296

Never mind... Nailed it :D Here's the solution i came up with ... function GetPosition(obj) { var y, tmp; y = document.getElementById('div2').offsetTop; return {'y' : y}; } I haven't tried using the "obj" object that i enter into the function but i'm fine with it if it works :lol:
by UrButtFullOfArr0ws
Sun Jul 29, 2007 11:05 am
Forum: Javascript
Topic: [SOLVED] top attribute change on resize
Replies: 13
Views: 1296

You are using the function completely incorrectly. I gave you the parameters in the comment. The obj parameter does not take a String, it takes an Object. Think about it. Heh i was trying to get it not as a string but as an array :D And becouse im relatively new to JS i'm looking at w3schools js re...
by UrButtFullOfArr0ws
Sun Jul 29, 2007 10:18 am
Forum: Javascript
Topic: [SOLVED] top attribute change on resize
Replies: 13
Views: 1296

The function returns an object with the x and y position, but you can simplify it to just return an integer of the y position. So i can get the y value with GetPosition('div2')['y'] ?? It depends on the browser. Some browsers do it for each pixel (I think IE does), and others only do it after the r...
by UrButtFullOfArr0ws
Sat Jul 28, 2007 1:03 pm
Forum: Javascript
Topic: [SOLVED] top attribute change on resize
Replies: 13
Views: 1296

Thanks a lot for your answer... MSDN? You went to the producers of the browser with the worse possible DOM in existence for JavaScript documentation? ... You're one crazy kid. :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: It was the one with the best possible definition for it (at least for ...
by UrButtFullOfArr0ws
Sat Jul 28, 2007 7:38 am
Forum: Javascript
Topic: [SOLVED] top attribute change on resize
Replies: 13
Views: 1296

Heh, that's why i said "almost" :D

Ok i looked into it, but what i don't get is exactly how they're supposed to work...
As i've seen i can't use offsetTop directly and i need to state which is the parent with offsetParent
How exactly do i do that?... MSDN had some complicated examples :)
by UrButtFullOfArr0ws
Sat Jul 28, 2007 4:06 am
Forum: Javascript
Topic: [SOLVED] top attribute change on resize
Replies: 13
Views: 1296

[SOLVED] top attribute change on resize

I'm trying to make one of divs i got, change height based on the top of another div that has bottom: 0px; attribute set if the user resizes the page. I tried something like: var height = document.getElementById('div2').style.top function changeheight(){ var difference = document.getElementById('div2...
by UrButtFullOfArr0ws
Fri Jul 27, 2007 2:04 pm
Forum: Javascript
Topic: JS "object expected" error (possibly on getElement
Replies: 20
Views: 1975

And i didn't start the hostilities... he started every post with WTF or WTH... how could i respond to that? :roll: I think that he's just having one of those days... It's understandable. I'm nicer some days than others. Today's a nice day. ;) I suppose :wink: I knew it immediately i seen your HTML....
by UrButtFullOfArr0ws
Fri Jul 27, 2007 10:38 am
Forum: Javascript
Topic: JS "object expected" error (possibly on getElement
Replies: 20
Views: 1975

Put the handbags down ladies http://pa.ranoid.co.uk/play/smilies/boxing.gif :lol: :lol: How the hell i can know it without to see your HTML code which you so furious hide from me ? Well you said that you knew immediately what my issue was ^_^ Javascript is completely dependent on the HTML that it a...
by UrButtFullOfArr0ws
Fri Jul 27, 2007 8:13 am
Forum: Javascript
Topic: JS "object expected" error (possibly on getElement
Replies: 20
Views: 1975

1) I never said If() was correct...read up. I already knew that but i'm used to case-insensitivity in php :?
2) If you had known from the beggining why let me go through all of this and not suggest it? :?
3) Yeah it solved it ....thanks :)