PDA

View Full Version : So - a popin script for the dinos



zeroge
12-30-2009, 08:06 AM
http://www.dynamicdrive.com/dynamicindex17/dropinbox.htm

for IE4 and Netscape? Who on earth is still using them? :confused:

Anything for the current generation?

djr33
12-30-2009, 08:17 AM
It's from those versions up. Most things that worked in netscape should now work in Firefox, and anything that works in "IE4+" should work in all modern versions of IE. It looks like NS5 is excluded... not sure about that.

zeroge
12-30-2009, 08:33 AM
Uhm... I tried both drop-in scripts from dynamicdrive and tested it in the latest versions of Mozilla and Safari plus IE6 and 7.

Both scripts failed in all browsers!

jscheuer1
12-30-2009, 08:47 AM
This page:

http://www.dynamicdrive.com/dynamicindex17/dropinbox.htm

works in all those. Maybe your implementation is flawed.

Please post a link to the page on your site that contains the problematic code so we can check it out.

zeroge
12-30-2009, 09:32 AM
Hi John

Appreciate your input, but help me ... what could I've done wrong by
1. selecting option #2
2. copy and paste the shown script in-between <head>here goes this script</head>
3. copy and paste the DIV content just before </body>

That was just as a trial, no individual styling applied yet

I have <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
and it works with other scripts OR ... IS THIS IT? the drop-in script interferes with other scripts and works only on a plain page without any other scripts?

Cheers

jscheuer1
12-30-2009, 12:12 PM
I have no idea what errors might have occurred with your implementation, perhaps none. The DOCTYPE should be fine. It would be incorrect to say, "works only on a plain page without any other scripts." However, one other script, with an onload event that gets parsed after the one for this script would stop this script (and many others) from running. There could also be a name collision with another script. If you want more help:

Please post a link to the page on your site that contains the problematic code so we can check it out.

zeroge
12-30-2009, 04:34 PM
<script language="Javascript" src="dropinNEW.js"></script>
<div id="dropin" style="position:absolute;visibility:hidden;left:20px;top:50px;width:400px;height:250px;background-color:#FAFAD2;opacity:50">
<div align="right"><a href="#" onClick="dismissbox(); return false">--[Close Box]-- </a></div>
<br>
<center><a class='iframe style1' href="path/to/file.html" title="Homer Defined">Put your box content here</a></center>
<br>
</div>
</div>

I packed the js into a file and saved it externally. Then I put both the link to the .js and the box DIV just below the body start tag ( <body> ) and it works fine. Actually you can place this anywhere in the body.

As you see, I have a link in the box that will open the new page in a lightbox. Works fine - but I haven't figured out the code needed that would not only open the lightbox but at the same time close the drop-in box!

If anyone has an IDEA, I'd appreciate to post it here

Thanks alot
Mitch

jscheuer1
12-30-2009, 04:51 PM
That would depend upon which version of Lightbox you are using. From all you've said, I would suspect this one:

http://www.dynamicdrive.com/dynamicindex4/lightbox/index.htm

which is the only one I know of that could conflict with Drop-in content box. But I cannot be sure.

I'd still like to see the page:

Please post a link to the page on your site that contains the problematic code so we can check it out.

However, Lightbox v2.04a would probably be the best choice for that because with it you could have something like:


<a href="some.jpg" rel="lightbox" onclick="dismissbox();">

and it should work out.

Lightbox 2.04a:

http://www.dynamicdrive.com/forums/showthread.php?p=163470#post163470

zeroge
12-30-2009, 05:09 PM
GEE - you are a true legend and I bury myself in a corner, shame on me ... I should have known that! :o

just added
onclick="dismissbox() to the former a href string and it works brilliantly.

OOPS.. sorry, I should have mentioned it before.
No, I use colorbox. I find this script extreme versatile as it allows even to include forms, etc.

Is it OK to include a link here to the site where the script will be used or is it self-promotion? If OK I will post it here a little later

Thanks a lot for your patience and a HUGE HAPPY 2010 to all of you in this forum

Mitch

jscheuer1
12-30-2009, 05:23 PM
No need to post a link if you've solved things to your satisfaction. I've never heard of Colorbox, there are so many of these Lightbox clones, and I've seen tons of them, not that one though. Sounds pretty good, and if it doesn't overwrite existing onclick events, that's a good feature. Many of the Lightbox type scripts do. The one I mentioned (2.04a) doesn't, but all of the earlier (2.03 and less) ones do, as do most of the clones.

You can always post a link if asked for by the person helping you. But we don't need that any longer here as far as I can tell.

zeroge
12-30-2009, 05:36 PM
Thanks John for all your support
You may want to check it out ... colorbox/ (http://colorpowered.com/colorbox/) It's a great script.