Q:

Showing a Google map with a button click

I've tried to put together a single script which shows a google map when the button click and then reads the coordinates from two input fields.
This is the code I have written: http://jsfiddle.net/spadez/2r9tC/3/
// MAP DISPLAY CODE
function mapDisplay() {

var latval = $('input[id=lat]').val();
var lngval = $('input[id=lng]').val();    

    var mapOptions = {
        zoom: 8,
        center: new google.maps.LatLng(latval, lngval),
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions)
});

// 
$(function() {
    $('#action').click(mapDisplay);
});

I'm really not having any luck so I was wondering if someone could tell me where I have gone wrong. 
Thank you.

A:

You had a typo
function mapDisplay() {
    // ...
}); <--

The extra ) was the problem
Fixed it here.

