new window code
- Started
- Last post
- 37 Responses
- warheros
can anyone provide me with code that opens a new window to fit the linked file? such as a *.jpg or a *.mov? if that can be done?
thank you so very much!
- BonSeff0
you got a copy of dreaweaver?
- warheros0
that looks like it just makes a new window 330x250 ...
is there no code that fits to scale the media? and no menu? and no scrollers? not adjustable? i am hopeless. and i suck.
- warheros0
yesh
- brozilla0
is there no code that fits to scale the media? and no menu? and no scrollers? not adjustable?
==========
change the code to meet your spec...ie. scroll bar=no,
DW makes it reaaly easy for ya...
apply a behavior... such as onClick... a box will appear asking you for your specs...voila.
only tricky part is to nullify your href...
- BonSeff0
have you tried breaking out the behaviors palette and creating your link with the Open browser winder option?
- IRNlun60
why not just target="_blank"?
Does the window have to be a specific size?
- warheros0
no, ive never done that, guess ill see if i can do that now.
- warheros0
id like it to be centered and scaled to the picture...which is 600x337.
- IRNlun60
a href="file.jpg" target="_blank"
/a
- warheros0
yeah i could just use target="new" but i dont wanna. i want it centered and fitted. prrrrfectly. im trying.
- brozilla0
in DW:
1. window -> behaviors
2.in behaviors palette -> select plus icon
3. select OPen Browser Window
4. Fill box
5. in behavior drop-down, make sure your event is set to "onClick"
6. nullify your href, otherwise no button
- ********0
just embed your file at a certain size and use those parameters in the JS.
- warheros0
man that just fucks everything up. my css dont work and it never does it to the text i select for the link. fuck it. ill try something else.
- warheros0
dont know how to embed file
- ********0
place your object or whatever in an HTML file at X=0 and Y=0, like in Flash and then JS enable a link to it, deciding what parameters to set. such as 250x200, etc.
- johndiggity0
what he meant was replace the link address with # so it will ave the same style as a link but won't go anywhere. use the behaviors to tell it what to do.
- brozilla0
my css dont work and it never does it to the text i select for the link.
what does your href look like? as long as the JS is embedded in yur href tag, yur css should work. make sure yuor /a is in the right place.
its reall not too hard...play around with it a bit
- warheros0
okay...well i tried getting rid of the a href that didnt work. then somehow it selected everything so it would open a new window and the link i clicked that wasnt that...i am not a web designer, so i dont know a lot of the jargon you guys are using or how to do it. ill try doing the # in the href...
- warheros0
kick ASS that worked.
now does resize=no work? i can just throw that in at the end of the java within it's < > ?
umm...how do i center this shit on the screeN?