Search Results

Search found 8271 results on 331 pages for 'ajax beginform'.

Page 25/331 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • ckeditor using ajax

    - by sundowatch
    I am preparing a script. I am using AJAX(load()) with jQuery. I am getting a page which includes textarea with ckeditor by load() jQuery AJAX function. Although I include ckeditor's.js file, loaded page doesn't includes javascript file and shows a normal textarea without ckeditor. How can I load file which includes textarea with ckeditor?

    Read the article

  • manipulate content inserted by ajax, without using the callback

    - by Cody
    I am using ajax to insert a series of informational blocks via a loop. The blocks each have a title, and long description in them that is hidden by default. They function like an accordion, only showing one description at a time amongst all of the blocks. The problem is opening the description on the first block. I would REALLY like to do it with javascript right after the loop that is creating them is done. Is it possible to manipulate elements created ofter an ajax call without using the callback? <!-- example code--> <style> .placeholder, .long_description{ display:none;} </style> </head><body> <script> /* yes, this script is in the body, dont know if it matters */ $(document).ready(function() { $(".placeholder").each(function(){ // Use the divs to get the blocks var blockname = $(this).html(); // the contents if the div is the ID for the ajax POST $.post("/service_app/dyn_block",'form='+blockname, function(data){ var divname = '#div_' + blockname; $(divname).after(data); $(this).setupAccrdFnctly(); //not the actual code }); }); /* THIS LINE IS THE PROBLEM LINE, is it possible to reference the code ajax inserted */ /* Display the long description in the first dyn_block */ $(".dyn_block").first().find(".long_description").addClass('active').slideDown('fast'); }); </script> <!-- These lines are generated by PHP --> <!-- It is POSSIBLE to display the dyn_blocks --> <!-- here but I would really rather not --> <div id="div_servicetype" class="placeholder">servicetype</div> <div id="div_custtype" class="placeholder">custtype</div> <div id="div_custinfo" class="placeholder">custinfo</div> <div id="div_businfo" class="placeholder">businfo</div> </body>

    Read the article

  • Retrieving & Displaying data from csv files using AJAX

    - by JJ
    I need to provide a feature such that the user is able to upload a csv file.Once the uploading is done I need to retrieve each value and show it on a grid which is implemented using far point(http://www.fpoint.com/products/spread/spread.aspx).But all this has to be done without the page being refreshed.I use asp.net 2.0 & Ajax Pro.Remember I cannot use the inbuilt AJAX feature provided by microsoft .To be precise I need something similar to the lines of attaching a file using gmail. Thanks & Regards Bikram

    Read the article

  • Ajax doesn't work on remote server .

    - by Nuha
    Hello . when I Implemented chatting Function , I use Ajax to send messages between file to another . so , it is working well on local host . but , when I upload it in to remote server it doesn't work. can U tell me ,why ? is an Ajax need Special configuration ? Ajax code : function Ajax_Send(GP,URL,PARAMETERS,RESPONSEFUNCTION){? var xmlhttp? try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}? catch(e){? try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}? catch(e){? try{xmlhttp=new XMLHttpRequest()}? catch(e){? alert("Your Browser Does Not Support AJAX")}}}? ? err=""? if (GP==undefined) err="GP "? if (URL==undefined) err +="URL "? if (PARAMETERS==undefined) err+="PARAMETERS"? if (err!=""){alert("Missing Identifier(s)\n\n"+err);return false;}? ? xmlhttp.onreadystatechange=function(){? if (xmlhttp.readyState == 4){? if (RESPONSEFUNCTION=="") return false;? eval(RESPONSEFUNCTION(xmlhttp.responseText))? }? }? ? if (GP=="GET"){? URL+="?"+PARAMETERS? xmlhttp.open("GET",URL,true)? xmlhttp.send(null)? }? ? if (GP="POST"){? PARAMETERS=encodeURI(PARAMETERS)? xmlhttp.open("POST",URL,true)? xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded")? xmlhttp.setRequestHeader("Content-length",PARAMETERS.length)? xmlhttp.setRequestHeader("Connection", "close")? xmlhttp.send(PARAMETERS)? }? }

    Read the article

  • Ajax and PHP problem not sending mail

    - by Dumbledore of flash
    Hi all , I have a problem here, I have two files form.php and index.php , my form.php has an ajax to fetch data from index.php , also my index.php has a mail function which is running perfectly when we run index.php directly, but when i form.php to fetch data from index.php this mail function is not running ..... can any body tell me whats the problem why ajax does not make my index.php send mail ?????

    Read the article

  • How long can rails keep Ajax open

    - by Alexey
    My application is suppose to constantly update the page without any user interaction. The criteria is that the page just has to be there, as an extra window on the monitor so the user can see the information get updated real time. I'm using the Ajax in jQuery with Rails, and my question is - how long will the .erb page keep Ajax open? Will there be a point where I have to refresh the page or re-initialize? Or will that won't be a problem at all?

    Read the article

  • div loading is not proper while using ajax

    - by sadesh
    i have to load a div with a list of check boxes using ajax. I have writen ajax code to fetch the string containing the list of check boxes.` document.getElementById("roleCheckBoxes").innerHTML=""; $('#roleCheckBoxes').append(xmlhttp.responseText.toString()); the data are fetching properly but the display alone not reflecting the string which i gave instead it displays a the list of check boxes with all checked... can you help me in it..

    Read the article

  • jQuery: Execute function after all ajax .load() requests are finished

    - by Mike
    I have a page that has a tab set. Each of the tabs is loaded by the jQuery .load() function. I want to display a loading animation that disappears when all of the ajax requests are finished. However, document.ready() has only provided me with limited success. How can I ensure that all ajax requests are completed before executing the code to hide the loading animation? Thanks!

    Read the article

  • wrong return value with jquery ajax and codeigniter

    - by matthew
    I do not know if this is specifically a jquery problem, actually I think it has to mostly do with my logic in the php code. What Im trying to do is make a voting system that when the user clicks on the vote up or vote down link in the web page, it triggers an ajax call to a php function that first updates the database with with the required value, on success of the database updating the another function is called just to get the required updated html for the that particular post that the user has voted on. (hope I havnt lost you). The problem I think deals with specifically with this one line of code. When I make the call it only returns the value of $row-beer_down and completly ignores everything else in that line. Funny thing is the same php code to display the html view works perfectly before the ajax function updates it. echo "<p>Score " . $row->beer_up + $row->beer_down . "</p>"; so here is the code to hope you can help as I have absolutely no idea how to fix this. here is the view file where it generates the page. This part is the query ajax function. <script type="text/javascript"> $(function() { $(".vote").click(function(){ var id = $(this).attr("id"); var name = $(this).attr("name"); var dataString = 'id='+ id ; var parent = $(this); if(name=='up') { $.ajax({ type: "POST", url: "http://127.0.0.1/CodeIgniter/blog/add_vote/" + id, data: dataString, cache: false, success: function(html) { //parent.html(html); $("." + id).load('http://127.0.0.1/CodeIgniter/blog/get_post/' + id).fadeIn("slow"); } }); } else { $.ajax({ type: "POST", url: "http://127.0.0.1/CodeIgniter/blog/minus_vote/" + id, data: dataString, cache: false, success: function(html) { //parent.html(html); $("." + id).load('http://127.0.0.1/CodeIgniter/blog/get_post/' + id).fadeIn("slow"); } }); } return false; }); }); </script> Here is the html and php part of the page to display the post. div id="post_container"> <?php //echo $this->table->generate($records); ?> <?php foreach($records->result() as $row) { ?> <?php echo "<div id=\"post\" class=\"" . $row->id . "\">"; ?> <h2><?php echo $row->id ?></h2> <?php echo "<img src=\"" . base_url() . $dir . $row->account_id . "/" . $row->file_name . "\">" ?> <p><?php echo $row->content ?></p> <p><?php echo $row->user_name ?> On <?php echo $row->time ?></p> <p>Score <?php echo $row->beer_up + $row->beer_down ?></p> <?php echo anchor('blog/add_vote/' . $row->id, 'Up Vote', array('class' => 'vote', 'id' => $row->id, 'name' => 'up')); echo anchor('blog/minus_vote/' . $row->id, 'Down Vote', array('class' => 'vote', 'id' => $row->id, 'name' => 'down')); echo anchor('blog/comments/' . $row->id, 'View Comments'); ?> </div> <?php } ?> here is the function the ajax calls when it is successfull: function get_post() { $this->db->where('id', $this->uri->segment(3)); $records = $this->db->get('post'); $dir = "/uploads/user_uploads/"; foreach($records->result() as $row) { echo "<div id=\"post\" class=\"" . $row->id . "\">"; echo "<h2>" . $row->id . "</h2>"; echo "<img src=\"" . base_url() . $dir . $row->account_id . "/" . $row->file_name . "\">"; echo "<p>" . $row->content . "</p>"; echo "<p>" . $row->user_name . " On " . $row->time . "</p>"; echo "<p>Score " . $row->beer_up + $row->beer_down . "</p>"; echo "<p>Up score" . $row->beer_up . "beer down" . $row->beer_down . "</p>"; echo anchor('blog/comments/' . $row->id, 'View Comments'); echo "</div>"; }

    Read the article

  • Jquery ajax POST label/value pair

    - by aus_fas
    I want to pass label/value pair in Ajax .POST but cannot find any solution. Any help please. $.ajax({ url:"allfields.php", type:"POST", // dataType:"json", data: $("#frmRequest").serialize(), success: function(msg){ alert("Form Submitted: "+ msg); return msg; }, error: function() { alert('Error occured'); } });

    Read the article

  • AJAX: Problems returning multiple variables

    - by fwaokda
    First off sorry if I'm missing something simple just started working with AJAX today. I have an issue where I'm trying to get information from my database, but different records have different amounts of values. For instance, each record has a "features" column. In the features column I store a string. (ex: Feature1~Feature2~Feature3~Feature4... ) When I'm building the object I take apart the string and store all the features into an array. Some objects can have 1 feature others can have up to whatever. So... how do I return this values back to my ajax function from my php page? Below is my ajax function that I was trying and I'll provide a link with my php file. [ next.php : http://pastebin.com/SY74jV7X ] $("a#next").click(function() { $.ajax({ type : 'POST', url : 'next.php', dataType : 'json', data : { nextID : $("a#next").attr("rel") }, success : function ( data ) { var lastID = $("a#next").attr("rel"); var originID = $("a#next").attr("rev"); if(lastID == 1) { lastID = originID; } else { lastID--; } $("img#spotlight").attr("src",data.spotlightimage); $("div#showcase h1").text(data.title); $("div#showcase h2").text(data.subtitle); $("div#showcase p").text(data.description); $("a#next").attr("rel", lastID); for(var i=0; i < data.size; i++) { $("ul#features").append("<li>").text(data.feature+i).append("</li>"); } /* for(var j=1; j < data.picsize; j++) { $("div.thumbnails ul").append("<li>").text(data.image+j).append("</li>"); } */ }, error : function ( XMLHttpRequest, textStatus, errorThrown) { $("div#showcase h1").text("An error has occured: " + errorThrown); } }); });

    Read the article

  • In jquery how can I keep track of multiple ajax request called from one function

    - by binay
    I'm using jquery and in one function I'm calling multiple function which are doing different ajax request for example function contactForm(){ loadCountryList(); loadMyData(); checkUserType(); // doing my stuff } How can I know if all the ajax request are completed so that I start doing my stuff in the end? I don't want to call them one by one to minimize the request time. any suggestion will help me a lot.

    Read the article

  • Is Form Tag Necessary in AJAX Web Application?

    - by Morgan Cheng
    I read some AJAX-Form tutorial like this. The tag form is used in HTML code. However, I believed that it is not necessary. Since we send HTTP request through XmlHttpRequest, the sent data can be anything, not necessary input in form. So, is there any reason to have form tag in HTML for AJAX application?

    Read the article

  • How to use ajax with prototype and jsps

    - by kevinb92
    I'm developing social faq solution. When I click on vote up or vote down, i want to make an ajax call to a java function. I've worked with struts on another project, and i was making call to struts action. Now I work only with simple jsp, servlets ... and I dont know how to make an ajax call to a java function which will send me json or xml.

    Read the article

  • Ajax file upload

    - by ajay009ajay
    I want to upload a file using Ajax and php. I have a form with file inclusion tag. I want when user will browse a file and click on submit then file should be uploaded without refresh. How will i do this ?It does't matter if refresh occur but i want to upload file with help of ajax.

    Read the article

  • Send and receive data in same ajax request with jquery

    - by Pedro Esperança
    What is the best way to send data and receive a response dependent on that data? Consider the php file used for the request: $test = $_POST['test']; echo json_encode($test); I have tried unsucessfully to achieve this with: $.ajax({ type: "POST", dataType: "json", data: '{test : worked}', url: 'ajax/getDude.php', success: function(response) { alert(response); } });

    Read the article

  • ajax functionality not working ???

    - by rajesh
    the problem is that 1)how can i come to know that the ajax is working properly?. 2)and how can i retrieve this sent data in controller in cakephp? function checkLength(obj,url){ alert("URL="+url+" OBJ="+obj); if(obj) { var params = 'query='+obj; var myAjax = new Ajax.Request(url,{method: 'post',parameters:params,onSuccess: loadResponse}); }

    Read the article

  • How to include js file in ajax call?

    - by Anubhaw
    Hi All, I am calling a ajax method to update a div. It contains links and functions which require java script files. But these methods and functions are not getting called properly as java script files are not getting included through ajax call. For example, i am trying to call a light box function, but it gets redirected to different page and not in light box. Thanks in advance, Anubhaw Prakash

    Read the article

  • iPad web app: Prevent input focus AFTER ajax call

    - by Mike Barwick
    So I've read around and can't for the life of me figure out of to solve my issue effectively. In short, I have a web app built for the iPad - which works as it should. However, I have an Ajax form which also submits as it should. But, after the callback and I clear/reset my form, the "iPad" automatically focuses on an input and opens the keyboard again. This is far from ideal. I managed to hack my way around it, but it's still not perfect. The code below is run on my ajax callback, which works - except there's still a flash of the keyboard quickly opening and closing. Note, my code won't work unless I use setTimeout. Also, from my understanding, document.activeElement.blur(); only works when there's a click event, so I triggered one via js. IN OTHER WORDS, HOW DO I PREVENT THE KEYBOARD FROM REOPENING AFTER AJAX CALL ON WEB APP? PS: Ajax call works fine and doesn't open the keyboard in Safari on the iPad, just web app mode. Here's my code: hideKeyboard: function () { // iOS web app only, iPad IS_IPAD = navigator.userAgent.match(/iPad/i) != null; if (IS_IPAD) { $(window).one('click', function () { document.activeElement.blur(); }); setTimeout(function () { $(window).trigger('click'); }, 500); } } Maybe it's related to how I'm clearing my forms, so here's that code. Note, all inputs have tabindex="-1" as well. clearForm: function () { // text, textarea, etc $('#campaign-form-wrap > form')[0].reset(); // checkboxes $('input[type="checkbox"]').removeAttr('checked'); $('#campaign-form-wrap > form span.custom.checkbox').removeClass('checked'); // radio inputs $('input[type="radio"]').removeAttr('checked'); $('#campaign-form-wrap > form span.custom.radio').removeClass('checked'); // selects $('form.custom .user-generated-field select').each(function () { var selection = $(this).find('option:first').text(), labelFor = $(this).attr('name'), label = $('[for="' + labelFor + '"]'); label.find('.selection-choice').html(selection); }); optin.hideKeyboard(); }

    Read the article

  • What to have in mind when building a AJAX-based webapp

    - by Industrial
    Hi everyone, We're in the first steps of what will be a AJAX-based webapp where information and generated HTML will be sent backwards and forwards with the help of JSON/POST techniques. We're able to get the data out quickly without putting to much load on the database with the help of a cache-layer that features memcached as well as disc-based cache. Besides that - what's essential to have in mind when designing AJAX heavy webapps? Thanks a lot,

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >