Closed Thread Icon

Preserved Topic: tool, not the sharpest in the box Pages that link to <a href="https://ozoneasylum.com/backlink?for=18303" title="Pages that link to Preserved Topic: tool, not the sharpest in the box" rel="nofollow" >Preserved Topic: tool, not the sharpest in the box\

 
Author Thread
Relain
Paranoid (IV) Inmate

From: westernesse
Insane since: Jul 2000

posted posted 08-23-2001 23:48

hi, i've gone and made another stupid error somewhere with my cheeky cut n paste antics. http://www.coleman.u-net.com everything would appear fine and dandy however, when you turn on the tooltips it looses the ability to move windows. im fairly sure its because i have so many different scripts which i haven't written myself and so i can't find the problem, the windows script only locks up when you click on the popup link i put in. that should be in the onload tag in the body.
so anyone got any ideas apart from just deleting the whole thing and writing my own version, so it goes. I think this counts as a textbook example of why you shouldn't just cut scripts from sites. hoisted by my own ptard.


Dark
Neurotic (0) Inmate
Newly admitted
posted posted 08-24-2001 00:08

good going, my rule is only cut-and-paste with you allready know the code, kinda of a save time thing. I try to look at sites at learn from them and figure out how to do them.
I strongly don't recommend just ripping stuff, cause if you do get it to work. you still don't know how it was done and therefore you have learned nothing at all, and you might as well have never done it, cause then people go cool how did you do that, then you have to say i coped it from someone else. So learn what you can and ask questions for the stuff you don't know, i would even go so far as to say that if there was a piece of code that you didn't understand you could jst post it here and someone could tell you what it is for and how it can be changed to do diffrent things

________________________
Are you afraid of the D a r k

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 08-24-2001 00:40

Well... you may want to check variable names.
They could be overlapping. You never know.
However, if that is not the case, you might
want to try throwing your code through
a debugger. That might be a good
way to solve your problems.
If that does not work then
I would reccommend
cutting up the code
into working and
not working
sections
then
send the
code our way
and we will take
a look at it. But, we
tend not to like to have
to go through peoples pages
trying to figure out where the
problems lie. So try the above
and if that does not work cut out
problem areas and paste them here
in the forum.

Cheers,

Relain
Paranoid (IV) Inmate

From: westernesse
Insane since: Jul 2000

posted posted 08-24-2001 01:01

warmage why is your message formatted like that? i don't get it .
are you poking fun at my general crap formating, if so then well said that man. otherwise its just hard on the eyes.
also a js debugger would be what? like the HTML verifiers?

[This message has been edited by Relain (edited 08-24-2001).]

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 08-24-2001 01:29

Hate to say it, but this is one of the reasons I still use Netscape (other than IE sucking for the Mac). Netscape 4.x and Netscape 6.x/Mozilla have really nice Javascript consoles which display all the oerrors, and the line numbers they occured on, really useful, eh? In NS4.x, type "Javascript:" in the address bar, and in Mozilla it's under maybe "Tasks -> Tools -> Javascript Console"? Look around, it's there. Good luck to you, and welcome to my life, hah! (The mystic quest for the semicolon... =)

Your pal, -doc-

Relain
Paranoid (IV) Inmate

From: westernesse
Insane since: Jul 2000

posted posted 08-24-2001 11:40

weell the bit which buggers things up is:


function popupInit(){
//Fixing the browsercheck for opera... this can be removed if the browsercheck has been updated!!
bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false
if (bw.opera5) bw.ns6 = 0

//Extending the browsercheck to add windows platform detection.
bw.win= (navigator.userAgent.indexOf('Windows')>-1)

tooltip= new makeTooltip('divTooltip');
tooltip.elm.onmouseover= function(){ clearTimeout(tooltip.popTimer); if(bw.ns4){setTimeout('clearTimeout(tooltip.popTimer)',20)}; };
tooltip.elm.onmouseout= dopopOut;
if (bw.ns4) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove= getMousemove;
measureScreen();
if (!bw.ns4) onresize= measureScreen;
if (!bw.ns4) tooltip.elm.className= 'normalStyle';
if (bw.ie && bw.win && !bw.ie4) tooltip.css.filter= 'alpha(opacity=100)'; //Preloads the windows filters.
isLoaded= true;
};

// Initiates page on pageload if the browser is ok.
if(bw.bw && !isLoaded) onload= popupInit;

this function is called by a line in the body on load tag and then everythign stops working. and i can't see the JS errors on this code.

Dark
Neurotic (0) Inmate
Newly admitted
posted posted 08-24-2001 17:17

ok i might be totally wrong on this one, but on the last bit of code you have onload= popupInit; I think you need to remove that and stick it in the <body> tag, Like you would preload a picture or what not. you have multiple scripts on the page that won't work together. example: you have onload=do this.and onload=dothat, they can't do both unless they look something like this <Body onload="popupInit"> to add more functions in the same onload, seperate them by semicolns and put them inside the quotes.



______________________
Are you afraid of the Dark

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 08-24-2001 22:53

I'm not sure what popupInit() is supposed to be doing but the two lines that are breaking your dragable windows are:

if (bw.ns4) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove= getMousemove;


These lines are redefining the page events for the *entire* page. The dragable window code needs to use these events too and the two lines above are taking them away from the dragable windows, as it were. Why do you even need this function?


Relain
Paranoid (IV) Inmate

From: westernesse
Insane since: Jul 2000

posted posted 08-26-2001 14:17

coool, cheers bugimus. I don't need that bit at all. I think this counts as Cargo Cult programming, its there because i thought i might need it for something but i don't know what and i wasn't sure what it did. Another case closed for the DHTML experts, your work here is done.


« BackwardsOnwards »

Show Forum Drop Down Menu