cancel
Showing results for 
Search instead for 
Did you mean: 

Passing parameters problem

Former Member
0 Kudos

Hi,

how can to pass parameter value from front end? ie i have query as select * from table where no=1. i want to pass this 1 from client? he will pass this value from web page by choosing from drop down list.

how can i do it?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi senthil,

You can write the query as

select * from <table> from where <Column name> = ' Param.1'

Call this query and display template in frontpage.

Now from drop down get the selected value by using java script.

use this line of code to pass the value to query template

document. <Forum name>.<Appletname>.getQueryObject.setParam(1, <selected value>);

Hope this helps...

Regards,

Kishore kumar

Former Member
0 Kudos

Hi,

in frontpage i didnt get this sequence. after document it display normal list of methods and events. it didnt display any forum name. i choosed applets.item(0). but after this it doesnt display anything. what is the problem in it?

- senthil

sufw
Active Participant
0 Kudos

Hi Kishore,

I think the SQL query should be:

SELECT * FROM <table> WHERE <Column name> = '[Param.1]'

(note the square brackets around Param.1)

Sascha

Former Member
0 Kudos

Hi senthil,

If you are not used any forum, you can leave this part.

document.<applet name>.getQueryObject.setparam(1, <selected value>). I forgot to mention the squae brackets in query. It was mentioned by sacha. Take that also.

Regards,

Kishore kumar P.S.

Former Member
0 Kudos

You should know to which applet you are required to pass this parameter to

Parameter can be passed as

appletname.getQueryObject().setParam(INDEX,NEWVALUE)