Try to look @ http://www.xiscsp.co.uk/ngp/

It's a site where you can get your main questions.
Axel Rohde sometime ago answered me how to populate a dropdown list.
I had about 2 days working with Cache and it made a big difrence for me understanding what to do by searchin this newsgroup on this site (Thanks Peter).


Try to search for "Drop-Down List"
I made an example for Joshua with Class and Form examples.

Everything is stored there.

If you want 2b more specific on what you need, please put you specific question.

You can use %requsest.Get("variable") in <csp:if

To test if there comes OBJID from previous form
for example: <csp:if condition='$l(%request.Get("OBJID"))>0'>
        <script language='cache' runat='server'>
                w "alert('ObjId is:"_%request.Get("OBJID")_"');
        // like this you can write javascript directly on your page.
        </script>

Clear ???


Nuno RJH wrote:

That gives me an idea on what to do, but I find it annoying that
Intersystems did not post any samples for something so common in the
everyday routines of CSP creations. Can you please post your example? I
tried getting the information from a javascript, but the <csp:if
condition='DATAFROMTABLE'> statement does not allow me to call the function.
Thanks in advance for your help.

"Nuno Canas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

I don't know if i understood you question right but here it goes (my
interpretation):

First of all CSPBIND binds a form variable to a Object Property.
You have two ways:

1 - Never mind the form variable and act in the form directly with the
object you want, populating the drop down and act with some javascript
or methods in order to manipulate the object.

2 - Bind the variable to the object - Create a Query in the class that
will give you the field that you want:

In my case i want to select non Salesmen (Comercial) Name (Nome)
Empregado (Employee)

Query NotComercial() As %SQLQuery(CONTAINID = 1)
{
SELECT ID, Nome FROM ECOM.Empregado emp
 WHERE NOT EXISTS
 (select Empregado->id, Empregado->nome from Ecom.Comercial
  where Empregado->id = emp.id)
 ORDER BY Nome
}

of course this query gives you the ID and writes the name.
document.form.Comercial.value is ID and document.form.Comercial.text is
Name (Nome).

You can pass an argument that will select directly the number you want.
For instance if you need ID 5 to be selected on <select
name="Comercial"> you just say in your previous URL somethin like
page2.csp?Comercial=5

I have some examples on the first case if somebody need an example i can
post it !!


Hope this helps ! Nuno RJH wrote:

Cach� CSP wizard gives you a page where you can search and retrieve

existing

information from a table. It uses CSPBIND="somedata" to display

information

on text boxes. But what happens when you want to display a selected

option

from a drop down? not a text box? CSPBIND returns blank on a drop down.

Can

someone give an example on how to accomplish this?









Reply via email to