Jump to content

Swamped internr desperate for help


rmedjr

Recommended Posts

Hello my name is Rafael and I am an intern at a navy base. I love the opportunity I have been given and relish every challenge I face but lately I have been given some things which I have been stumped with, now things that should be simple elude me and I cannot figure how to fulfill some simple tasks, can anyone help? I am trying to first of all resize an image using only html I don’t think I am allowed to use java script for some reason only HTML I think. The problem is that since I do not have access to the picture I am resizing so I cannot modify the image itself. What I was thinking is doing something like scaling down pictures that were to big so that they are shown no bigger than...say 200 x 200 pixels and no smaller than 10 x 10(I realize that this might blow the picture up when scaling up but I am trying to find another way to do this by asking for bigger pictures). Is there a way for me to scale the picture down from its original size besides actually writing, height="200" width="200", and would this make all pictures even the ones that are smaller than that size change to a 200 by 200 pixel image? Is there now way to just limit the size? Also I have some place marks in a google-earth program that shows a title, picture and details of an object in the description part of some placemarks in the program, I am trying to link the picture with a web page that lists all objects found in the google earth program(which I can and have done) and linking the objects page with the kmz file(done too) the problem is that since I sometimes have more that 10 items in google-earth it is very bothersome and problematic to have 10 different windows with the same content I have tried using the target="_self", "_parent", "_top" and "_blank" tags but I still have 10 windows open. Is there any way that I can fix this so that all the image links open just one window and just go to there respective area on the page? Any help, input or suggestions would be greatly appreciatedThank you for your timeSincerelyRafael.

Link to comment
Share on other sites

So about the image resizing. The problem with resizing is that let's say you have a picture of 1000x1000 and you resize to 200x200. On the size it'll look jagged because of the html resize and even though it's resized to 200x200 on the webpage, the file size is still the 1000x1000 image. The easiest solution is to use an image editor and edit those images to whatever size is best for you, this way the file size is reduced (faster load times) and better image quality on the webpage. If not then you'll probably need to use javascript or a server-side language to resize the images depending on their size. Here's a link to google for scripts: http://www.google.ca/search?client=firefox...G=Google+SearchSecond question I'm not exactly sure but I know with javascript you can specify a name for the window so it'll always open in the same window. You could also use anchors to always open the window at the specific location of the image.http://www.w3schools.com/html/html_links.asp

Link to comment
Share on other sites

But if you really still want to resize the image you could use CSS (natively supposted by HTML):

<img src="large_image.jpg" style="min-width:10px; max-width:200px; min-height:10px; max-height:200px; " />

For a blanket rule, place the <style> tag in your <head> area

<style type="text/css">	img {		min-width:10px;		max-width:200px;		min-height:10px;		max-height:200px;	}</style>

For your second problem, you could try frames but I don't see the relation between Google Earth and HTML...

Link to comment
Share on other sites

I have tried using the target="_self", "_parent", "_top" and "_blank" tags but I still have 10 windows open. Is there any way that I can fix this so that all the image links open just one window and just go to there respective area on the page?
You might try coming up with some other window name, perhaps "g_earth" or something for Google Earth, and then setting the targets to it instead of "_blank" (which will open a new window each time), "_self", "_parent", or "_top".
<a href="somepage.html" target="g_earth">Some Link</a><a href="someotherpage.html" target="g_earth">Some Other Link</a>

Link to comment
Share on other sites

Thanks for your answer and imput, the problem is that we are not allowed to use anything other than HTML because as intern in a navy base we are only allowed to use certain tools to do a job. The tools I was allowed to use was HTML and KML for this project, so I canot use java, it would make things a whole lot easier if I could, though, I know. As to my second question I already have goten the web page to go to the specific location of the image the problem is that I frequently have over 10 images so every time I click on the picture in google earth it opens a new web page(the same as all the other) looking at the image that I cliked on, bnut it is really a problem to have 10 open windows looking at a different section of the same web page. Is there anyway that you can do what you decribed in HTML?Thank you for your time, I really apreciate it

So about the image resizing. The problem with resizing is that let's say you have a picture of 1000x1000 and you resize to 200x200. On the size it'll look jagged because of the html resize and even though it's resized to 200x200 on the webpage, the file size is still the 1000x1000 image. The easiest solution is to use an image editor and edit those images to whatever size is best for you, this way the file size is reduced (faster load times) and better image quality on the webpage. If not then you'll probably need to use javascript or a server-side language to resize the images depending on their size. Here's a link to google for scripts: http://www.google.ca/search?client=firefox...G=Google+SearchSecond question I'm not exactly sure but I know with javascript you can specify a name for the window so it'll always open in the same window. You could also use anchors to always open the window at the specific location of the image.http://www.w3schools.com/html/html_links.asp
Link to comment
Share on other sites

So I can just add this tag before the inside the image attributes tag? to limit the size of the pictures? if, so, aw some that is exactly what I was hoping for. Is there any thing that I should be aware of when using this code fragment? For my second problem, google earth lets you place a type of mini-web page in a place mark so that you can click on it and get information on the place mark you are viewing. It works exactly as if it where a web page but I cant open another web page inside it by using the target="_self" attribute, so whenever I click on the image I have displayed in that mini-web page it opens the web-page with all the objects. The problem I am having is that every time I click on the web pages inside google earth it opens a brand new window of that page, so I can have 100 windos with the same web page, so I am trying to find a way to make all images inside the mini-web pages link to a single page that opens only one page. Sorry for the weird explanation I umm..dont know how else to describe it please contact me if something is not clear. and thank you for you time and input

But if you really still want to resize the image you could use CSS (natively supposted by HTML):
<img src="large_image.jpg" style="min-width:10px; max-width:200px; min-height:10px; max-height:200px; " />

For a blanket rule, place the <style> tag in your <head> area

<style type="text/css">	img {		min-width:10px;		max-width:200px;		min-height:10px;		max-height:200px;	}</style>

For your second problem, you could try frames but I don't see the relation between Google Earth and HTML...

Link to comment
Share on other sites

Thta is actually not a problem if it works in IE7 I believe all our computer have to be updated so everyone should have IE7 and not pose a problem. but if you know of another way that works in both IE7 and previous versions it couldnt hurt to be prepared and have a backup.

@Synook, that will not work in IE6 as min and max are not supported. I believe it is supported in IE7 though.
Link to comment
Share on other sites

PS: are you sure this code works in IE7? I tried using it and the only thing it does is that when I use blanket rule the image comes out with a little more width a nd just a bit less height but just barely noticable any ideas as to why this might happen?

But if you really still want to resize the image you could use CSS (natively supposted by HTML):
<img src="large_image.jpg" style="min-width:10px; max-width:200px; min-height:10px; max-height:200px; " />

For a blanket rule, place the <style> tag in your <head> area

<style type="text/css">	img {		min-width:10px;		max-width:200px;		min-height:10px;		max-height:200px;	}</style>

For your second problem, you could try frames but I don't see the relation between Google Earth and HTML...

Link to comment
Share on other sites

That rule will force all images to have widths and heights between 10px and 200px, so if your image was 9px by 202px, it will be resized to 10px by 200px. Err... are you sure there isn't a conflicting rule?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...