HighDots Forums  

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

Javascript JavaScript language (comp.lang.javascript)


Discuss How to add a text-button (like a hyperlink)? in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Daniish
 
Posts: n/a

Default How to add a text-button (like a hyperlink)? - 06-13-2008 , 07:37 AM






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

Reply With Quote
  #2  
Old   
SAM
 
Posts: n/a

Default Re: How to add a text-button (like a hyperlink)? - 06-13-2008 , 08:51 AM






Daniish a écrit :
Quote:
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


Reply With Quote
  #3  
Old   
Daniish
 
Posts: n/a

Default Re: How to add a text-button (like a hyperlink)? - 06-13-2008 , 09:50 AM



That's a brilliant answer - thanks for the choice

Reply With Quote
  #4  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: How to add a text-button (like a hyperlink)? - 06-13-2008 , 04:37 PM



Daniish wrote:
Quote:
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>


Reply With Quote
  #5  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: How to add a text-button (like a hyperlink)? - 06-14-2008 , 06:47 AM



Daniish wrote:
Quote:
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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.