Q:How to "drag and drop" jpg's into html and have the code write itself?

M

mr_cross

Hi. It's been a very long time since I did any extensive html coding,
so all I recall are the basics. I'm looking to create a web site with a
lot of jpg pictures divided among several web pages. Is there an html
program out there that will allow me to just drag and drop the jpg's
into my html code without the need to cut and paste the name of each
individual jpg? Thanks.
 
N

Nico Schuyt

mr_cross said:
Hi. It's been a very long time since I did any extensive html coding,
so all I recall are the basics. I'm looking to create a web site with
a lot of jpg pictures divided among several web pages. Is there an
html program out there that will allow me to just drag and drop the
jpg's into my html code without the need to cut and paste the name of
each individual jpg? Thanks.

Names are not enough. You need properties like width, height and alt too.
Most editors can do that (try NVU; http://www.nvu.com/index.php)

If you have a lot of images, you can show all files in a certain map with
some scripting like:

<?php
//$map is the directory with the images
$map="/images";
if ($handle = opendir($map)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") { //Skip root and submaps
$pict=$map.$file;
list($width, $height) = getimagesize($foto);
echo "<p><img src='".$pict."' width='".$width."'
height='".$height."'><br>\n";
echo $file."</p>\n";
}
}
closedir($handle);
}
?>
 
T

Travis Newbury

mr_cross said:
Hi. It's been a very long time since I did any extensive html coding,
so all I recall are the basics. I'm looking to create a web site with a
lot of jpg pictures divided among several web pages. Is there an html
program out there that will allow me to just drag and drop the jpg's
into my html code without the need to cut and paste the name of each
individual jpg? Thanks.

Yes, download any wysiwyg HTML editor (they all offer a demo version)
and do it with that. My choice would be dreamweaver, but there are
plenty out there
 
S

Sid

On 8 Oct 2006 21:34:40 -0700, "mr_cross" <[email protected]>
wrote:

: Hi. It's been a very long time since I did any extensive html coding,
: so all I recall are the basics. I'm looking to create a web site with a
: lot of jpg pictures divided among several web pages. Is there an html
: program out there that will allow me to just drag and drop the jpg's
: into my html code without the need to cut and paste the name of each
: individual jpg? Thanks.


Freeware Aranaea (or Homesite) - two clicks per image. Inserts
height, width and gives you the option to insert alt for each image.

Sid
 
J

jojo

Travis said:
Yes, download any wysiwyg HTML editor (they all offer a demo version)
and do it with that. My choice would be dreamweaver, but there are
plenty out there

But please, mr_cross, just keep away from "MS Frontpage"... It just
creates terrible code...
 
J

jojo

Sid said:
Freeware Aranaea (or Homesite) - two clicks per image. Inserts
height, width and gives you the option to insert alt for each image.

....which is necessary if you want to follow the specs (at least html 4
strict requires an alt attribute, not sure about transitional).
 
T

Travis Newbury

jojo said:
...which is necessary if you want to follow the specs (at least html 4
strict requires an alt attribute, not sure about transitional).

Based on the question I don't believe that following the specs is
important. The OP just wants an easy way to put the images there.
 
T

Toby Inkster

Nico said:
Names are not enough. You need properties like width, height and alt too.

Alt text, sure. Width and Height are nice to have if they're not too much
effort to enter, but you can get by without them.
 
N

Nico Schuyt

Toby said:
Nico Schuyt wrote:
Alt text, sure. Width and Height are nice to have if they're not too
much effort to enter, but you can get by without them.

Missing height and width result in problems with rendering the site
('jumping'). I suppose a browser is able to retreive those properties, but
that will slow down the site. A missing alt text however can easily be
replaced by a browser with alt="".
 
D

dorayme

"Nico Schuyt said:
Missing height and width result in problems with rendering the
site ('jumping'). Missing height and width result in problems with rendering the site
('jumping'). I suppose a browser is able to retreive those properties,

They don't just guess randomly. Toby is right, you can 'get by'
without them, and in some situations it is worth it considering
the alternative - mountains of boring clerical work. But true, it
is usually nicer to have them in to avoid the "jumpiness" you
refer to.

However, and here is my incisive contribution for the day, one
can take advantage of this jumpiness and make it a feature. Use
it to be really cool in some respect or other. Now... please do
not be greedy and ask for details. Be thankful for the strategic
and creative idea.
 
N

Nico Schuyt

They don't just guess randomly.

You'r right of course. The browser 'knows' the size after downloading the
page. To avoid jumping the browser has to wait until the page is complete
before showing. Slows down unnecessarily.
Toby is right, you can 'get by'
without them, and in some situations it is worth it considering
the alternative - mountains of boring clerical work. But true, it
is usually nicer to have them in to avoid the "jumpiness" you
refer to.
However, and here is my incisive contribution for the day, one
can take advantage of this jumpiness and make it a feature. Use
it to be really cool in some respect or other. Now... please do
not be greedy and ask for details.

Please give me some details :)
Be thankful for the strategic and creative idea.

Disadvantage is that the effect is only shown one time.
 
D

dorayme

However, and here is my incisive contribution for the day, one
can take advantage of this jumpiness and make it a feature. Use
it to be really cool in some respect or other. Now... please do
not be greedy and ask for details.

Please give me some details :)
Be thankful for the strategic and creative idea.

Disadvantage is that the effect is only shown one time.
[/QUOTE]

Not necessarily Nico! If the pictures are loaded by a randomising
script and have different sizes, the secret cool effect I have in
mind would be variations on a theme. I am not claiming it would
rival Beethoven... just possibly a more minor composer though...
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,736
Latest member
zacharyharris

Latest Threads

Top