Skip to main content
Known Participant
October 5, 2008
Question

Quick AjaxLink Question

  • October 5, 2008
  • 1 reply
  • 244 views
Why can't this be done using the above function:

#AjaxLink(test.cfm?name=''+form.name.value')#

Trying to figure out if this can be done without using the coldfusion.navigate function.

ISM
    This topic has been closed for replies.

    1 reply

    Inspiring
    October 6, 2008
    because you can't combine ajaxlink() with js - ajaxlink is processed on
    the SERVER while the page is being rendered by CF, and it has no idea
    about form.name.value until your form is submitted and processed by cf.

    after the form is submitted, the correct format will be:
    #ajaxlink('test.cm?name=' & form.name)#

    however, i suspect you want the link to work BEFORE the form is
    submitted, but ajaxlink() will not work in this case.

    you can instead bind your cfdiv, or whichever container you are using,
    to the form field's value:

    <cfdiv bind="url:test.cfm?name={name}" bindonload="false" id="mydiv" />

    hth

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/