Skip to main content
Participant
May 20, 2008
Question

Navigate / Ajax / Permission Denied

  • May 20, 2008
  • 1 reply
  • 299 views
Greetings ...

I am attempting to get an Ajax control working with Coldfusion.Navigate (see code below ) . I simply want to enter in data in a form, submit the form and have the output of the form submission in an Ajax control. I am getting a "Permission denied to call method XMLHttpRequest.open". I understand that this happens if you try to make an Ajax connection to a site that is not in your domain ... but this connection *is* in my domain ... so I don't understand what the problem is.

I have a 3 tiered system - cold fusion is tier 2 - I hope that does not matter...

-thank you for your assistance
------------------------------------------------------------------
    This topic has been closed for replies.

    1 reply

    Inspiring
    May 21, 2008
    are you sure use can use js in form's ACTION attribute?

    use Coldfusion.navigate() function instead in, for example, a button's
    onClick event... you can also use ColdFusion.Ajax.submitForm() to submit
    the form asynchronously, whithout removing the form from the view...

    not sure though if any of this is related to your particular error...
    but this might:
    - is your form on a secure page? you need to make all ajax calls to urls
    to use full https://.... URIs.
    - are you viewing your form page through your http server or just by
    opening it as a file in your browser? you must use http server to open
    the url - ajax calls will not work if a page is opened as a file.
    - also make sure you are not accessing the page through
    http://127.0.0.1/... while the website is configured to use
    http://localhost/... - the 2 url will be considered by ajax to be 2
    different namespaces and it will fail.

    in general, though you are probably aware of this, if you use CFFORM
    inside an cf layout element (like cfdiv or cfwindow), it will submit to
    and show results in that element, while if you use a regular FORM, it
    will reload the whole page.

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