Hi

I`m trying to send a parameter to a java-script function and then use that
parameter in the java-script function to look up a record-set in a database
with a dtml-method. With no luck so far.

Ex.

<script language="javascript1.2>

function ShowStuff(params){

        var text = "<dtml-in expr="sqlMethod(some_id=params>" <!-- this does
not work, of course. How I can I pass argument thru Javascript to the
sqlMethod ?? --->
        alert (text);
}

</script>

<!--- lots of DTML --->

        <a href=".." onClick="ShowStuff(<dtml-var some_id>);">...</a>

<!--- lots of DTML --->


The link sends an id to the java-script-method. A SQL method takes that id
as argument and returns a recordset. Or, that`s what I want to happen. How
can I get the sqlMethod to take the passed argument and return some data?? I
get the thing to work by using static content, like 

<dtml-in expr="sqlMethod(some_id='1')">

But I need to pass the argument from somewhere else in the document.

Oh, this was one big mess. Hope it makes some sense.

Thomas


_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to