Topic awaiting preservation: Having difficulties with a script, would appreciate some help (Page 1 of 1) |
|
---|---|
Maniac (V) Mad Librarian From: Seoul, Korea |
posted 07-10-2004 03:46
OK, I have (I think) a script that is acting quite erratically, and I can't figure out why. I have had no problems with it until very recently--yesterday, in fact. code: function popUp(image, title, width, height, scroll)
code: <a href="imagery/everland/photo0b.jpg" onclick="popUp('imagery/everland/photo0b.jpg', 'Hyunjin's mother and father', 700, 525, 0);return false">
code: <a href="imagery/experimental/photo0b.jpg" onclick="popUp('imagery/experimental/photo0b.jpg', 'Monument reflection', 525, 700, 1);return false">
|
Maniac (V) Inmate From: Boston, MA, USA |
posted 07-10-2004 04:40
Safari and Mac IE: |
Maniac (V) Mad Librarian From: Seoul, Korea |
posted 07-10-2004 05:32
Cheers. That's the behavior I'm seeing on PC IE. In a way it makes me feel better, because it shows some consistency in the behavior, but in a way it just confuses me even more... |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 07-10-2004 06:05
'Hyunjin's mother and father' |
Maniac (V) Mad Librarian From: Seoul, Korea |
posted 07-10-2004 07:05
Son of a bagel. I can't believe it! The amazing thing is that I've run into this very same problem before... I don't know what I was thinking. Must be having a stupid day on the JS front. Thanks, Slime. |
Paranoid (IV) Inmate From: France |
posted 07-10-2004 09:10
Suho1004: As a side note, I don't know how your backoffice works, but I suggest you to turn you function calls from : code: <a href="imagery/everland/photo0b.jpg" onclick="popUp('imagery/everland/photo0b.jpg', 'Hyunjin's mother and father', 700, 525, 0);return false"> to this code: <a href="imagery/everland/photo0b.jpg" onclick="return !popUp(this, 'Hyunjin's mother and father', 700, 525, 0)"> And I also thing that passing the width, height and scrolling ability of the window is useless. Since JavaScript must be activated for this to work, then you could retrieve the size of the image and that of the screen onload of the popup and resize the window. |
Maniac (V) Mad Librarian From: Seoul, Korea |
posted 07-10-2004 09:52
Thanks, poi. I'll take a look into streamlining it. |
Paranoid (IV) Inmate From: France |
posted 07-10-2004 11:50 |
Maniac (V) Mad Librarian From: Seoul, Korea |
posted 07-10-2004 12:04
Ah... I see. I've actually forgotten most of the JavaScript that I used to know, which is why I originally did it the way I did. I'm not sure when I'll get the chance to rework this, but when I do, I will most likely require assistance. |
Paranoid (IV) Inmate From: France |
posted 07-10-2004 12:22
Actually by passing only this to the popUp( ) function, it's tricky to get the script working in NN4. The only way I thought of would have complexified (?) the function a bit and required to put a substring of the href in the name attribute of the thumbnail image. |