View Full Version : Can't get image on top
nippi
06-26-2001, 10:01 PM
I've found a dreamweaver extension that sort of works adding a bookmark in NS. I've tried to modify it so that a new window opens, with an image in it telling the user to click on Ctrl + D to bookmark the page.
The only problem is, the image doesn't appear on top of the other images. My javascript is pretty flaky and I can't work out where to put a command to tell the image to appear on top of everything else.
Check it out at:-
http://www.halonet.com.au/sonyamoran/default.asp#
Anyone?
Nippi
Dr. Web
06-27-2001, 02:09 AM
The page takes a while for me to load.... so many pictures.
Ok, to the problem: You have this tiny little pop up, crammed with a huge image, and many.... many overlapping layers. Obviously the simplest way to tell the surfer to press controlD to bookmark would be to simplify the pop-up page (READ: start with a clean page, and add only what you need). I took a look at the code, and have absolutely no idea why most of it is there. There are all sorts of Dreamweaver scripts in there.... that are doing nothing. Get rid of those. All sorts of layers everywhere.... why not just use a simple page??
Just make a small pop up that tells them to bookmark by pressing controlD. Or use a js alert box.
below is a simple code which allows IE users to bookmark by pressing the button, and alerts the rest to press contol d.
<html>
<head><title>bookmark</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function addBookmark() {
if (window.external)
external.AddFavorite(location.href)
else
alert("To bookmark this page, press control D.");
}
// -->
</SCRIPT>
</head>
<body>
<FORM>
<INPUT TYPE="button" VALUE="Add" onClick="addBookmark()">
</FORM>
</body>
</html>
Dr. Web
06-27-2001, 03:18 AM
aaaaahhh, I see what happened. You just took your home page, and tried to load it into the pop-up, and just put a layer on top of it. Uhm, why would you make the user load all that unneccesary stuff, just to see that little "press control d" message?
heres the revised code. You shouldn't need any more than this for the pop-up:
<BASE HREF="http://www.halonet.com.au/sonyamoran/">
<html>
<head>
<title>Sonya Moran Sculpture</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor=black>
<A href="javascript:window.close();"><IMG src="images/images/framebooker.gif" width="350" height="100"></A>
</BODY>
</HTML>
and attached is the original. An improvement, I'd say.
nippi
06-28-2001, 09:32 PM
Firstly, apologies on speed of page loading. Its a work in process and I'm yet to make it laod quickly.
Secondly, the answer to why the pop-up loads the orginial hoepage, lies in my intial question. Flaky javascript knowledge. I new enough to take the original extension from being script:-
See http://www.halonet.com.au/sonyamoran/test1.asp
to being an image:- see
http://www.halonet.com.au/sonyamoran/test.asp
thinking I would be able to to put the whole thing in a layer on top of everything. Umm... nope.
Your solution obviously is great! But I don't know how to modify the existing extension to get this info to come up rather than then whole homepage.
Reason I wan't to modify the existing extension, is to resave as it as a new extenstion. Will make adding this as a behaviour much quicker in future.
http://www.halonet.com.au/sonyamoran/test.asp will load quickly.... Any chance you can show me how to incorporate your fix into my existing script?
nippi
06-28-2001, 11:34 PM
And I figure the reason the author of this extension chose to have the orginal page load in the pop-up, is because if you don't do this, what page are you going to then bookmark in NS?
If the extension causes the current page to be bookmarked, doesn't the URl of the pop-up need to be the same as the page to be bookmarked?
nippi
07-01-2001, 11:24 PM
Um, Dr Web? You still there?
To use your pop-up I need to know how to get this new pop-up to "pop-up" The pop-up OI've got on my page now is entirely generated by a dreamweaver extension and I don't know how it works.
I also didn't know your solution would result in the right page being bookmarked in NS.
I'm assuming it will, but i don't know how to do it.
Dr. Web
07-02-2001, 07:25 PM
sorry, lost a few days due to the weekend, and extended alcohol abuse.
I'd just use a script that never leaves the page...
That way, there is no confusion, no pop-ups, or slow downloading just to bookmark the page you were already on.
<html>
<head><title>bookmark</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function addBookmark() {
if (window.external)
external.AddFavorite(location.href)
else
alert("To bookmark this page, press control D.");
}
// -->
</SCRIPT>
</head>
<body>
<FORM>
<INPUT TYPE="button" VALUE="Add" onClick="addBookmark()">
</FORM>
</body>
</html>
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.