IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> html codes
LoLo
post Dec 31 2008, 06:04 AM
Post #1


Kiefer > Jason
**************

Group: Admin
Posts: 9,704
Joined: 26-February 03
From: UK
Member No.: 51
Gender: Female



This makes me feel stupid because I've been hired to do a web site and I know how to make them, but I can't remember how to make an image open in a new window (have this half down it's the next half I need help with) and have the window be the exact size of the image rather than a full size web page.

Any thoughts?


--------------------


Being Pimped By Aries Since 2003
Go to the top of the page
 
+Quote Post
CrazyFooIAintGet...
post Dec 31 2008, 12:42 PM
Post #2


Has been kidnapped by gerbils and forced to post on here repeatedly
***********

Group: Established Members
Posts: 1,088
Joined: 18-September 03
From: London
Member No.: 606
Gender: Female



Yeah, don't. Links than open in new windows are really annoying. dry.gif

But if you must then I guess you need to use javascript. The examples here seem to do what you want. Only you'd have to call the function from the "a" tag like so:

CODE
<script type="text/javascript">
function open_win() {
myWindow=window.open('image_name.jpg','_blank','width=200,height=100')
myWindow.focus()
}
</script>
<a onclick="open_win()">Click to see the image</a>


--------------------
Kung fu fighting from 25th April 2010
Go to the top of the page
 
+Quote Post
LoLo
post Dec 31 2008, 03:52 PM
Post #3


Kiefer > Jason
**************

Group: Admin
Posts: 9,704
Joined: 26-February 03
From: UK
Member No.: 51
Gender: Female



Thank you that worked, now to just go back and fix the 90 some odd pages I've already done. haha

Oh and I know you may find it annoying, but it is serving a purpose or else I wouldn't be adding it in.


--------------------


Being Pimped By Aries Since 2003
Go to the top of the page
 
+Quote Post
Mata
post Dec 31 2008, 04:38 PM
Post #4


'Trouble Down Pit' now online!
***************

Group: Admin
Posts: 10,205
Joined: 22-February 03
From: Southern UK
Member No.: 1
Gender: Male



If you find the code that you'd been trying to use then you could always do a find-and-replace on all those pages. Do it individually for the part of the code before the link and the part afterwards, so the link remains intact.

If you're using Dreamweaver, you might want to set up page templates, that way you could update everything all in one go. They've made my life enormously easier over the years.


--------------------
Trouble Down Pit: Still updated every Monday and Friday
The Matazone Games blog
The Matazone Shop The Matazone Blog
The Matazone Corset Shop: Snobz corsets at 10% off their recommended price!
Go to the top of the page
 
+Quote Post
Greeneyes
post Jan 3 2009, 12:01 PM
Post #5


The Key of Joy is disobedience.
************

Group: Established Members
Posts: 2,093
Joined: 4-May 04
From: The UK of GB and NI.
Member No.: 1,102
Gender: Male



The html for it is the attribute target="_blank" in the anchor tag.

CODE
<a href="whatever.jpg" target="_blank">Whatever</a>


Saves relying on scripting, which some people disable.


--------------------
Waiting for a superhero intervention
Go to the top of the page
 
+Quote Post
CrazyFooIAintGet...
post Jan 3 2009, 06:57 PM
Post #6


Has been kidnapped by gerbils and forced to post on here repeatedly
***********

Group: Established Members
Posts: 1,088
Joined: 18-September 03
From: London
Member No.: 606
Gender: Female



^ That will open it in a new window, but not resize it to the same size as the image


--------------------
Kung fu fighting from 25th April 2010
Go to the top of the page
 
+Quote Post
leopold
post Jan 5 2009, 04:21 PM
Post #7


Absentee Mod
**************

Group: Moderators
Posts: 8,691
Joined: 4-March 03
From: On the face of the planet, somewhere north of Guildford
Member No.: 95
Gender: Male



QUOTE (crazymat @ Dec 31 2008, 12:42 PM) *
Yeah, don't. Links than open in new windows are really annoying. dry.gif

Ordinarily, I'd agree. However, at online stores I much prefer a popup for the item I'm looking at, as it saves incessantly reloading pages I'd rather leave, especially with item searches. Perhaps that's just me, though.


--------------------
Insert humorous comment here
Go to the top of the page
 
+Quote Post
LoLo
post Jan 5 2009, 04:25 PM
Post #8


Kiefer > Jason
**************

Group: Admin
Posts: 9,704
Joined: 26-February 03
From: UK
Member No.: 51
Gender: Female



That's very similar to why I used them. I was creating a business directory with photographs of the businesses that when you clicked them, let you see the photo larger and also had a note at the bottom that told the businesses locations and hours. I figured a small pop up was a lot less annoying than reloading anytime you wanted to see the small picture bigger.

On a side note, finished the job yesterday....somethings I wish I did better, but I think that's going to be a theme with most of my jobs, because they're never perfect. I have a week off and then I start on another web site....hopefully after that one there will be another one. lol


--------------------


Being Pimped By Aries Since 2003
Go to the top of the page
 
+Quote Post
leopold
post Jan 5 2009, 04:37 PM
Post #9


Absentee Mod
**************

Group: Moderators
Posts: 8,691
Joined: 4-March 03
From: On the face of the planet, somewhere north of Guildford
Member No.: 95
Gender: Male



So it's not just me, then. Lo, you sound like my kind of web developist.


--------------------
Insert humorous comment here
Go to the top of the page
 
+Quote Post
Moosh
post Jan 5 2009, 05:04 PM
Post #10


I plug directly into my computer
************

Group: Established Members
Posts: 3,643
Joined: 18-November 04
From: Manchester
Member No.: 1,488
Gender: Male



I do find them annoying but that's partly my own fault. For various other reasons I have my firefox set up so that something that would be a small pop-up will open in a new tab in the background. So far so good, but if it's a re-sizing thing then it'll resize the whole firefox window, which is the annoying part, as quite often I'll want to do a few thing in other tabs before I get around to looking at the pop-up tab, so I'll have to make the window bigger again.

Also, it sets the default size of the window when not maximised to something other than I want it, so I have to resize it myself back to what I want.


--------------------
QUOTE (Peter Griffin)
Math, my dear boy, is nothing more than the lesbian sister of biology.
Go to the top of the page
 
+Quote Post
LoLo
post Feb 1 2009, 04:02 AM
Post #11


Kiefer > Jason
**************

Group: Admin
Posts: 9,704
Joined: 26-February 03
From: UK
Member No.: 51
Gender: Female



God they really didn't get me ready for this in school...

One of my clients has requested I buy a domain name and then have it forwarded to their main page. I've been able to track down the meta code needed to make this happen, but I have a question for those who may have experience with this...

They want to do this to save money instead of paying for a whole page. Is it just the cost of the domain name to do this? My brain doesn't seem to want to wrap itself around the thought that you don't have to pay hosting fees to someone on top of the domain registration to even have the page forwarded on. They've done this before with someone else so I'm guessing it's the case, but how do I get the meta code on there if all I do is buy the domain?


--------------------


Being Pimped By Aries Since 2003
Go to the top of the page
 
+Quote Post
Greeneyes
post Feb 2 2009, 04:35 PM
Post #12


The Key of Joy is disobedience.
************

Group: Established Members
Posts: 2,093
Joined: 4-May 04
From: The UK of GB and NI.
Member No.: 1,102
Gender: Male



QUOTE (LoLo @ Feb 1 2009, 04:02 AM) *
God they really didn't get me ready for this in school...

One of my clients has requested I buy a domain name and then have it forwarded to their main page. I've been able to track down the meta code needed to make this happen, but I have a question for those who may have experience with this...

They want to do this to save money instead of paying for a whole page. Is it just the cost of the domain name to do this? My brain doesn't seem to want to wrap itself around the thought that you don't have to pay hosting fees to someone on top of the domain registration to even have the page forwarded on. They've done this before with someone else so I'm guessing it's the case, but how do I get the meta code on there if all I do is buy the domain?


That sounds to me like you just want to point the new domain's nameserver entries to wherever your client's nameservers are. From there, they should be able to sort the redirection out using their current hosting (using a control panel or config files or whatever they use). Only fee would be the domain, assuming the hosting doesn't have particularly restrictive rules regarding adding domains (which I would assume they don't).

