HTML help

Zaudika

Naughty.
Joined
Oct 1, 2002
Posts
3,797
Ok, I'm guilty of using Lit for quick help to a question.

In programming HTML..

I have a thumbnail, I'm linking it to a larger image, I'm having the larger image open a new window. The whole, target_blank feature thing.

What I want is to make it so the window that opens isn't full size. I want to tell it to open at the size of the picture. So the larger picture that opens, doesnt take up the entire screen. If I remember right, this is possible, because I did it years ago, I just can't remember how to now.

Thanks in advance.
 
Code:
<a target="_blank" href="your pic.jpg">

that's the easy way to draw a new window ... I don't think I'll be the size of a pic though ... you need to involve some Java for that
 
Zmey said:
Code:
<a target="_blank" href="your pic.jpg">

that's the easy way to draw a new window ... I don't think I'll be the size of a pic though ... you need to involve some Java for that

thank ya Zmey, thats essentially how i was doing it before, slightly different format. I'm going to try this format and see if it looks any different. I know when I did it years ago I at some point made the popup the size of the pic, but it could be very accurate that I used Java to do it. My memory just totally sucks.

Thanks again
 
target="_blank" work only for a new browser window. To have a specific size or place window you need **********, that is call a Pop-up and have alot of possiblitities I have written a article about Pop-up in french if you do need it I can try to summurized it for you in english.
 
Yes, this does require JS - at least I don't know of a non-JS way to do it. Try this:

<a href="URL of larger image" onclick="window.open('URL_of_larger_image,'popup','width=width_of_popup_window,
height=height_of_popup_window,scrollbars=no,resizable=no,
toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">IMG SRC code for your thumbnail</a>

(There should not be linebreaks in this code.)
 
Last edited:
Thank you both. :) I'll try that a bit later Etoile, only have a moment to be at the computer right now, but I'll let you know.
 
Ok, while we are asking for HTML help, I have a question please. :)

In the links page in my website I want the link to the other website I am sending them to, to open in a new window when they click on the link. So my website is still there behind the new screen.

What HTML do I use for that please????
 
lets see if i can do this so it shows up and makes sense T.H.... :)

<a href="http://www.jocular.net/peacecorps/" target="_blank">


This is a link taken from my site that opens up that way... the target=blank part stays within the little alligator brackets along with the rest of it.
 
Zaudika said:
lets see if i can do this so it shows up and makes sense T.H.... :)

<a href="http://www.jocular.net/peacecorps/" target="_blank">


This is a link taken from my site that opens up that way... the target=blank part stays within the little alligator brackets along with the rest of it.
Thanks, I'll try it later. :)
 
Or.

If we're being really really picky then we don't use target="_blank" at all. It's no longer in core HTML. Vanilla, safe, HTML 4.1 has decided that the user should deside whether the web page opens in a new window, not the web designer.

If you want to make sure your code is HTML 4.1 compliant then you'd have to use JScript to ensure that a web page opens in a new window.

If you use target="_blank" then in about 10 or 15 years you might have to re-do your code! :D
 
Zaudika

Try this one... it'll even centre the popup window for you...

This first block should be copied and pasted exactly as it is inside your HEAD tag (above the BODY tag)


<script language="**********" type="text/**********">
<!--
function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
if(window.screen)if(isCenter)if(isCenter=="true"){
var myLeft = (screen.width-myWidth)/2;
var myTop = (screen.height-myHeight)/2;
features+=(features!='')?',':'';
features+=',left='+myLeft+',top='+myTop;
}
window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
//-->
</script>


This second block should be altered by changing the red text to suit you, and pasted where you want the button to be placed. You can paste as many of these buttons as you want on the page and you only need the first block to be placed once in the HEAD tag.


<a href="**********:;" onClick="MM_openBrWindow('PAGE TO BE LINKED TO','NewWindow','resizable=yes','WIDTH OF WINDOW','HEIGHT OF WINDOW','true')"><img src="BUTTON IMAGE NAME" width="WIDTH OF IMAGE" height="HEIGHT OF IMAGE" border="0"></a>


I think that should cover it, if you need anything else... feel free to PM me.
 
Zmey said:
Code:
<a target="_blank" href="your pic.jpg">

that's the easy way to draw a new window ... I don't think I'll be the size of a pic though ... you need to involve some Java for that
**********, not Java - two different languages, two different environs. Although you can open a new browser window of a given size with Java, it would be like trying to kill a mosquito with a nuke - super overkill. A few lines of JS will suffice, as would the right options in HTML.
 
The Heretic said:
**********, not Java - two different languages, two different environs. Although you can open a new browser window of a given size with Java, it would be like trying to kill a mosquito with a nuke - super overkill. A few lines of JS will suffice, as would the right options in HTML.
oh come on man we both know I ment ********** ... I don't want to type all them extra words... I'm a Windows user ;)
 
Zmey said:
oh come on man we both know I ment **********
Then just use 'JS'. I didn't know that's what you meant, and more importantly a whole bunch of other people probably didn't know - or know the difference between the two. As software engineer who writes mostly in Java, and includes a snippet of JS in most of his web pages, all the time I run into the fact that most people don't know the difference between these two very different languages.
 
