Re: Preview of an Image and text

2004-12-19 Thread amin
Since we are on this topic, any ideas on how to build images from a
webpage which is downloaded automatically into a database or a file
system. Eg would  be google desktop style, where a thumbnail appears of a
html page beside a search item.

Regards,
Amin


 Just carry the path of the file, not the image itself.  When you submit
 the form you can get at that information (I believe, if not just grab it
 via JavaScript on the form submission and stick it in a hidden field).
 Then, when yout next JSP executes, you have the path to the file and you
 construct the img path:

 img src=%=file://+myForm.getPathToImageUserSelected()$

 Something like that.  The basic idea is that the JSP you send back as a
 result of the form submission is displaying the image from the user's
 PC, not your server.  You just need to append the file:// part of the
 image's URI at some point.

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com

 uma.k wrote:
 Hi Frank,
 Thanks for the reply. Your solution works good if I have to show preview
 in
 the same page but I what if I need to show preview in the next JSP? How
 do I
 carry the values/images?

 Uma

 -Original Message-
 From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 17, 2004 10:44 PM
 To: Struts Users Mailing List
 Subject: Re: Preview of an Image and text


 You might consider doing it all on the client...

 html
 head
 titletest/title
 script
 function preview() {
 lyrPreview.innerHTML = ;
 lyrPreview.innerHTML += Some message text...br;
 lyrPreview.innerHTML += img src=\file:// + theForm.theFile.value +
 \;
 }
 /script
 /head
 body
 Select file, then click button to preview:br
 form name=theForm
 input type=file name=theFile
 input type=button onClick=preview(); value=Preview message
 /form
 brbr
 uPreview:/ubrbr
 span id=lyrPreview/span
 /body
 /html

 Works on IE, can't say whether it does on anything else.  Of course,
 this will only work if you have enough information to construct the
 complete preview on the client at that point, but you could
 alternatively submit the form, then in the reply construct the file://
 reference to the image as I've done above.  That would probably give you
 the best of both worlds, and also remove any cross-browser concerns.
 But, if you can do it without touching the server, so much the better I
 figure.

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com

 uma.k wrote:

Hi,
I have a form where the user is given the option to select a file to
upload(normally gif or jpg) before the user submits the file to the

 server,

I wanted to show him a preview of his message and image.

How do I do that? Where do I store the image temporarly?

Any solutions?

Uma


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]










 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]









 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Preview of an Image and text

2004-12-19 Thread Frank W. Zammetti
Hmm, that's one I've never tried... Just to be sure I understand, you 
basically want to be able to render a page and then produce an image of 
it, and store that either to a database or file system?  If so, that's 
certainly an interesting request...

I can't vouch for this program, I just looked at it for the first time, 
but check out HTTP2IMmageat www.sysimage.com.  It's interesting because 
it has a command-line component.  Assuming you are on Windows of course, 
although I'm sure similar programs can be found for your favorite *nix 
variant if you need it, this might be an answer...

You could write the results of the JSP out to a file (not sure the best 
way to do this), then shell out to this program to generate the image, 
then do whatever you want with it.  I'm oversimplifying things of 
course, but the idea is what's important.

Alternatively, assuming still that you are on Windows, you could always 
make use of IE itself... You'd have to look around, but one of the 
features I remember is being able to ask the render engine to render to 
an off-screen buffer, and you should have little difficulty getting a 
proper image from that, assuming you made it that far :)  Me personally, 
I'd go with something like HTTP2IMmage... My Windows-specific 
programming these days is limited to PocketPC development, not sure I'd 
want to get into anything too deep on the desktop these days.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
[EMAIL PROTECTED] wrote:
Since we are on this topic, any ideas on how to build images from a
webpage which is downloaded automatically into a database or a file
system. Eg would  be google desktop style, where a thumbnail appears of a
html page beside a search item.
Regards,
Amin

