PDA

View Full Version : can't send form ( more noob problems )


coszmin
10-20-2004, 10:25 AM
Hi guys ,
I've started playing arround with Laszlo a few days ago , and after installing it and reading the documentation , i decided to play arround with some code and examples . I tried writting a login form , that posts data to a jsp . I made the jsp print something on the screen as the post is made to it . I tried the jsp by hitting it with a manually built url .

I then tried running my code , to which the jsp does not react . Here is my code

<canvas height="470" width="750" bgcolor="#F2F2FF" debug="false">
<dataset name="e" src="http:../f5cm/login.g" />
<view name="login" x="400" y="150" width="200" height="150" bgcolor="white" visible="true">

<simplelayout axis="y" spacing="5"/>
<text>please login eh :</text>
<form>
<submit name="logform" data="${e}"/>
<simplelayout axis="y" spacing="5"/>
<edittext name="username" width="100" x="20" y="20">username</edittext>
<edittext name="password" width="100" x="20" y="20">password</edittext>
<button isdefault="true"
onclick="parent.logform.submit()">login</button>
<edittext name="type" width="100" x="20" y="20" >1</edittext>
</form>



</view></canvas>


Everything shows up ok , but as i click on login , the jsp is not hit

any sugestions ?

thanks

coszmin
10-20-2004, 02:35 PM
I have now discovered the Debug window . I didn't know that it prints out errors . So I'm getting this error :
data source error for http://127.0.0.1/f5/../f5cm/login.g?type=1&password=test&username=test: HTTP Status code: 404:Not Found
form submission error «LzDataset#0| "e"»

Now this address , copy pasted to my explorer , in the same window that the lzx was running , hits the jsp and returns the text .

This is how i've declared my datasource for this running example : <dataset name="e" src="http:../f5cm/login.g" />

FIXED : I managed to fix it by putting the entire url string in the src attribute . still not 100% what i wanted but it works