I wish I could program in Java at my job. I know enough of the language to do simple things, and would love the chance to really build a complex application. In my opinion, it takes the very best of the c++-style object oriented syntax and throws away the ugly, dangerous bits, leaving a very clean, usable language.
 
Guru said:
I wish I could program in Java at my job. I know enough of the language to do simple things, and would love the chance to really build a complex application. In my opinion, it takes the very best of the c++-style object oriented syntax and throws away the ugly, dangerous bits, leaving a very clean, usable language.
The environ has its disadvantages for deploying small apps (size/speed), but there are initiatives to help with that. As a developer I prefer Java to any other development platform. It is cleaner language than C++, yet as concise - JavaDocs help document your code, JUnit helps test it, and all the APIs that are available make Java an environment instead of just a language like C++. I do wish they had included operator overloading, and we are just now getting generics (templates), but still people who have gone to Java don't want to go back to C++.
 
Can't say I know a lot about Java or JS. Correct me if I'm wrong but I think Solaris is written in Java. I did mean JS though. Just like Visual Basic is different from VBScript it would be safe to assume JS is different from Java. Most people I encountered call JS java, you say it's wrong and I agree but that's the way I'm used to calling it...
 
Zmey said:
Can't say I know a lot about Java or JS. Correct me if I'm wrong but I think Solaris is written in Java.
Solaris was developed in 'C'. There are very few OSes written in Java, and none that I know of are mainstream. The most well known one is JavaOS, and I don't know of any computer manufacturer who ships with a Java based OS on their general purpose computer - mostly they would use such for a set-top box or other embedded device.


I did mean JS though.
I did believe you - I was just saying that it wasn't apparent from your post.

Just like Visual Basic is different from VBScript it would be safe to assume JS is different from Java.
VBScript is based on VB, but JS is not based on Java, except the syntax is similar. The only reason JS has Java in its name is because Netscape (at the time) wanted to capitalize on the popularity of Java, and Sun wanted to combat the use of VB/VBS/OCX on the web so they lent the Java name to NS.

Most people I encountered call JS java, you say it's wrong and I agree but that's the way I'm used to calling it...
The problem is that they are so different, and this causes a lot of confusion and misunderstandings.
 
Last edited:
Zmey said:
Can't say I know a lot about Java or JS.

Don't even go there. It's a bit too close to suggesting that the two are related. They're not. Grass and Glass are similiar words, but they're miles appart, so to Java and **********. When they renamed LiveScript as ********** I've no idea what on earth they were thinking (expect, perhaps, "jump" and "bandwagon"). I think they did the industry a blow that day. (and not a good sort of blow either)
 
Sixth said:
When they renamed LiveScript as ********** I've no idea what on earth they were thinking (expect, perhaps, "jump" and "bandwagon").
Money/market share. It is common marketing technique to use a name similar to something that is successful so as to ride on its coat-tails. That explains why Netscape did it, but doesn't explain (completely) why Sun joined in. Good move on the part of NS, stupid move on the part of Sun, and one I think they now regret.
 
Zaudika said:
In programming HTML..
Oh and Zaudika, not to jump on ya or anything, just a word to the wise - no one "programs" in HTML; it is a markup language (i.e., make this text bold, that pic this size, etc.) and there are really no built in logic constructs.
 
Re: Re: HTML help

The Heretic said:
Oh and Zaudika, not to jump on ya or anything, just a word to the wise - no one "programs" in HTML; it is a markup language (i.e., make this text bold, that pic this size, etc.) and there are really no built in logic constructs.

Yeah. I noticed that too. Okay; so maybe I should have jumped on Java rather than ********** but I think we should let this one go.

HTML has been so cool and success because Literotica (and other) forum users all around the world can dabble in it. You don't have to have an honours degree in computing to ask HTML questions. :)

Of course. I'm just waiting for the industry to shake the dotcom cowboys out before making my web programming move... :)
 
Zaudika

Just use the code in my last post to get the little window thingy to open the way you asked for.

That post took me ages to program (sorry.. I meant 'markup')
 
Re: Re: Re: HTML help

Sixth said:
Yeah. I noticed that too. Okay; so maybe I should have jumped on Java rather than ********** but I think we should let this one go.

HTML has been so cool and success because Literotica (and other) forum users all around the world can dabble in it. You don't have to have an honours degree in computing to ask HTML questions. :)
Agreed. My purpose in pointing out such faux pas is not to laud my knowledge (which is actually fairly pathetic), but to let someone know that this faux pas will give the impression of them being unknowledgeable in the field. I don't know how many resumes I have read where someone was applying for a s/w engineering or testing job where they made some sort of claim for "programming" in Excel or Word, etc. as their primary claim to fame.

Yeah, technically those apps do support scripting and macros do have logic constructs, but just the same it is a long ways from understanding how write or test software, and such claims are usually dismissed out of hand by us nerds/geeks (we have our own pecking order after all).

Of course. I'm just waiting for the industry to shake the dotcom cowboys out before making my web programming move... :)
Most of the cowboys ar long gone. If anybody has survived this economy this long they either had a really cool tech and understanding venture capitalists (very understanding), or they are actually making money. The problem with making a move right now is that, in any given area, there are thousands of very experienced web developers looking for work. Anybody trying to come in as a newbie doesn't stand much of a chance - at least not right now.
 
Back
Top