post

Asp.NET MVC Redirect not working

The following examples are redirects wich we're trying. The first one, for user login, works, after that no redirect works. I have no idea about what may be the cause, tried redirecttoroute too, it is like if the server wasn't sending the headers or anything. I have no sniffing software to check this out. UrlHelper uH = new UrlHelper(ne...

IIS6 hosted WCF service in SSL on nonstandard port, WebInvoke vs WebGet

I have a WCF service hosted in IIS6 with a method called DoSomething that I can access like https://mysite.com:8888/mysvc.svc/DoSomething (note its using https not http..and on a nonstandard port) I have setup wildcard mapping in IIS6. If I decorate DoSomething with a WebGet Attribute in the interface, I access the service method via ...

Using jQuery in a Wordpress post

I'm wanting to post live jQuery examples in my Wordpress posts, and so need to be able to include working code in the actual post itself. I've turned off the WYSIWYG editor and any settings which may mess up my code when I publish. I've also, through the exec-php plugin, been able to get php code working in-post, but this (admittedly old...

send HTML Code in Textarea to PHP via Form

Hi, i want to have a textarea where I can edit html code directly. After submitting the form the content if the textarea (with html tags) should be saved to a MySQL database. I use PHP to receive the date and save it to the database. My problem is, that the HTML code is not properly sent to PHP. I do not receive the HTML code but just th...

Simple way to select chosen option in <select> from the value given by $_POST?

How can i add the selected="selected" bit to the option in an HTML <select> input from the sent $_POST data without an if statement within each option? ...

Help with a form being submitted and .htaccess rule

I use this rule so all URLs have a trailing slash rewriteRule ^(([a-z0-9\-]+/)*[a-z0-9\-]+)$ $1/ [NC,R=301,L] it will convert /about to /about/ The problem is, however, if I submit a form (POST) to /about, when it rewrites to /about/, it loses all the POST info ($_POST in PHP is blank) is there a way to rewrite it for everything exc...

Using object in the jQuery post parameter

I'm thinking this is not possible but I would like some insight as to why. I want to do something like this: var pVals = { ob1: "postvar1", ob2: "postvar2", ob3: "postvar2" }; $.post("php/dosomething.php",{pVals.ob1:"object 1", pVals.ob2:"object 2", pVals.ob3:"object 3"}); I get an error along the lines of: missing : ...

What should an XML post request look like for WCF RESTful service with a single parameter?

I am having trouble working out what my XML should look like when performing a post request through WCF REST services. When using a datacontract i have no problem at all but when i just want to send across one parameter for example an int, i get the following error - "The remote server returned an error: (405) Method Not Allowed. " [Ope...

jquery .post not working

High! I just wondered why this won't work? $.post($("#jsCheckoutForm_1b").attr("action"), { sLoginName: $("#sLoginName").val(), sPassword: $("#sPassword").val() }, function(sData){ alert(sData); } ); the fun thing is that if i hard code the action in stead of using $("#jsCheckoutForm_1b").attr("action"), th...

What does the xml look like for a wrapped wcf post call?

I have a wcf restful service with a operation contract that contains two values - an int and a string. This is a post call as well. If i wrap the call using the BodyStyle = WebMessageBodyStyle.Wrapped. What should i assume the xml request will now look like? ...

log4net: Is there an easy way to use HTTP POST to send error logs to a URI?

I'm pretty new to Log4Net (I used log4j), and I'm wondering the best strategy for sending error logs (on Error or Fatal Error) to a URI. The server's already set up and listening. I was going to risk re-inventing the wheel and extend the AppenderSkeleton class to create a POSTAppender. Is there any easier way to do it? ...

jquery solutions to post to another site from static html page

Need to post data from a static html page to another page which is hosted on another domain. Normally I'd create and iframe with a form inside of it with a post method, and whose actions is directed to that web page, and finally submit that form. The complexity is I'd collect data from my static html page and create a similar (replica) f...

GM_xmlhttpRequest - triggers on Parent and Iframe windows - should only trigger on Parent window

I am building a GreaseMonkey test script that makes a GM_xmlhttpRequest each time a specific site is visited. GM_xmlhttpRequest should only trigger on the first "document" found (the parent window) and it should ignore iframes and other child windows (I don't want the url for the iframes). Some thoughts and possible solutions: 1) I tri...

Java: Gzip string to output string

How do I take a string and use something like GZIPOutputStream to gzip the string and then output the zipped content as a string. My intention is to transfer the zipped content as a post variable through HTTP. ...

Asp.Net MVC post action result

How do you set the result of an action result to use Post and not Get. I need to redirect the result to an external site that requires the data to be sent using the post method. (Would like to know also how to redirect to another action with a httpverbs.post filter - but not as important for me at this point). ...

How to clip HTML fragments without breaking up tags?

Say I have a 200 character string that contains HTML markup. I want to show a preview of just the first 50 chars. without 'splitting up' the tags. In other words, the fragment should not contain a <b> without a </b>. Any server side processing should be in PHP. ...

Automate Post Of Login Details User & Password Into Safari For Scraping

Hi To All, I am wanting to automate the input of post variables on a login page for the purpose of webscraping. It would improve the process no end if I can get past the login page. Then I can schedule some functions to run on cycle automatically. (Had a go with some CURL commands but could not get the result) Thanks for any help,...

How should I write PHP $_POST vars in a mysql_query function?

Hi all, In accessing my database, I have the user fill out a form, and in the target page, the posted values are used in the resulting MySQL query. $query = mysql_query("SELECT pass FROM database WHERE user='$_POST[user]'"); However, for some reason or another, MySQL doesn't like my using a $_POST variable in the command, and it only...

Ajax post via https from an http page

I have an ajax call that really needs to be https. However, the page that it is being called from is http. The browser complains about restricted URI denied, presumably due to the same origin policy. Are there any known workaround for this? ...

How to POST Data to another web application using REST or otherwise

Hi Please consider the following scenario, There are two web applications App1 & App2. A user would submit his information on App1 though a form. On click of a specific button/link on App1, the same data should be posted to a page on App2 and the user should also be redirected to the same page on App2. I would like some help in find...