If they're just going to have the same website mounted on two domains though, you might want to have the new domain go toa little server script which issues a permanent (301) redirect to thhe other domain, rather than use meta. Better for search engines, and means you end up with one canonical domain, rather than mirrored content. There's a nice list of ways to do it in various languages here.

Anyway, hopefully that's what you're looking for.


--------------------
Waiting for a superhero intervention
Go to the top of the page
 
+Quote Post
CrazyFooIAintGet...
post Feb 2 2009, 06:02 PM
Post #13


Has been kidnapped by gerbils and forced to post on here repeatedly
***********

Group: Established Members
Posts: 1,088
Joined: 18-September 03
From: London
Member No.: 606
Gender: Female



I looked on godaddy, (where I bought my domain from) and theres an option on there to automagically set up a permanent or temporary redirect to another site. So maybe have a look at the config page for the new domain before you try anything more complicated?

*edit* this is assuming you want both domains to point to the same site


--------------------
Kung fu fighting from 25th April 2010
Go to the top of the page
 
+Quote Post
LoLo
post Feb 2 2009, 06:50 PM
Post #14


Kiefer > Jason
**************

Group: Admin
Posts: 9,704
Joined: 26-February 03
From: UK
Member No.: 51
Gender: Female



Yeah I just want to buy a domain and have it point to their existing site.


--------------------


Being Pimped By Aries Since 2003
Go to the top of the page
 
+Quote Post
LoLo
post Feb 4 2009, 04:19 AM
Post #15


Kiefer > Jason
**************

Group: Admin
Posts: 9,704
Joined: 26-February 03
From: UK
Member No.: 51
Gender: Female



I got it taken care of, thanks for all the info. I can't believe it was as simple as registering the domain and then just telling it to be forwarded on some config page. I feel kind of silly now.


--------------------


Being Pimped By Aries Since 2003
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 19th October 2017 - 06:20 PM
Use these links if you're going to shop at Amazon and a percentage of what you spend goes towards helping this site!