Just carry the path of the file, not the image itself.  When you submit
the form you can get at that information (I believe, if not just grab it
via JavaScript on the form submission and stick it in a hidden field).
Then, when yout next JSP executes, you have the path to the file and you
construct the img path:
img src=%=file://+myForm.getPathToImageUserSelected()$
Something like that.  The basic idea is that the JSP you send back as a
result of the form submission is displaying the image from the user's
PC, not your server.  You just need to append the file:// part of the
image's URI at some point.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
uma.k wrote:
Hi Frank,
Thanks for the reply. Your solution works good if I have to show preview
in
the same page but I what if I need to show preview in the next JSP? How
do I
carry the values/images?
Uma
-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: Friday, December 17, 2004 10:44 PM
To: Struts Users Mailing List
Subject: Re: Preview of an Image and text
You might consider doing it all on the client...
html
head
titletest/title
script
function preview() {
lyrPreview.innerHTML = ;
lyrPreview.innerHTML += Some message text...br;
lyrPreview.innerHTML += img src=\file:// + theForm.theFile.value +
\;
}
/script
/head
body
Select file, then click button to preview:br
form name=theForm
input type=file name=theFile
input type=button onClick=preview(); value=Preview message
/form
brbr
uPreview:/ubrbr
span id=lyrPreview/span
/body
/html
Works on IE, can't say whether it does on anything else.  Of course,
this will only work if you have enough information to construct the
complete preview on the client at that point, but you could
alternatively submit the form, then in the reply construct the file://
reference to the image as I've done above.  That would probably give you
the best of both worlds, and also remove any cross-browser concerns.
But, if you can do it without touching the server, so much the better I
figure.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
uma.k wrote:

Hi,
I have a form where the user is given the option to select a file to
upload(normally gif or jpg) before the user submits the file to the
server,

I wanted to show him a preview of his message and image.
How do I do that? Where do I store the image temporarly?
Any solutions?
Uma
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED

Re: Preview of an Image and text

2004-12-18 Thread Jay Chandran
;
 document.frm.imageName.src = Img.src;

}

The function is a java script which is called when the jsp page loads. ie
call getURLString() when this page loads and as shown below.
BODY bgColor=#ff onLoad=getURLString()


There should be a hidden variable of T1 whose value is the path of the image
(eg c:\\image.jpg) in ur jsp page as shown below.
input type=hidden name=T1 size=39 value=imagePath

Last ur jsp file should contain a image tag for display of image.
img border=0 name =imageName src=

The value of the hidden name (imagePath) should be passed from the java
action file.




