Sign In/My Account | View Cart  
advertisement

Article:
 Very Dynamic Web Interfaces
Subject: Coldfusion Server Script
Date: 2005-02-11 08:05:06
From: makalu

I re-wrote the server script in coldfusion to see if I could get it working on my cfmx box, here's the code from that, if anyone is interested...


<cfcontent type="text/xml" reset="yes">
<cfscript>
function nameInUse(q)
{
if (isdefined("q")){
switch(lcase(q))
{
case 'drew': {
return '1';
break;
}
case 'fred': {
return '1';
break;
}
default:
return '0';
}
}else
return '0';
}
</cfscript>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<method>checkName</method>
<cfoutput><result>#nameInUse(url.q)#</result></cfoutput>
</response>


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Coldfusion Server Script
    2005-04-25 14:10:04 Kanjoos

    I could not make it work in coldfusion. I keyed in exactly.


    I had two problems :


    req.onsteadystatechange = processReqChange;


    this does not call the function, it gives javascript error. It works when I change the above statement to


    req.onsteadystatechange = processReqChange();


    But as a whole my script does not work.


    My email address is kanjoossulekha@yahoo.com, can you guys send me the working programs ??


    Thanks,
    Kanjoos

  • Coldfusion Server Script
    2005-04-01 10:10:08 sk401k

    That looks cool. I really like the concept and i can vision it and see how far we can go to create more user friendly applicatoins but some how this example is failing in NS 7.2. It really irritates to see compatibility issues.


    Thanks
    SK401k

  • Coldfusion Server Script
    2005-02-14 11:14:19 Sidvorak

    I had problems using the coldfusion code presented due to the <?xml?> declaration not being on the first line of the returned document. If whitespace suppression is not turned on in the Administrator you will have to use something like this. Notice that there is no hard return after the <cfcontent> tag.


    <cfprocessingdirective suppresswhitespace="yes">
    <cfcontent type="text/xml" reset="yes"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <response>
    <method>checkName</method>
    <cfoutput><result>#nameInUse(url.q)#</result></cfoutput>
    </response>


    <cfscript>
    function nameInUse(q)
    {
    if (isdefined("q")){
    switch(lcase(q))
    {
    case 'drew': {
    return '1';
    break;
    }
    case 'fred': {
    return '1';
    break;
    }
    default:
    return '0';
    }
    }else
    return '0';
    }
    </cfscript></cfprocessingdirective>

    • Coldfusion Server Script
      2006-01-09 12:40:30 david_sternberg

      I cannot get the script to work. Can you email me at david_sternberg@yahoo.com so we can discuss this off line. I'm sure I am doing something stupid.


      Thanks
      Dave


Sponsored By: