Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

Home / 2012 / March

Monthly Archives: March 2012

HTTP Callout from Apex Class

public class simpleHTTPCallOut {public simpleHTTPCallOut(ApexPages.StandardController controller) { } String ErrorMessage; public void Login() {  ErrorMessage=”;  final string baseUrl = ‘https://login.salesforce.com/‘;  final string username = ‘test@test.com’;  final string password = ‘test@123’; Continue Reading »

Get URL Parameters (QueryStrings) using Javascript

function getQueryStringValue(key, default_){  if (default_==null) default_=””;  key = key.replace(/[\[]/,”\\\[“).replace(/[\]]/,”\\\]”);  var regex = new RegExp(“[\\?&]”+key+”=([^&#]*)”);  var qs = regex.exec(window.location.href);  if(qs == null)    return default_;  else    return qs[1];}The getQueryStringValue function is simple Continue Reading »