开发者

Prototype Ajax Update Not Working

开发者 https://www.devze.com 2023-04-04 18:52 出处:网络
I am working with Prototype while using the pylons framework and trying to make an Ajax call. Here is what my html looks like:

I am working with Prototype while using the pylons framework and trying to make an Ajax call.

Here is what my html looks like:

<form method="POST" action = "javascript:void(0)" onsubmit = "new Ajax.Updater('graph','/saffron_main/click_out_display'); ">

    <label for="tids">Select Relevant Tids</label>

    &开发者_如何学编程lt;select id="tids" multiple="multiple" name="tids" title="Tids">
            <option>1</option>
            <option>2</option>
    </select>

    <p><input class = "button" type="submit" name="submit" value="submit" /></p>
</form>


<div id = "graph">

</div>

I can see that the my controller gets called and a http request gets made to /saffron_main/click_out_display. Everything looks like it is working properly. The only problem is the div never gets populated. I am pulling out my hair trying to figure this one out and any helps would be greatly appreciated! Thanks!


What happens if you put a return false; inside the onsubmit after you instantiate an Ajax.Updater ?

Why -
It currently would be returning true by default and the page may be getting posted back, not via Ajax

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号