By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,654 Members | 1,554 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,654 IT Pros & Developers. It's quick & easy.

How to add a text-button (like a hyperlink)?

P: n/a
Hello,

I want to include a bit of text in my Google Map Infowindow - that
when clicked maximises the infowindow.

This is the code for maximising the infowindow
map.getInfoWindow().maximize();

the text could be something as simple as:
"Open"

How do i add that to the following line of javascript:
var info = '<div id="info" style="text-align:left";><h3>' + title + '</
h3><br>' + date + '</div>';
Many thanks for your help
Jun 27 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
SAM
Daniish a écrit :
Hello,

I want to include a bit of text in my Google Map Infowindow - that
when clicked maximises the infowindow.

This is the code for maximising the infowindow
map.getInfoWindow().maximize();

the text could be something as simple as:
"Open"

How do i add that to the following line of javascript:
var info = '<div id="info" style="text-align:left";><h3>' + title + '</
h3><br>' + date + '</div>';

var info = '<div id="info" style="text-align:left";><h3>' + title +
'<\/h3><br>' + date + '<br>' +
'<button onclick="map.getInfoWindow().maximize();">zoom<\/button>' +
'<\/div>';
var info = '<div id="info" style="text-align:left";><h3>' + title +
'<\/h3><br>' + date + '<br>' +
'<a href="javascript:map.getInfoWindow().maximize();"> zoom<\/a>' +
'<\/div>';
var info = '<div id="info" style="text-align:left";><h3>' + title +
'<\/h3><br>' + date + '<br>' +
'<button onclick="map.getInfoWindow().maximize();" '+
'title="click to zoom">+<\/button>' +
'<\/div>';
var info = '<div id="info" style="text-align:left";><h3>' + title +
'<\/h3><br>' + date + '<br>' +
'<a href="javascript:map.getInfoWindow().maximize();"' +
'title="click to zoom" "style="text-decoration:none">[+]<\/a>' +
'<\/div>';
etc ...

--
sm
Jun 27 '08 #2

P: n/a
That's a brilliant answer - thanks for the choice :)
Jun 27 '08 #3

P: n/a
Daniish wrote:
That's a brilliant answer - thanks for the choice :)
Too bad that you did not quote the minimum of it.
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Jun 27 '08 #4

P: n/a
What ???
Jun 27 '08 #5

P: n/a
Daniish wrote:
What ???
<http://www.jibbering.com/faq/#FAQ2_3>
<http://www.jibbering.com/faq/faq_notes/clj_posts.html#ps1Post>
HTH

PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Jun 27 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.