| Subject: | Re: pass query result as parameter to javascript |
|---|---|
| From: | GArlington <garlington@xxxxxxxxxxxxx> |
| Date: | Wed, 30 Jul 2008 03:13:25 -0700 (PDT) |
| Newsgroups: | macromedia.coldfusion.cfml_general_discussion |
On Jul 29, 1:43 pm, "biene22" <webforumsu...@xxxxxxxxxxxxxx> wrote:
> Hello,
>
> I'm a beginner with javascript, so (maybe) sorry for this question.
>
> Is it possible to use a query result as parameter in a javascript function
> for example like this?
>
> <cfquery name="select_data">
> select name from user_table
> </cfquery>
>
> <script language="javascript">
> function(#select_data.name#)
> {
> ...
> }
> </script>
>
> Background is: I have to validate an input field with some values which are
> saved in a database table.
> This values can be dynamic , so I don't want to put this values into the
> cfm-file.
>
> Any ideas?
>
> Claudia
Agree with Dan...
You may take a look at <cfwddx .../> too.
P.S. You need to define a function only once
<script language="javascript">
yourFunction(yourArray) {
...
}
</script>
and then call it as often as you like with various values:
yourFunction(yourArray1), yourFunction(yourArray2)...
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Looking for ColdFusion developers, GArlington |
|---|---|
| Next by Date: | Re: CFMail in CF8 on Windows VPS account not sending emails via Smartermail 5, siegler |
| Previous by Thread: | Re: pass query result as parameter to javascript, Dan Bracuk |
| Next by Thread: | Looking for ColdFusion developers, mikemcleod@xxxxxxxxx |
| Indexes: | [Date] [Thread] [Top] [All Lists] |