reload

jQuery submit form without page reload

╄→尐↘猪︶ㄣ 提交于 2019-12-02 06:13:58
Ok, so I'm trying to make a new log in form form my site using jquery and classic ASP. As of right now I have a containing div in my document thats set to hidden, then when the user selects the login link the div will fade in overlaying the page with the form. If the user clicks submit, the page will POST and the div overlay is gone. I would really like it to be more smooth than that. So if the users clicks submit, jquery will use ajax or something to post it in the background to a db connect page and then get the response text from that asp displaying either a successful login or incorrect in

Grails 3.2.11 not reloading controllers in development

我是研究僧i 提交于 2019-12-02 01:00:54
In a running app (with gradle bootRun ) I add a simple println params to a controller action: def index( Integer max ) { params.max = Math.min( max ?: 20, 100 ) println params respond Some.list( params ), model:[ someCount:Some.count() ] } In the logs I can see: File C:\workspace-neon\proj\grails-app\controllers\io.smth.SomeController.groovy changed, recompiling... 11:23:08.632 [Thread-14] INFO o.s.b.f.s.DefaultListableBeanFactory - Overriding bean definition for bean 'io.smth.SomeController' with a different definition: replacing [Generic bean: class [io.smth.SomeController]; scope=singleton;

jquery ajax item can not be clicked after reload

余生颓废 提交于 2019-12-01 23:28:00
问题 I am using django In the body block <div id="tag_like"> {% if liked %} <img id="unlike" title="unlike" src="{{ STATIC_URL }}pic/bad.png" /> {% else %} <img id="like" title="like" src="{{ STATIC_URL }}pic/good.png" /> {% endif %} </div> In the on_ready script block: $.ajaxSetup({ data: {csrfmiddlewaretoken: '{{ csrf_token }}'}, }); $('#like').click(function() { $.post("{% url 'likevideo' %}", {uid:{{ login_id }}, videoid:"{{ videoid }}"}, function(data,status){ $('#tag_like').load(' #tag_like'

Submitting form data without reloading page

╄→гoц情女王★ 提交于 2019-12-01 23:07:09
问题 I am trying to submit the form without reloading the page itself using the jQuery, but the data is not showing up and the form is reloading, which is not needed. jQuery code: function submitFormData() { var firstval = $("#first").val(); var second = $("#second").val(); //var operator = $("#myselect option:selected" ).text(); $.post("index.php",{first:first,second:second}, function(data){ $('#results').html(data); $('#formcal')[0].reset(); }); } THIS IS THE HTML CODE ON THE SAME PAGE(INDEX.PHP

jquery ajax item can not be clicked after reload

倾然丶 夕夏残阳落幕 提交于 2019-12-01 22:35:50
I am using django In the body block <div id="tag_like"> {% if liked %} <img id="unlike" title="unlike" src="{{ STATIC_URL }}pic/bad.png" /> {% else %} <img id="like" title="like" src="{{ STATIC_URL }}pic/good.png" /> {% endif %} </div> In the on_ready script block: $.ajaxSetup({ data: {csrfmiddlewaretoken: '{{ csrf_token }}'}, }); $('#like').click(function() { $.post("{% url 'likevideo' %}", {uid:{{ login_id }}, videoid:"{{ videoid }}"}, function(data,status){ $('#tag_like').load(' #tag_like') }); }); $('#unlike').click(function() { $.post("{% url 'unlikevideo' %}", {uid:{{ login_id }},

Auto refresh a specific div blogger javascript

断了今生、忘了曾经 提交于 2019-12-01 20:35:13
I use a Javascript widget on a blogspot. It include a div with some javascripts that get some "non-statical" strings from a server and print them on the page. Until here everything works fine, the problem is that I would like to update the execution of this div every few seconds in order to have updated strings, without refreshing the whole page, but just the specific widget (div). I have added another script that tries to refresh the specific div, but I had no luck. Please see the code below <div id="info"> <b>Song:</b> <script type="text/javascript" src="xxxx"> You appear to have javascript

How to reload a Python module that was imported in another file?

折月煮酒 提交于 2019-12-01 10:48:34
I am trying to learn how Python reloads modules, but have hit a roadblock. Let's say I have: dir1\file1.py : from dir2.file2 import ClassOne myObject = ClassOne() dir1\dir2\file2.py : class ClassOne(): def reload_module(): reload(file2) The reload call fails to find module "file2". My question is, how do I do this properly, without having to keep everything in one file? A related question: When the reload does work, will myObject use the new code? thank you def reload_module(): import file2 reload(file2) However, this will not per se change the type of objects you've instantiated from classes

jqgrid not reloading after making a ajax call using trigger('reload')

让人想犯罪 __ 提交于 2019-12-01 07:17:37
I am trying to reload the grid with new data which is just been changed , so that user can see the new data with modification . my approach: jQuery("#relCasePick").click( function(){ var ids=jQuery("#list10").jqGrid('getGridParam','selarrrow'); $.ajax({ type: "POST", url: "/cpsb/unprocessedOrders.do?method=releaseToCasePick&orderNumbers="+ids, data: JSON.stringify(ids), dataType: "json" }); jQuery("#list10").setGridParam({rowNum:10,datatype:"json"}).trigger('reloadGrid'); }); when I am clicking this button.. I am sending the data correctly but when I am reloading its not updated with new data.

How to Reload a Python3 C extension module?

一个人想着一个人 提交于 2019-12-01 06:20:31
I wrote a C extension (mycext.c) for Python 3.2. The extension relies on constant data stored in a C header (myconst.h). The header file is generated by a Python script. In the same script, I make use of the recently compiled module. The workflow in the Python3 myscript (not shown completely) is as follows: configure_C_header_constants() write_constants_to_C_header() # write myconst.h os.system('python3 setup.py install --user') # compile mycext import mycext mycext.do_stuff() This works perfectly fine the in a Python session for the first time. If I repeat the procedure in the same session

jqgrid not reloading after making a ajax call using trigger('reload')

自闭症网瘾萝莉.ら 提交于 2019-12-01 04:44:07
问题 I am trying to reload the grid with new data which is just been changed , so that user can see the new data with modification . my approach: jQuery("#relCasePick").click( function(){ var ids=jQuery("#list10").jqGrid('getGridParam','selarrrow'); $.ajax({ type: "POST", url: "/cpsb/unprocessedOrders.do?method=releaseToCasePick&orderNumbers="+ids, data: JSON.stringify(ids), dataType: "json" }); jQuery("#list10").setGridParam({rowNum:10,datatype:"json"}).trigger('reloadGrid'); }); when I am