Search Results

Search found 1994 results on 80 pages for 'posting'.

Page 5/80 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Posting to tumblr in PHP

    - by Sherif
    I am trying to make a test post to my tumblr blog with a php script (that will eventually be ran as a cron job) I have been browsing google and read many answers on here and the closest I found is explained in this post: Tumblr OAuth using PHP's OAuth class I am using the code in his tutorial here: http://vigrond.com/blog/2012/02/04/oauth-extension-php-and-the-tumblr-api/ Pretty much as is, replacing the blogurl with mine and of course the consumer and secret key. When I run the .php script via my browser however, nothing happens. Any ideas? EDIT: The only error I found in cPanel's error log is this: [Wed Oct 31 00:29:25 2012] [error] [client xx.xx.xx.xx ] PHP Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /path on line 14 But I fixed this and the error does not appear anymore.

    Read the article

  • Posting null values via AJAX

    - by nickf
    Using the jQuery $.post function, if you send a null value, it arrives at the server side as "null". Example: Javascript: $.post('test.php', { foo : null }); PHP: var_dump($_POST['foo']); // string(4) "null" I understand why this is so, but was wondering the best way to work around the limitation? Should you: Loop through all the variables in JS before you send them and replace with an empty string? Interpret "null" as null on the server side? Don't send the variable at all? Something else?

    Read the article

  • Problem with posting the message using php

    - by Darshana
    Hello, I have successfully come up to the access_token step along with final oauth_token and oauth_token_secret values. Now I'm trying to access the Post method given by Yammer API with following request : https://www.yammer.com/api/v1/messages/? body=MyMessage& oauth_consumer_key=Myconsumerkey& oauth_nonce=1825bbc0f0a2875eb94bdb4d51c0638b& oauth_signature=JzG4DCWxuP%2B7xT7u3tFZ2zCC8%2BI%3D& oauth_signature_method=HMAC-SHA1& oauth_timestamp=1257761059& oauth_token=Myfinaloauthtoken& oauth_version=1.0 But I'm getting "Invalid OAuth signature" error. Can somebody help me in this.

    Read the article

  • Posting within PHP and receiving only cookie

    - by faya
    Hello I have a question. It might be sound ridiculous, but let me explain what I want to accomplish. Right now I try to embed open source forum to by site and I want to leave forum and my site databases split. When my site users are logging in I want them also automatically be logged in to the forum system. For that I want to login within my PHP code after receiving username and password in post, but I don't know how I can get only cookies in response. I have found out that I can use curl_init(), curl_exec(), curl_close() functionality, but response from curl_exec returns whole response(page content, cookies, headers). Is there a way to receive only cookies? P.S. - If my design is totally wrong please give an advise how I can embed this functionality! I would be very thankful!

    Read the article

  • Ajax BeginForm posting to an action that returns json, IE tries to download it

    - by ryanrdl
    Here is the code I am using to setup the form: <% using (Ajax.BeginForm("SaveCroppedPhoto", new { Id = Model.memberId.GetValueOrDefault() }, new AjaxOptions { OnBegin = "ProfileOnBegin", OnComplete = "ProfileOnComplete", OnFailure = "ProfileOnFailure", OnSuccess = "ProfileOnSuccess" }, new { id = "cropPhotoForm" })) {%> My action result returns a json result as follow: return Json(new { success }); In IE8 when the action returns, it tries to download the result. The content type coming back is application/json. Anyone have any idea how to stop IE from trying to download the result?

    Read the article

  • posting a variable with jquery and receiving it on other page

    - by Billa
    I want to post a varible "id" to a page. I'm trying following code, but I cant get the id value, it says "undefined". function box(){ var id=$(this).attr("id"); $("#votebox").slideDown("slow"); $("#flash").fadeIn("slow"); $.ajax({ type: "POST", //I want to post the "id" to the rating page. data: "id="+$(this).attr("id"), url: "rating.php", success: function(html){ $("#flash").fadeOut("slow"); $("#content").html(html); } }); } This function is called in following code. In the following code too, the id is posted to the page "votes.php", and it works fine, but in the above code when I'm trying to post the id to the rating.php page, it does not send. $(function(){ $("a.vote_up").click(function(){ the_id = $(this).attr('id'); $("span#votes_count"+the_id).fadeOut("fast"); $.ajax({ type: "POST", data: "action=vote_up&id="+$(this).attr("id"), url: "votes.php", success: function(msg) { $("span#votes_up"+the_id).fadeOut(); $("span#votes_up"+the_id).html(msg); $("span#votes_up"+the_id).fadeIn(); var that = this; box.call(that); } }); }); }); rating.php <? $id = $_POST['id']; echo $id; ?> The html part is: <a href='javascript:;' class='vote_up' id='<?php echo $row['id']; ?>'>Vote Up!</a> I'll appriciate any help.

    Read the article

  • Posting a form using Ajax

    - by hopes
    Hi everyone, do u have an idea of how to send my radio button name for myAjaxPostrequest.send(parameters); can parameters be like this: var answername=document.getElementById('option1').name; var parameters=answername; ? this code is for using ajax to post a form and my php page needs the name of the radiobutton clicked I tried this code and it works as I want except for inserting in the database. It means parameters is the problem what I want to insert is the number located between brakects of the radiobutton name. I could do it when I post form without Ajax but now I can't send the name of the radiobutton any clue about what I can send as parameter for function myAjaxPostrequest.send(parameters);? <form id="Question1" method="post"> <br /> <P> The sky color is.. </P><img border="0" src="images/wonder.png" width="94" height="134"/><br /><br /><br /> <input type="radio" id="option1" name="answer[1]" value="correct!" onclick="submitFormWithAjax();"/> blue <br /> <input type="radio" id="option1" name="answer[1]" value="false!" onclick="submitFormWithAjax();"/> red <br /> <input type="radio" id="option1" name="answer[1]" value="false!" onclick="submitFormWithAjax();"/> green <br /> <input type="radio" id="option1" name="answer[1]" value="false!" onclick="submitFormWithAjax();"/> white <br /> <br /> </Form>

    Read the article

  • POSTing a form using Python and Curl

    - by morpheous
    I am relatively new (as in a few days) to Python - I am looking for an example that would show me how to post a form to a website (say www.example.com). I already know how to use Curl. Infact, I have written C+++ code that does exactly the same thing (i.e. POST a form using Curl), but I would like some starting point (a few lines from which I can build on), which will show me how to do this using Python.

    Read the article

  • ValidateRequest="false" doesn't work when posting HTML values

    - by Ivan90
    I am developing a personal blog in ASP.NET MVC 1.0. This blog application has Views like "Insert Post", "Edit Post", etc. I need to post a string containing HTML back to the appropriate controller method. That HTML value is being posted from a textarea. I've read that it's necessary to disable ValidateRequest directly on the page with the attribute ValidateRequest = "false" or in the web.config file. When I insert an HTML value in my textarea, I get always the error of 'potential value dangerous'. How can I use ValidateRequest to allow the form element containing HTML values to be posted?

    Read the article

  • posting data to a site in C#

    - by Michel
    i'm flabbergasted, i've looked at almost every example, but it just doesn't work (the other party says they don't receive my data in the request parameter) I want to do this in code (send some xml data (without the xml declaration) to a uri): <form method="post" action="http://http://100.100.100.100:11111/getinfo"> <input type="text" value="<ps:Balance>100</ps:Balance>" name="request" id="request"> <br><br> <input type="submit" value="go"> </form>

    Read the article

  • jqgrid Posting name:value pair when deleting row?

    - by user837168
    I want to send some name:value pair from the row selected along with del command. from below script I want to send the "polpono" value to my php script when del command is issued. any help will be highly appreciated. $(document).ready(function(){ $("#datagrid").jqGrid({ url:'actionpo.php?vid=polpogridjq', datatype: 'xml', mtype: 'GET', colNames:['List#','PO#', 'Item Code','Item Detail','Qty','Price','Tax'], colModel :[ {name:'polistno', width:100,editable:true,editable:true,key:true}, {name:'polpono',index:'polpono', width:100,editable:true}, {name:'politemcode',index:'politemcode', width:100, align:'right',sortable:true,editable:true}, {name:'politemname', width:300, align:'left',sortable:false,editable:true}, {name:'politemqty',width:50, align:'right',sortable:false,editable:true}, {name:'politemvalue', width:80,align:'left',sortable:false,editable:true}, {name:'politemtax', width:50, align:'right',editable:true} ], pager: $('#pager'), rowNum:10, rowList:[10,20,30], sortname: 'polpono', sortorder: 'desc', shrinkToFit: false, rownumbers: false, multiselect: false, viewRecords: false, clearAfterAdd:true, caption: 'Itemised Quantity', editurl: "actionpo.php?vid=gridformcall", }).navGrid('#pager', { edit: true, add: true, del: true ,search:false, refresh:true},{ } }); });

    Read the article

  • posting php code using jquery .html()

    - by Emmanuel Imwene
    simple query,but it's giving me a headache, i need a division to be updated with a changed session variable each time a user clicks on a name,i figured i'd use .html() using jquery to update the division, i don't know if you can do this, but here goes: $("#inner").html('<?php session_start(); if(file_exists($_SESSION['full'])||file_exists($_SESSION['str'])){ if(file_exists($_SESSION['full'])) { $full=$_SESSION['full']; $handlle = fopen($full, "r"); $contents = fread($handlle, filesize($full)); fclose($handlle); echo $contents; echo '<script type="text/javascript" src="jquery-1.8.0.min (1).js">'; echo '</script>'; echo '<script type="text/javascript">'; echo 'function loadLog(){ var oldscrollHeight = $("#inner").attr("scrollHeight") - 20; $.ajax({ url: \''.$_SESSION['full'].'\', cache: false, success: function(html){ $("#inner").html(html); //Insert chat log into the #chatbox div var newscrollHeight = $("#inner").attr("scrollHeight") - 20; if(newscrollHeight > oldscrollHeight){ $("#inner").animate({ scrollTop: newscrollHeight }, \'normal\'); //Autoscroll to bottom of div } }, }); } setInterval (loadLog, 2500);'; echo '</script>'; } else { $str=$_SESSION['str']; if(file_exists($str)) { $handle = fopen($str, 'r'); $contents = fread($handle, filesize($str)); fclose($handle); echo $contents; $full=$_SESSION['full']; $handlle = fopen($full, "r"); $contents = fread($handlle, filesize($full)); fclose($handlle); echo $contents; echo '<script type="text/javascript" src="jquery-1.8.0.min (1).js">'; echo '</script>'; echo '<script type="text/javascript">'; echo 'function loadLog(){ var oldscrollHeight = $("#inner").attr("scrollHeight") - 20; $.ajax({ url: \''.$_SESSION['str'].'\', cache: false, success: function(html){ $("#inner").html(html); //Insert chat log into the #chatbox div var newscrollHeight = $("#inner").attr("scrollHeight") - 20; if(newscrollHeight > oldscrollHeight){ $("#inner").animate({ scrollTop: newscrollHeight }, \'normal\'); //Autoscroll to bottom of div } }, }); } setInterval (loadLog, 2500);'; echo '</script>'; } } } ?>'); is that legal, if not, how would i accomplish this?

    Read the article

  • SpringMvc java.lang.NullPointerException When Posting Form To Server

    - by dev_darin
    I have a form with a user name field on it when i tab out of the field i use a RESTFUL Web Service that makes a call to a handler method in the controller. The method makes a call to a DAO class that checks the database if the user name exists. This works fine, however when the form is posted to the server i call the same exact function i would call in the handler method however i get a java.lang.NullPointerException when it accesses the class that makes a call to the DAO object. So it does not even access the DAO object the second time. I have exception handlers around the calls in all my classes that makes calls. Any ideas as to whats happening here why i would get the java.lang.NullPointerException the second time the function is called.Does this have anything to do with Spring instantiating DAO classes using a Singleton method or something to that effect? What can be done to resolve this? This is what happens the First Time The Method is called using the Web Service(this is suppose to happen): 13011 [http-8084-2] INFO com.crimetrack.jdbc.JdbcOfficersDAO - Inside jdbcOfficersDAO 13031 [http-8084-2] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query 13034 [http-8084-2] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [SELECT userName FROM crimetrack.tblofficers WHERE userName = ?] 13071 [http-8084-2] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource 13496 [http-8084-2] DEBUG org.springframework.jdbc.core.StatementCreatorUtils - Setting SQL statement parameter value: column index 1, parameter value [adminz], value class [java.lang.String], SQL type unknown 13534 [http-8084-2] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource 13537 [http-8084-2] INFO com.crimetrack.jdbc.JdbcOfficersDAO - No username was found in exception 13537 [http-8084-2] INFO com.crimetrack.service.ValidateUserNameManager - UserName :adminz does NOT exist The Second time When The Form Is 'Post' and a validation method handles the form and calls the same method the web service would call: 17199 [http-8084-2] INFO com.crimetrack.service.OfficerRegistrationValidation - UserName is not null so going to check if its valid for :adminz 17199 [http-8084-2] INFO com.crimetrack.service.OfficerRegistrationValidation - User Name in try.....catch block is adminz 17199 [http-8084-2] INFO com.crimetrack.service.ValidateUserNameManager - Inside Do UserNameExist about to validate with username : adminz 17199 [http-8084-2] INFO com.crimetrack.service.ValidateUserNameManager - UserName :adminz EXCEPTION OCCURED java.lang.NullPointerException

    Read the article

  • Ajax post not posting email address ?

    - by jeitjet
    UPDATE: It will not work in Firefox, but will work on any other browser. I even tried loading Firefox in safe mode (disabling all plugins, etc.) and still no worky. :( I'm trying to do an AJAX post (on form submission) to a separate PHP file, which works fine without trying to send an email address through the post. I'm fairly new to AJAX and pretty familiar with PHP. Here's my form and ajax call <form class="form" method="POST" name="settingsNotificationsForm"> <div class="clearfix"> <label>Email <em>*</em><small>A valid email address</small></label><input type="email" required="required" name="email" id="email" /> </div> <div class="clearfix"> <label>Email Notification<small>...when a new subscriber joins</small></label><input type="checkbox" name="subscribe_notifications" id="subscribe_notifications"> Receive an email notification with phone number when someone new subscribes to 'BIZDEMO' </div> <div class="clearfix"> <label>Email Notification<small>...when a subscriber cancels</small></label><input type="checkbox" name="unsubscribe_notifications" id="unsubscribe_notifications"> Receive an email notification with phone number when someone new unsubscribes to 'BIZDEMO' </div> <div class="action clearfix top-margin"> <button class="button button-gray" type="submit" id="notifications_submit"><span class="accept"></span>Save</button> </div> </form> and AJAX call: <script type="text/javascript"> jQuery(document).ready(function () { $("#notifications_submit").click(function() { var keyword_value = '<?php echo $keyword; ?>'; var email_address = $("input#email").val(); var subscribe_notifications_value = $("input#subscribe_notifications").attr('checked'); var unsubscribe_notifications_value = $("input#unsubscribe_notifications").attr('checked'); var data_values = { keyword : keyword_value, email : email_address, subscribe_notifications : subscribe_notifications_value, unsubscribe_notifications : unsubscribe_notifications_value }; $.ajax({ type: "POST", url: "../includes/ajax/update_settings.php", data: data_values, success: alert('Settings updated successfully!'), }); }); }); and receiving page: <?php include_once ("../db/db_connect.php"); $keyword = FILTER_INPUT(INPUT_POST, 'keyword' ,FILTER_SANITIZE_STRING); $email = FILTER_INPUT(INPUT_POST, 'email' ,FILTER_SANITIZE_EMAIL); $subscribe_notifications = FILTER_INPUT(INPUT_POST, 'subscribe_notifications' ,FILTER_SANITIZE_STRING); $unsubscribe_notifications = FILTER_INPUT(INPUT_POST, 'unsubscribe_notifications' ,FILTER_SANITIZE_STRING); $table = 'keyword_options'; $data_values = array('email' => $email, 'sub_notify' => $subscribe_notifications, 'unsub_notify' => $unsubscribe_notifications); foreach ($data_values as $name=>$value) { // See if keyword is already in database table $filter = array('keyword' => $keyword); $result = $db->find($table, $filter); if (count($result) > 0 && $new != true) { $where = array('keyword' => $keyword, 'keyword_meta' => $name); $data = array('keyword_value' => $value); $db->update($table, $where, $data); } else { $data = array('keyword' => $keyword, 'keyword_meta' => $name, 'keyword_value' => $value); $db->create($table, $data); $new = true; // If this is a new record, always go to else statement } } unset($value); Here are some weird things that happen: When I only enter text into the email field, (i.e. - abc), it works fine, posts correctly, etc. When I enter a bogus email address with the "." before the "@", it works fine When I enter a validated email address (with the "." after the "@"), the post fails. Ideas?

    Read the article

  • Posting form using javascript and json with nested objects

    - by Tim
    I have an html form that has the following structure: <input type="text" name="title" /> <input type="text" name="persons[0].name" /> <input type="text" name="persons[0].color" /> <input type="text" name="persons[1].name" /> <input type="text" name="persons[1].color" /> I would like to serialize this into the following json: { "title":"titlecontent", "persons":[ { "name":"person0name", "color":"red" }, { "name":"person1name", "color":"blue" } ] } Notice that the number of persons can vary from case to case. The structure of the html form can change, but the structure of the submitted json can't. How is this done the easiest?

    Read the article

  • Need help with cURL and POSTing in PHP

    - by alex
    I need to post to a payment gateway. The example PHP script for the gateway simply sets the XML like this curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlRequest); // $xmlRequest is just a string of XML In all of my experience, generally you need to use an array with key/values or a string similar to GET params. I am using Kohana, and tracked down a cURL module. It accepts the POST key/values as an array only. Now, I could ditch the module and throw some cURL straight in, but I am using this module fine all throughout the site, so would prefer to use it here. So, my question is, how does that first one work? Does it just POST the whole thing without any named key? Is there a default key I could use for an array to get the module to work?

    Read the article

  • Posting New html from TINYMCE

    - by matthewb
    Seems like a simple problem, I have a form and when someone needs to edit data, the textarea that is controlled by TINYMCE loads the values, but when I change it and submit the form, the new changes are not being posted. What am I doing wrong? UPDATE How do I do it via this, or do it say on click in the editor. I am using jquery validate, this is the submit handler. $(form).ajaxSubmit({ target:'#result', success:function(){ $('html, body').animate({scrollTop:'90px'}, 500);}, clearForm: false}); }});

    Read the article

  • posting form with file upload

    - by Jan
    I am having trouble with uploading a file when using jquery. I have the following HTML in a form. <fieldset> <ul> <li> <div class="field"><input size="35" type="file" name="formFile" id="formFile"/></div> </li> <li> <div class="field"><input size="35" type="text" name="formFileName" id="formFileName" /></div> </li> </ul> </fieldset> To post the data I am using $('#myForm').ajaxForm( When I post the data and the recieved data contains some javascript, the javascript is not recognised. I expected the javscriptcode to run when the data is recieved, but it happens to early. The results indicates that $ or jquery could not be found. If I remove the name attribute from the input type=file element, there are no errors, but that is not the correct solution. How could this happen?

    Read the article

  • Make form redirect users after posting

    - by Liso22
    I need to change a form so that instead of reloading the page after submitting it, it redirects the user to another page, this is the form: <form class="questionform" name="questionform-0" id="questionform-0"> <textarea class="question-box" cols="12" rows="5" id="question-box-' . $questionformid . '" name="title" type="text" maxlength="200" size="28"></textarea> <input type="text" class="ubicacion" value="" name="question"> <input type="button" name="ask" value="Publicar" onclick="askquestion('questionform-0'); window.location.reload(true);"> I want to remove the window.location.reload and change it for a redirect that sends users to the page their comment will appear. Which is: www.chusmix.com/s?= (the content of the second field) The problem is that the content of the second field is part of the url I want to redirect, it's not simply always the same URL. So I have no idea how to do it. How do I do it? Anyway thanks for any info or whatever that points me on the right direction. Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >