DMXzone Google Maps Support Product Page
Under consideration
Hide a print button with Google directions and Ajax autocomplete
Shared 13 years ago
1
likes this idea
13 years ago Drew Armstrong posted:
Hi,Can anyone help, I have created a Google Map with directions and Ajax autocomplete. I have created a print button which prints the directions only.
However I want to hide the print button until the directions are displayed, can anyone help with this please?
Cheers
Replies
Replied 13 years ago
13 years ago Vulcho Vulev replied:
Hello Drew.
Can you provide a link to the page in your question ?
Regards: Vulcho.
Can you provide a link to the page in your question ?
Regards: Vulcho.
Replied 13 years ago
13 years ago Drew Armstrong replied:
Hi Vulcho,
Sure thing...
www.dtxdemo.com/googlemap/
I'm not bothered about the text of the directions overlapping I can sort that out. I just don't want the Print button to display until the results show up.
Thanks for looking
Sure thing...
www.dtxdemo.com/googlemap/
I'm not bothered about the text of the directions overlapping I can sort that out. I just don't want the Print button to display until the results show up.
Thanks for looking
Replied 13 years ago
13 years ago Vulcho Vulev replied:
Hello again Drew.
I will discuss your issue with our developers , so they can implement this feature in future updates. I will notify you here when there is a solution.
I will discuss your issue with our developers , so they can implement this feature in future updates. I will notify you here when there is a solution.
Replied 13 years ago
13 years ago Drew Armstrong replied:
Hi Vulcho,
No problem, thank you for taking a look.
Yes it would be a very useful feature to make the component even better.
Cheers
Drew
No problem, thank you for taking a look.
Yes it would be a very useful feature to make the component even better.
Cheers
Drew
Replied 13 years ago
13 years ago Vulcho Vulev replied:
Hello Drew.
I have an idea:
find the following lines of code:
and edit them the following way:
I have an idea:
find the following lines of code:
<div class="printdirections"> <p> <a class="button small green" onclick="printDiv('gmDir1');return false;" href="#">Print Directions</a> </p> </div>
and edit them the following way:
<style> div.hidden { display: none; } </style> <div id="extraControls" class="hidden"> <div class="printdirections"> <p> <a class="button small green" onclick="printDiv('gmDir1');return false;" href="#">Print Directions</a> </p> </div> </div> <script> $(document).ready(function(){ $("td#adp-placemark").load(function(){ $("div#extraControls").removeClass("hidden"); }); }); </script>
Replied 13 years ago
13 years ago Drew Armstrong replied:
Hi Vulcho, thank you for taking the time to look, we are halfway there, but unfortunatley, the print button doesn't show when the results are displayed.
Thanks again
Drew
Thanks again
Drew
Replied 13 years ago
13 years ago Vulcho Vulev replied:
O.k. Drew.
Remove the code changes for now till we provide a better solution.
Regards: Vulcho.
Remove the code changes for now till we provide a better solution.
Regards: Vulcho.