neogi_titash
03-03-2006, 01:49 AM
Hello All,
I am a newbie Laszlo user. I am cross posting this on both exist and openlaszlo newsgroups as I am unsure where the solution to my problem lies.
I have a simple form based application that accepts user queries and certain parameters and then passes these to a backend exist layer.
Most of the examples and code that I have been able to see and learn from, are for directly querying the exist db via a laszlo UI. My case is slightly different.
My xquery application takes a string from the user and then does some internal processing of the parameter to get query variables. It then queries the DB using those parameters. I dont want to touch this layer of code since it uses quite a few exist-specific functions.
Till now I was using a simple html form to send data to the xquery backend. Now I am trying to do this with laszlo. Here is my laszlo code for better understanding of the problem -
__________________________________________________ ________________________________________
<canvas>
<window id="main"> <form>
<submit name="xquery"/><text>RUbiCon ver 1.0 </text>
<edittext width="150" name="val1"></edittext>
<button isdefault="true" onclick="submitter(parent.val1.text)">submit
<method name="submitter" args="val"> <![CDATA[
url_exist_db = "http://localhost:8080/exist/servlet/db/rubicon_bk_1.xq";
URLstring = (url_exist_db + "?" +"val1="+ val);
LzBrowser.loadURL(URLstring, '_blank');
]]>
</method>
</button></form></window></canvas>
]]>
</method></button> </form>
</window></canvas>
__________________________________________________ __________________________
When I run this, I get the search results as html in a browser.
What I am trying to achieve now is that when rubicon_bk_1.xq returns the search results, they should be picked up by laszlo and rendered on the canvas.
I am not sure how to handle this part, please advise.
Any ideas would be most welcome.
Thanks and Regards
Titash
I am a newbie Laszlo user. I am cross posting this on both exist and openlaszlo newsgroups as I am unsure where the solution to my problem lies.
I have a simple form based application that accepts user queries and certain parameters and then passes these to a backend exist layer.
Most of the examples and code that I have been able to see and learn from, are for directly querying the exist db via a laszlo UI. My case is slightly different.
My xquery application takes a string from the user and then does some internal processing of the parameter to get query variables. It then queries the DB using those parameters. I dont want to touch this layer of code since it uses quite a few exist-specific functions.
Till now I was using a simple html form to send data to the xquery backend. Now I am trying to do this with laszlo. Here is my laszlo code for better understanding of the problem -
__________________________________________________ ________________________________________
<canvas>
<window id="main"> <form>
<submit name="xquery"/><text>RUbiCon ver 1.0 </text>
<edittext width="150" name="val1"></edittext>
<button isdefault="true" onclick="submitter(parent.val1.text)">submit
<method name="submitter" args="val"> <![CDATA[
url_exist_db = "http://localhost:8080/exist/servlet/db/rubicon_bk_1.xq";
URLstring = (url_exist_db + "?" +"val1="+ val);
LzBrowser.loadURL(URLstring, '_blank');
]]>
</method>
</button></form></window></canvas>
]]>
</method></button> </form>
</window></canvas>
__________________________________________________ __________________________
When I run this, I get the search results as html in a browser.
What I am trying to achieve now is that when rubicon_bk_1.xq returns the search results, they should be picked up by laszlo and rendered on the canvas.
I am not sure how to handle this part, please advise.
Any ideas would be most welcome.
Thanks and Regards
Titash