|
|
#1 |
|
Forum King
Join Date: Mar 2004
Posts: 3,069
|
Javascript help.
I have been trying to make my active desktop randomly display images when I click on a link. This is the header bit:
code: Then in the <body> tag is this: <body background="maras.jpg" onLoad="pickimg();"> And the link contains this: <a onClick="MM_showHideLayers('box','','show');">Click</a> The link is in a layer of its own, and on clicking, it is supposed to open a new layer: <div id="box" style="position:absolute; left:0px; top:0px; width:1024px; height:768px; z-index:2; visibility:hidden;"> <img src="pickimg(image);"></div> I'm pretty sure the problem is with the img src bit, but I don't know what it's supposed to be. Any help please? |
|
|
|
|
|
#2 |
|
Banned
Join Date: Sep 2004
Posts: 295
|
code: |
|
|
|
|
|
#3 |
|
Forum King
Join Date: Mar 2004
Posts: 3,069
|
thanks.
it still doesn't work though... |
|
|
|
|
|
#4 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
Lots of error here, and get a grip on syntax, some lines end with ; and some don't. I know it's not required to use ; to terminate a line, but if you do, it's much easier to read a script, espeseially if a line is wrapped.
Gimme some minutes and I'll have a script you might be able to use 09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#5 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
Here
code: I have attached the file with some images in the zipfile below Hope this is what you were looking for
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#6 |
|
Forum King
Join Date: Mar 2004
Posts: 3,069
|
Tusind tak!
|
|
|
|
|
|
#7 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
np
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#8 | |
|
Forum King
Join Date: Aug 2002
Posts: 7,254
|
Quote:
Freedom of speech is the basic freedom of humanity. When you've lost that, you've lost everything. 1\/\/4y 34|<$p4y 1gp4y 33714y, 0d4y 0uy4y? | Roses are #FF0000; Violets are #0000FF; chown -R ${YOU} ~/base The DMCA. It really is that bad. : Count for your life. |
|
|
|
|
|
|
#9 |
|
Forum King
Join Date: Jun 2003
Location: Milwaukee
Posts: 4,577
|
I turned on active desktop and loaded a web page for my background and it turned off the transparency for my desktop icons, what's up with that?
|
|
|
|
|
|
#10 | |
|
Forum King
Join Date: Mar 2004
Posts: 3,069
|
Quote:
Mattress: I don't know. It does happen to me too. I just got rid of them all and put links to what I want as part of the Active Desktop (that's what it's for). However, if I removed ALL of them, the active desktop would disappear. So I've had to keep one. I mada an invisible icon for the shortcut, and an invisible character for the caption. So it's gone. Still a drag though. |
|
|
|
|
|
|
#11 | |
|
Forum King
Join Date: Aug 2002
Posts: 7,254
|
Quote:
Freedom of speech is the basic freedom of humanity. When you've lost that, you've lost everything. 1\/\/4y 34|<$p4y 1gp4y 33714y, 0d4y 0uy4y? | Roses are #FF0000; Violets are #0000FF; chown -R ${YOU} ~/base The DMCA. It really is that bad. : Count for your life. |
|
|
|
|
|
|
#12 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
Norwegian: Tusen Takk
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#13 |
|
Forum King
Join Date: Mar 2004
Posts: 3,069
|
Fint nok!
I didn't want to start a new thread on something so small, but this is annoying me. What is the little dotted box called around thinks you have selected? Like this: ![]() Also, is there some kind of css that will disable it when you click on links/images on a webpage? |
|
|
|
|
|
#14 |
|
Forum King
Join Date: Jun 2003
Location: Milwaukee
Posts: 4,577
|
it's the active link, there are four states of links in CSS
a a:hover a:active a:visited active links are links that have been clicked on, usually you don't see them too much because clicking on a link usually sends you to a new page and the clicked on link goes away. but you can see them if the link just invokes some javascript or a frame or something. Anyway, the little dotted box is not something that is specified in CSS so I don't believe you can get rid of it like that. Though it is part of IE, (Opera doesn't give you the box, firefox does, IE does) so microsoft might have some proprietary css that can turn it off, but I doubt it. |
|
|
|
|
|
#15 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
As far as I know, there is nothing that can disable the border around the active object, at least not for IE.
For html specs. it's <body alink="colorname/hex"> 09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#16 |
|
Forum King
Join Date: Mar 2004
Posts: 3,069
|
Actually, I've just noticed that in the IE I'm using at college the box isn't there, but on my IE at home it is. And I have IE 6. Maybe it's an SP2 thing. It's the only thing I haven't got from Windows Update.
|
|
|
|
|
|
#17 |
|
Forum King
Join Date: Mar 2004
Posts: 3,069
|
Reviving this thread becuase there's no point starting another, as it's more or less the same topic.
I'm using a script to make layers draggable in an HTML page. It is triggered by a click on a link which makes it possible to drag one of the layers across the screen. I want to click on a link (or the same one as the original one) to stop the layer-dragging, i.e. stop the script from functioning, until the link is clicked again. I've googled for it but have found no answer. How do I stop the script from "running"? Any help much appreciated. This is the script: code: |
|
|
|
|
|
#18 |
|
Forum King
Join Date: Aug 2002
Posts: 7,254
|
Um, you might want to repost that, but this time, turn off smilies.
Freedom of speech is the basic freedom of humanity. When you've lost that, you've lost everything. 1\/\/4y 34|<$p4y 1gp4y 33714y, 0d4y 0uy4y? | Roses are #FF0000; Violets are #0000FF; chown -R ${YOU} ~/base The DMCA. It really is that bad. : Count for your life. |
|
|
|
|
|
#19 |
|
Forum King
Join Date: Mar 2004
Posts: 3,069
|
Oops.
I'm using a script to make layers draggable in an HTML page. It is triggered by a click on a link which makes it possible to drag one of the layers across the screen. I want to click on a link (or the same one as the original one) to stop the layer-dragging, i.e. stop the script from functioning, until the link is clicked again. I've googled for it but have found no answer. How do I stop the script from "running"? Any help much appreciated. This is the script: code: |
|
|
|
|
|
#20 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
I know a solution... you can have some scripts that is made by Danny Goodman which came with my JS 4 bible, and they are much easier to understand than program made code. I don't know where you got that code, but my guess would be MacroMedia as of the MM_find_obj().
I'll post them when I get home. 09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#21 |
|
Forum King
Join Date: Mar 2004
Posts: 3,069
|
Yes, they are bundled with Macromedia Dreamweaver. There are other around on the internet.
Thanks a lot. |
|
|
|
|
|
#22 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
Forgot I lend away my bible to my brother.. :S I'll try to locate the script at the internet.
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#23 |
|
Forum King
Join Date: Mar 2004
Posts: 3,069
|
Thanks.
|
|
|
|
|
|
#24 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
I found the example by Danny Goodman which I had in mind.
The url for the example itself is: http://www.dannyg.com/examples/puzzle/mapgame.htm And it also uses an API file (also written by DG) located: http://www.dannyg.com/examples/puzzle/DHTMLapi.js You prolly have to rewrite alot of HTML, but at least if you manage to use this, you'll know what really happens
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#25 |
|
Forum King
Join Date: Mar 2004
Posts: 3,069
|
Thanks, I'll check it out when I get home. AFAIK, the macromedia script does that too, including the snapping to positions with a certain tolerance.
|
|
|
|
|
|
#26 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
Yep, and the DHTML API file contains more than just one fuction, as far as I remember, it can do different stuff, so if you learn the functions within it, you can do alot of fancy DTHML with it
![]() AND much easier to modify
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|