By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,648 Members | 1,206 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,648 IT Pros & Developers. It's quick & easy.

loading images into current page

P: n/a
thanks to all who helped steer me away from 'slicing' photoshop images to
positioning with css.

new question:

i have a web page that has a navbar, simple text links. each of these links
will eventually load a series of thumbnail images. clicking on the
thumbnails will show a larger version in an area to the right. although the
page isn't really functional yet, you can view it at www.momeara.com.

the main question is this: as you click the thumbnails the larger image
appears at the right. how do i do this without making a new page for each
image? can i just load a new image into the page without having to make a
link to a completely new page?
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
salty_dogs wrote:
although the page isn't really functional yet, you can view it at
www.momeara.com.


"not really functional" is an understatement.

Some advice:

(*) The language attribute for <script> is deprecated.
(*) JScript is a Microsoft specific JavaScript dialect - poo is undefined
for at least some other browsers
(*) Seeing that a link will take them to "poo" does not a good impression
make on your visitors.
(*) http://validator.w3.org/
(*) Popups suck. REALLY suck. http://www.allmyfaqs.com/faq.pl?AnySizeDesign
(*) href="javascript:..." sucks too. Put a real URL in there. If you need to
trigger JavaScript from a link (hint: You don't becuase you don't need to
open a new window), use the onclick event.
(*) Lots of people run at 800x600 or less anyway. Its really dumb to open a
window wider then the screen!
(*) The alt attribute is required for images, and well done - you've put on
in. Its a shame that its blank, making the link useless if images are not
available. http://ppewww.ph.gla.ac.uk/%7Eflavell/alt/alt-text.html
(*) OK, so technically the link should look something like: _>_, but most
browsers don't handle /> correctly (which is why XHTML 1.0 Appendix C
'works')

I don't know how bad the actual site is, I didn't feel like parsing the
JScript in my head and keying in the new URL manually.

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #2

P: n/a
thanks david:

not to make excuses, i had never even looked at an html document before last
week. i'm really only doing this as a way to present my portfolio in a job
search. i've decided not to spend a 1000 clams on a hard copy. anyway...

i've taken out the lang attribute, now its just <script>

i really don't know where 'poo' came from, and you're right, i wouldn't want
to be linking to 'poo.' looking at other js, the word after 'function' is
user defined? so if i use <<onclick="whatever">> this will call the <<
function whatever() >> in the script? i guess i really don't have time to
learn js for this project.

i don't like the popup thing either, but maybe if the index page closes
'onmousedown' it will seem more like a resizing? i see the point about
800x600. i'm going to be very specific about how this site is used and who
sees it. if the firm i'm applying to doesn't have monitors set to 1024x768
or above, i really don't think there going to be doing the kind of work i'm
interested in. (cad/cam/graphics) what do you use?

finally, how do you suppress the note that pops up if hovering over an image
with the 'alt' attribute set? that i find more annoying than if the image
were not there.

i guess we all have to start somewhere. thanks for your comments
mike

"David Dorward" <do*****@yahoo.com> wrote in message
news:bo*******************@news.demon.co.uk...
salty_dogs wrote:
although the page isn't really functional yet, you can view it at
www.momeara.com.
"not really functional" is an understatement.

Some advice:

(*) The language attribute for <script> is deprecated.
(*) JScript is a Microsoft specific JavaScript dialect - poo is undefined
for at least some other browsers
(*) Seeing that a link will take them to "poo" does not a good impression
make on your visitors.
(*) http://validator.w3.org/
(*) Popups suck. REALLY suck.

http://www.allmyfaqs.com/faq.pl?AnySizeDesign (*) href="javascript:..." sucks too. Put a real URL in there. If you need to trigger JavaScript from a link (hint: You don't becuase you don't need to
open a new window), use the onclick event.
(*) Lots of people run at 800x600 or less anyway. Its really dumb to open a window wider then the screen!
(*) The alt attribute is required for images, and well done - you've put on in. Its a shame that its blank, making the link useless if images are not
available. http://ppewww.ph.gla.ac.uk/%7Eflavell/alt/alt-text.html
(*) OK, so technically the link should look something like: _>_, but most
browsers don't handle /> correctly (which is why XHTML 1.0 Appendix C
'works')

I don't know how bad the actual site is, I didn't feel like parsing the
JScript in my head and keying in the new URL manually.

--
David Dorward http://dorward.me.uk/

Jul 20 '05 #3

P: n/a
Quoth the raven named salty_dogs:

<snip>
finally, how do you suppress the note that pops up if hovering over an image
with the 'alt' attribute set? that i find more annoying than if the image
were not there.


Commonly referred to as a tooltip. Most browsers render any text set
in the title attribute. Certain broken operating system components
mistakenly display the alt attribute if there is no title attribute.

Type this into a page:
<img title="This is title" alt="This is alt" src=... >

and see what happens in various browsers. Remove the title= and look
again, especially in Internet Explorer.

<snip TOFU>

--
-bts
-This space intentionally left blank.

Jul 20 '05 #4

P: n/a
salty_dogs wrote:

the main question is this: as you click the thumbnails the larger
image appears at the right. how do i do this without making a new
page for each image? can i just load a new image into the page
without having to make a link to a completely new page?


Yes you could, but you run into additional problems (like bookmarks,
visitors coming from search engines) so that I wouldn't suggest doing
so. Better is to do it server-side; have one "template" (e.g. a PHP,
ASP, PY, PL page) and handle it with URLs like <photo.php?id=beach>. If
you want to switch via DHTML (the sub-optimal solution), use DHTML (a
combination of absolutely-positioned div-layers put over each other,
their display-property dynamically changing).

--
Google Blogoscoped
http://blog.outer-court.com
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.