On Oct 15, 9:26 am, "przemek.ch" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've build two select boxes. Onchange method on the first selectbox I
> fill with ajax the second one using the selected value as a parameter.
> It works.
>
> function loadElements(groupID){
>                 $("#secondSelectDiv").load("${h.url_for(controller='ajax',
> action='getElements', id='')}"+groupID);
>
> }
>
> The problem is that an url is generated to my method.
> for examplehttp://localhost:5000/ajax/getElements/1
> And it can be called directly from the browser.
>
> How can I hide or block that.
>

You can't.  The browser *has* to be able to call your URL in order to
fetch the html to `load` into the second one.

For things like that, I prefer to have no restriction on who/what can
access that URL.  It makes things much easier to unittest that way.

jw
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to