mallesh
11-21-2003, 03:13 AM
Hi Antun,
In our appln, we are allowing the user to upload their own images.For this, i am calling JSP file by clicking on the button "upload image", from lzx file.that JSP file will allow the user to select an image and call another JSP.This latter JSP file is taking care of storing the image to an remote server,And also it creating one XML file for storing the name of the uploaded image.Once the image has been uploaded,i am downloading that image from the remote server by sending the HTTP request to that XML file from same LZX file .For that I am using another Button "ADD IMAGE" (here i am calling doRequest()method).
Here, is it possible to use only single button like "upload image" for both the action?. I mean i don't want to use "ADD IMAGE" for downloading and displaying it in my appln.The whole thing should happen in one action(like, by clicking on the "upload image ").
<dataset name="dset1" src="http://localhost:8080/upload/jsp/uploadimage.xml" autorequest="false" type="http"/>
<view x="30" y="40" id="upload" resource="Images/upload.gif" clickable="true" onclick=" postpage">
<method name="postpage" event="onclick">
LzBrowser.loadURL('http://localhost:8080/upload/jsp/upload1.jsp', '_blank');
</method>
</view>
<view x="36" y="130" id="add" opacity="0.4" resource="Images/add.gif" >
<method event="onclick">
loadingIndicator.setVisible( true );
var d = canvas.datasets.dset1;
d.doRequest();
</method>
</view>
<view name="upload" x="140" y="150" width="120" height="120" datapath="dset1:/upload/FileName/text()">
<method name="applyData" args="d">
setSource( "http://localhost:8080/upload/uploadedfiles/" +d);
</method>
Thanks alot
Mallesh
In our appln, we are allowing the user to upload their own images.For this, i am calling JSP file by clicking on the button "upload image", from lzx file.that JSP file will allow the user to select an image and call another JSP.This latter JSP file is taking care of storing the image to an remote server,And also it creating one XML file for storing the name of the uploaded image.Once the image has been uploaded,i am downloading that image from the remote server by sending the HTTP request to that XML file from same LZX file .For that I am using another Button "ADD IMAGE" (here i am calling doRequest()method).
Here, is it possible to use only single button like "upload image" for both the action?. I mean i don't want to use "ADD IMAGE" for downloading and displaying it in my appln.The whole thing should happen in one action(like, by clicking on the "upload image ").
<dataset name="dset1" src="http://localhost:8080/upload/jsp/uploadimage.xml" autorequest="false" type="http"/>
<view x="30" y="40" id="upload" resource="Images/upload.gif" clickable="true" onclick=" postpage">
<method name="postpage" event="onclick">
LzBrowser.loadURL('http://localhost:8080/upload/jsp/upload1.jsp', '_blank');
</method>
</view>
<view x="36" y="130" id="add" opacity="0.4" resource="Images/add.gif" >
<method event="onclick">
loadingIndicator.setVisible( true );
var d = canvas.datasets.dset1;
d.doRequest();
</method>
</view>
<view name="upload" x="140" y="150" width="120" height="120" datapath="dset1:/upload/FileName/text()">
<method name="applyData" args="d">
setSource( "http://localhost:8080/upload/uploadedfiles/" +d);
</method>
Thanks alot
Mallesh