Jump to content
xisto Community
bnbrown

Bnbrown's Questions: Html, Css, Jsc, Ftp Etc.

Recommended Posts

Here I try to open a new topic to get answers for all of my problems in all-around design. What I do is mostly webdesign but print and soft also play role. I hope I'm not alone with problems of coding, scripting etc. I need answers, for I do not like open questions, and trying to make done something perfectly is very close to my character. Professionals are highly welcome! ;)1. question:How can a customize the target="_blank" stuff?

Edited by microscopic^earthling (see edit history)

Share this post


Link to post
Share on other sites

1. question:

 

How can a customize the target="_blank" stuff?

59334[/snapback]


See, TARGET controls where the new document is opened up when the user clicks on a link in your site. Usually, clicking on a link loads the new page in the same window where you clicked the link. With TARGET, you can have the new page open up in a completely new window/tab (depending on browser), or in case of frames, nested in another frame.

 

The usual format of using TARGET is as follows:

<A HREF="newpage.html" TARGET="_self">New Page</A>
i.e., you use it in conjunction with a A HREF or link tag to tell the browser where to open the link.

 

TARGET can take four predefined values as parameter, and open you new page accordingly. The parameters are:

"_blank"

"_parent"

"_self"

"_top"

Note: Make sure each parameter name starts with a "_" (underscore sign)

 

Case 1

=====

TARGET = "_blank"

"_blank" opens the link in a brand new window.

Case 2

=====

TARGET = "_parent"

"_parent" is used when you have a frameset file is nested inside another frameset file. Clicking the link would cause the new frameset to load in the parent frameset, i.e. where the current frameset was nested in.

Case 3

=====

TARGET = "_self"

"_self" opens the new page in the same window - as is the case with most pages. "_self" works all the same as in the case when you omit the TARGET completely.

Case 4

=====

TARGET = "_top"

"_top" loads the new page in the topmost frame... Once again, this is useful in case of frames. If you want a link inside a frame to open up a page wiping out all the frames on the screen and starting as the topmost parent frame, you use this parameter.

 

Have fun .. and try to be a little more specific in your topic titles - so that it reflects the nature of your post's content a little more clearly.

 

Regards,

m^e

 

P.S. Google around and you'll find plenty of live demonstrations of how each parameter reacts to clicks.

 

- DEAD-ON WRONG TRACK, lol...

Edited by miCRoSCoPiC^eaRthLinG (see edit history)

Share this post


Link to post
Share on other sites

How can a customize the target="_blank" stuff?

59334[/snapback]

so this is a specific html question, so I think you want to get a blank window with customized environment, like no "File Edit View..." menus, no icons, nonresizable, etc...

so first answer is that you could do it in java with this code

<script TYPE="text/javascript"> <!-- function popup(mylink, windowname) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, windowname, 'width=400,height=500,scrollbars=yes'); return false; } //--> </SCRIPT> The java above goes in head <a href="http://http://www.domainking.com/index.php; onClick="return popup(this, 'notes')"> 

and this will help you alot http://www.echoecho.com/toolpopupgenerator.htm - it's a popup tool generator, so if you don't know javascript this will help you to customize your "_blank" windows ;)

Share this post


Link to post
Share on other sites

Thank you finaldesign. This is exactly what I wanted. To have no menus, have own size etc. I've already tried something similar with JavaScript (open.window)but it generated me 2 windows when I cliked on it. Or other version was when I tried an img only with onclick then it worked fine but there was no nice pointing hand for it was no longer a link. (In this manner I deleted the href tag) I hope it will work. I'll try it. ;)

Share this post


Link to post
Share on other sites

You should remark that the attribute "target" is transitional and marked as deprecated by the W3C (world wide web consortium) and that Javascript is not available to every web user.finaldesign, you should distinguish Java and Javascript ;)The reason you got two windows when you used target="_blank" and window.open is that you set up two events at the same time when someone clicked.Another important thing is that a lot of users (especially me :P) feel annoyed if they are robbed of their window handling features (this is only about scrollbars and resizable, because the other features can be re-enabled in most browsers I use). It makes your site inusable to people who need to enlarge the font or something (imagine a 300% resized page in a very small window, which you cannot resize and which is designed to fit the content perfectly.). Users with low visual acuity will hate you, because they are forced to transport the URl to a new window or not able to read the content at all! For reason why your webdesign should be resizable see my post "EM vs. Px" in the How-To/Design sections.Oh and don't pop up windows "onload" ("onmouseover" "onmouseout" "onunload" and so on) because users hate it and a lots of browsers/extensions block it.

Share this post


Link to post
Share on other sites

Personally, I do not use the target attribute, as people, like me, always open an external link in a new tab (never new window) and at the moment, opening tabs is browser dependant. By having no attribute set, the browser will automatically open the link by default (or user) settings.I have to agree with Ruben. Robbing features of a window is pointless, say for example, a person has a link to their site and they only want the border to be shown, they will disable the menu, etc. This is pointless in security and functionality. The first of the two pointless notes, security, if you want the window to open fully, it is very simple. Secondly, the functionality or usability is also depreciated, as you don't have the controls to change certain things or reload (unless you know your keyboard shortcuts ;).

Share this post


Link to post
Share on other sites

Oh and don't pop up windows "onload" ("onmouseover" "onmouseout" "onunload" and so on) because users hate it and a lots of browsers/extensions block it.

1064328611[/snapback]


I don't use such.

 

But why problem is the unsizable window if it is user-friendly. How to enlarge an image then, anyway? With sizable window it is very eye-unfriendly.

Share this post


Link to post
Share on other sites

Hi all! I solved my problem, instead of pop-uping imgs I made for every img its own page so it opens in the same table and looks great! It is really better not to pop-up the eyes of the customer.... Thanks for every one of you!

 

2. question: How is that I use an alt tag for my imgs and IE does show off the text whereas Firefox does not...?

Share this post


Link to post
Share on other sites

Hi bnbrown. Postings like your last post are considered spam.The answer to your question is: The Internet Explorer is behaving wrong by showing the Alt-Text when mouse-overing the image. If you want the same behaviour (showing a description) for both, then define a "title" attribute for the images. It will override the "alt" display in IE.

Share this post


Link to post
Share on other sites

Doublepostings are deprecated, except if they contain new info (then you are supposed to edit your old post, search the forum for that). I do not believe that impatience counts as new info ;) but no worries, I guess it should be ok. It also says in the rules that posts under 25 words will be deleted by the maintenance system because they are counted as irrelevant.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.