- Original Message -
From: uma.k [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Saturday, December 18, 2004 11:54 AM
Subject: RE: Preview of an Image and text


 Hi Frank,
 Thanks for the reply. Your solution works good if I have to show preview
in
 the same page but I what if I need to show preview in the next JSP? How do
I
 carry the values/images?

 Uma

 -Original Message-
 From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 17, 2004 10:44 PM
 To: Struts Users Mailing List
 Subject: Re: Preview of an Image and text


 You might consider doing it all on the client...

 html
 head
 titletest/title
 script
 function preview() {
 lyrPreview.innerHTML = ;
 lyrPreview.innerHTML += Some message text...br;
 lyrPreview.innerHTML += img src=\file:// + theForm.theFile.value +
 \;
 }
 /script
 /head
 body
 Select file, then click button to preview:br
 form name=theForm
 input type=file name=theFile
 input type=button onClick=preview(); value=Preview message
 /form
 brbr
 uPreview:/ubrbr
 span id=lyrPreview/span
 /body
 /html

 Works on IE, can't say whether it does on anything else.  Of course,
 this will only work if you have enough information to construct the
 complete preview on the client at that point, but you could
 alternatively submit the form, then in the reply construct the file://
 reference to the image as I've done above.  That would probably give you
 the best of both worlds, and also remove any cross-browser concerns.
 But, if you can do it without touching the server, so much the better I
 figure.

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com

 uma.k wrote:
  Hi,
  I have a form where the user is given the option to select a file to
  upload(normally gif or jpg) before the user submits the file to the
 server,
  I wanted to show him a preview of his message and image.
 
  How do I do that? Where do I store the image temporarly?
 
  Any solutions?
 
  Uma
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Preview of an Image and text

2004-12-18 Thread bryan
Works good with firefox as well , seems like a damned good simple
solution to me.

Hey did you see Brady Hegberg's post for dynamic dropdown list's, I
reckon you'll like it as well,
also cross platform.

quote
If you wanted to be a bit more ambitious you could also try implimenting
this:
http://developer.apple.com/internet/webcontent/xmlhttpreq.html

Brady
/quote
--b


On Fri, 17 Dec 2004 12:14:06 -0500, Frank W. Zammetti
[EMAIL PROTECTED] wrote:
 You might consider doing it all on the client...
 
 html
 head
 titletest/title
 script
 function preview() {
 lyrPreview.innerHTML = ;
 lyrPreview.innerHTML += Some message text...br;
 lyrPreview.innerHTML += img src=\file:// + theForm.theFile.value +
 \;
 }
 /script
 /head
 body
 Select file, then click button to preview:br
 form name=theForm
 input type=file name=theFile
 input type=button onClick=preview(); value=Preview message
 /form
 brbr
 uPreview:/ubrbr
 span id=lyrPreview/span
 /body
 /html
 
 Works on IE, can't say whether it does on anything else.  Of course,
 this will only work if you have enough information to construct the
 complete preview on the client at that point, but you could
 alternatively submit the form, then in the reply construct the file://
 reference to the image as I've done above.  That would probably give you
 the best of both worlds, and also remove any cross-browser concerns.
 But, if you can do it without touching the server, so much the better I
 figure.
 
 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 
 uma.k wrote:
  Hi,
  I have a form where the user is given the option to select a file to
  upload(normally gif or jpg) before the user submits the file to the server,
  I wanted to show him a preview of his message and image.
 
  How do I do that? Where do I store the image temporarly?
 
  Any solutions?
 
  Uma
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Preview of an Image and text

2004-12-18 Thread Frank W. Zammetti
Just carry the path of the file, not the image itself.  When you submit 
the form you can get at that information (I believe, if not just grab it 
via JavaScript on the form submission and stick it in a hidden field). 
Then, when yout next JSP executes, you have the path to the file and you 
construct the img path:

img src=%=file://+myForm.getPathToImageUserSelected()$
Something like that.  The basic idea is that the JSP you send back as a 
result of the form submission is displaying the image from the user's 
PC, not your server.  You just need to append the file:// part of the 
image's URI at some point.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
uma.k wrote:
Hi Frank,
Thanks for the reply. Your solution works good if I have to show preview in
the same page but I what if I need to show preview in the next JSP? How do I
carry the values/images?
Uma
-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: Friday, December 17, 2004 10:44 PM
To: Struts Users Mailing List
Subject: Re: Preview of an Image and text
You might consider doing it all on the client...
html
head
titletest/title
script
function preview() {
lyrPreview.innerHTML = ;
lyrPreview.innerHTML += Some message text...br;
lyrPreview.innerHTML += img src=\file:// + theForm.theFile.value +
\;
}
/script
/head
body
Select file, then click button to preview:br
form name=theForm
input type=file name=theFile
input type=button onClick=preview(); value=Preview message
/form
brbr
uPreview:/ubrbr
span id=lyrPreview/span
/body
/html
Works on IE, can't say whether it does on anything else.  Of course,
this will only work if you have enough information to construct the
complete preview on the client at that point, but you could
alternatively submit the form, then in the reply construct the file://
reference to the image as I've done above.  That would probably give you
the best of both worlds, and also remove any cross-browser concerns.
But, if you can do it without touching the server, so much the better I
figure.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
uma.k wrote:
Hi,
I have a form where the user is given the option to select a file to
upload(normally gif or jpg) before the user submits the file to the
server,
I wanted to show him a preview of his message and image.
How do I do that? Where do I store the image temporarly?
Any solutions?
Uma
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Preview of an Image and text

2004-12-17 Thread fzlists
You might consider doing it all on the client...

html
head
titletest/title
script
function preview() {
lyrPreview.innerHTML = ;
lyrPreview.innerHTML += Some message text...br;
lyrPreview.innerHTML += img src=\file:// + theForm.theFile.value + \;
}
/script
/head
body
Select file, then click button to preview:br
form name=theForm
input type=file name=theFile
input type=button onClick=preview(); value=Preview message
/form
brbr
uPreview:/ubrbr
span id=lyrPreview/span
/body
/html

Works on IE, can't say whether it does on anything else.  Of course, this will 
only work if you have enough information to construct the complete preview on 
the client at that point, but you could alternatively submit the form, then in 
the reply construct the file:// reference to the image as I've done above.  
That would probably give you the best of both worlds, and also remove any 
cross-browser concerns. But, if you can do it without touching the server, so 
much the better I figure.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

uma.k wrote:

 Hi,
 I have a form where the user is given the option to select a file to
 upload(normally gif or jpg) before the user submits the file to the server,
 I wanted to show him a preview of his message and image.

 How do I do that? Where do I store the image temporarly?

 Any solutions?

 Uma


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Preview of an Image and text

2004-12-17 Thread Frank W. Zammetti
You might consider doing it all on the client...
html
head
titletest/title
script
function preview() {
lyrPreview.innerHTML = ;
lyrPreview.innerHTML += Some message text...br;
lyrPreview.innerHTML += img src=\file:// + theForm.theFile.value + 
\;
}
/script
/head
body
Select file, then click button to preview:br
form name=theForm
input type=file name=theFile
input type=button onClick=preview(); value=Preview message
/form
brbr
uPreview:/ubrbr
span id=lyrPreview/span
/body
/html

Works on IE, can't say whether it does on anything else.  Of course, 
this will only work if you have enough information to construct the 
complete preview on the client at that point, but you could 
alternatively submit the form, then in the reply construct the file:// 
reference to the image as I've done above.  That would probably give you 
the best of both worlds, and also remove any cross-browser concerns. 
But, if you can do it without touching the server, so much the better I 
figure.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
uma.k wrote:
Hi,
I have a form where the user is given the option to select a file to
upload(normally gif or jpg) before the user submits the file to the server,
I wanted to show him a preview of his message and image.
How do I do that? Where do I store the image temporarly?
Any solutions?
Uma
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Preview of an Image and text

2004-12-17 Thread Wendy Smoak
From: uma.k [EMAIL PROTECTED]
 I have a form where the user is given the option to select a file to
 upload(normally gif or jpg) before the user submits the file to the
server,
 I wanted to show him a preview of his message and image.
 How do I do that? Where do I store the image temporarly?
 Any solutions?

Do you expect most of the images to be previewed and then accepted?  It
might make sense to go ahead and put them where ever they're going to go for
real, and then run a cleanup job to get rid of the ones where the user
didn't finish the process.

-- 
Wendy Smoak


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Preview of an Image and text

2004-12-17 Thread uma.k
Hi Wendy,
Thanks for the solution. Yes there are 3 images that the user can preview.
But how do I activate a clean up process? There might be 1000's of images
that are actually used. Are you saying to do this job manually?

Uma

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Friday, December 17, 2004 10:54 PM
To: Struts Users Mailing List
Subject: Re: Preview of an Image and text


From: uma.k [EMAIL PROTECTED]
 I have a form where the user is given the option to select a file to
 upload(normally gif or jpg) before the user submits the file to the
server,
 I wanted to show him a preview of his message and image.
 How do I do that? Where do I store the image temporarly?
 Any solutions?

Do you expect most of the images to be previewed and then accepted?  It
might make sense to go ahead and put them where ever they're going to go for
real, and then run a cleanup job to get rid of the ones where the user
didn't finish the process.

--
Wendy Smoak


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Preview of an Image and text

2004-12-17 Thread uma.k
Hi Frank,
Thanks for the reply. Your solution works good if I have to show preview in
the same page but I what if I need to show preview in the next JSP? How do I
carry the values/images?

Uma

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: Friday, December 17, 2004 10:44 PM
To: Struts Users Mailing List
Subject: Re: Preview of an Image and text


You might consider doing it all on the client...

html
head
titletest/title
script
function preview() {
lyrPreview.innerHTML = ;
lyrPreview.innerHTML += Some message text...br;
lyrPreview.innerHTML += img src=\file:// + theForm.theFile.value +
\;
}
/script
/head
body
Select file, then click button to preview:br
form name=theForm
input type=file name=theFile
input type=button onClick=preview(); value=Preview message
/form
brbr
uPreview:/ubrbr
span id=lyrPreview/span
/body
/html

Works on IE, can't say whether it does on anything else.  Of course,
this will only work if you have enough information to construct the
complete preview on the client at that point, but you could
alternatively submit the form, then in the reply construct the file://
reference to the image as I've done above.  That would probably give you
the best of both worlds, and also remove any cross-browser concerns.
But, if you can do it without touching the server, so much the better I
figure.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

uma.k wrote:
 Hi,
 I have a form where the user is given the option to select a file to
 upload(normally gif or jpg) before the user submits the file to the
server,
 I wanted to show him a preview of his message and image.

 How do I do that? Where do I store the image temporarly?

 Any solutions?

 Uma


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]