Browser back button triggers previous post action in .NET webform application – solved

Recently while working on one of my .NET application I was stuck in a strange problem. I created a button and its click event to insert some entry in database and at the end of this action I used below statement to redirect the page for next step.

Response.Write("<script>top.location="next step page url";</script>");

Note: I used this method to redirect the page because I was doing it in an iframe and wanted to redirect parent page after this step is completed and next step is started. Keep on reading

Create multiple custom controls dynamically in Google Map API

If we want to create google map javascript api’s custom control then we can find the solution in developer guide of google map api but if we want to create custom control dynamically by sending its html and position in PHP then, we did not find its solution easily. I have created the custom control dynamically using javascript and PHP, so I am posting my content here, so anyone can get help. My code is here :

//Define custom control html and position here
//Here I am creating more than one custom control
<?php
$custom_control_html = array(
0 => array(‘html’=>’Control 1’, ‘position’=>’TOP_LEFT’),
1=> array(‘html’=>’Control 2’, ‘position’=>’TOP_CENTER’)
);
?> Keep on reading

Geocoding & Reverse Geocoding in Google Map Javascript API

Geocoding is a technique of Google Map API which is used to get complete information about an address like its geographic coordinates (latitude, longitude), its city, state, postal_code, country etc. In javascript, we can just simply use below code to get geographic coordinates of any location :

<script type=”text/javascript”>
var geocoder_obj = new google.maps.Geocoder(); Keep on reading

How to use Google Map Geocoding API in PHP

Google Map API has geocoding technique from which we can get information about latitude/longitude, complete address information like region, city, country etc.. of any address. We can also perform reverse geocoding by passing the latitude and longitude of a place and then can get its address and other additional information. Sometimes, we may need to use google map api in  PHP instead of javascript.

So, whenever you need to use Google Map API’s geocoding service, you can use it by sending request to this url https://maps.googleapis.com/maps/api/geocode/json?address={your_address}&key={#YOUR_API_KEY} using curl method of PHP as : Keep on reading

[Solved] How to allow user to do login after submission of gravity form

We can create gravity form of having any type of fields. If we want to create a login form using gravity form, then to allow user to do login , we will have to perform extra actions for it. Suppose if I have a gravity form having ID 1 and having username, email fields and login button, then I will have to perform extra actions in the gform_after_submission filter of gravity form, as :

add_action( ‘gform_after_submission_1’, ‘do_login’, 10, 2 ); Keep on reading