0

Hello,
I'm completely new to JavaScript. My project requires to display path from pointA to pointB on GoogleMaps using gps coordinates.
For now all I'm trying to do is to display google maps webpage to start off.
Using an online editor I was able to do that but when put the code in the Eclipse it won't do it.

<html>
<head>

<script type="text/javascript">
function open_win()
{
window.open("http://www.maps.google.com","_blank","toolbar=yes, 
location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, 
resizable=no, copyhistory=yes, width=400, height=400");

}
</script>
</head>

<body>
<form>
<input type="button" value="Click to view Map" onclick="open_win()">
</form>
</body>

</html>

I'm using eclipse with the JSEclipse plug in. When the browser opens it only shows the button but when I click on it nothing happens, but it did in online browser.
What am I missing please?

Edited by tashaX: n/a

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by chintan@dani
0

There is no problem in your javascript code.
but don't break following code in lines manually.

window.open("http://www.maps.google.com","_blank","toolbar=yes,location=yes, directories=no, status=no, menubar=yes, scrollbars=yes,resizable=no, copyhistory=yes, width=400, height=400");

It will work.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.