The online racing simulator
Help with webiste html
(17 posts, started )
Help with webiste html
grr, I've been searching for days now and I cant find what I need, the funny thing is, I had it on my myspace a while ago and I deleted it :cries:. Anyway what I'm looking for is a code that make it so when you click on an image, a box below it shows up with information in it. I think it has to do with divs. Example

I click on a picture of a dog a box underneath pops up with some age location, ect...

anyone have what I'm looking for?

Thanks in advance
-Dustin
#3 - Stuff
[HTML]<img src="image.jpg" onClick="document.getElementById('popupBox').style.display='';" />

<div id="popupBox" style="display: none;" onClick="this.style.display='none';">
some content
</div>[/HTML]
Quote from glyphon :[html]<img src="image.jpg" onClick="document.getElementById('popupBox').style.display='';" />

<div id="popupBox" style="display: none;" onClick="this.style.display='none';">
some content
</div>[/html]

hmm some problems, when I click on the image, text show underneath of it but I want it so it shows up in a box so that I can move it. Plus, i need it to go away when I click another picture :S Any help please?
if you click on the text that appears, it goes away.

but what you are wanting is different than what you asked for

hang on and i'll get the rest
unzip the two files, and put them in the same directory as the html file

######
This goes in the <head> tags
######
<link rel="stylesheet" type="text/css" href="floatingDiv.css" />
<SCRIPT LANGUAGE="JavaScript" SRC="floatingDiv.js"></SCRIPT>



######
this goes in the <body> tag>
######
add onLoad="setfocus();" to the opening body tag
for example...
<body onLoad="setfocus();">



######
here are the 2 images that open and close the floating Div
######
<img src="imageOpen.jpg" onClick="document.getElementById('floater').style.display='';" /><img src="imageClose.jpg" onClick="document.getElementById('floater').style.display='none';" />


######
this is the floating/dragable div
######
<div id="floater" class="drag" style="display: none;">
some content
</div>




######
Add this to the very bottom of the page
######
<script type="text/javascript">
var draggers=document.getElementsByTagName('div')
for (var i_tem = 0; i_tem < draggers.length; i_tem++)
if ( draggers[i_tem].className=='drag' )
Drag.init(draggers[i_tem])
</script>
Attached files
floatingDiv.zip - 1.7 KB - 118 views
my dad created that kind of script and is now doing the same kind i think in flex
#9 - ORION
I have this on my site aswell, but with fading, and it clips to the frame/window :P

http://www.franknaggies.com/
check the small icons at the bottom left

[EDIT]
coded myself though, I dont like those scripts you can get everywhere... they suck mostly :P
those aren't dragable
sure, sure. they are attached to the mouse, but not dragable

and jebus...that's a lot of js in that file.
okay this is exactly what im trying to do:
I have images in a scrollable area, and when you click on the image, I want a box to show up underneath, that I choose the dimentions and put the information in. When I scroll over to see more pictures I want the box to follow the picture that is scrolling above but make it go away when the picture is off the scrollable area or when the guest clicks on another image.

Hope that helps

ps NO JAVASCRIPT ALLOWED :S
pps I really liked http://www.huddletogether.com/projects/lightbox2/
flex allowed?? dunno whats its like, i think more like flash...
when he gets back tomorrow ill ask him for it
so far im using your code glyphon, its working so far...
okay now that I have the pictures down I need a code to make it so it will scroll in a list with other pictures. I need to be able to resize the box via admin editors (i dont want the guest to resize it :P)

P+TY
so its working allmost??

i had a conversation with my dad:

me: dad, a dude wants to make a dragable box....etc
dad: well, js, or flex but flex makes js and flash etc...

final question:
why not java
i felt sory for myself i asked 10 min conversation for a 0.3min question

Help with webiste html
(17 posts, started )
FGED GREDG RDFGDR GSFDG