HomeHome Product Discus... Product Discus...SmithCartSmithCartJavascript to get main image urlJavascript to get main image url
Previous
 
Next
New Post
9/11/2013 9:34 PM
 
I have added a javascript function am  trying to the url of the main product image in the ProductMain.ascx template ..\Portals\0\SmithCart\Templates.
But whenever I call it from another event or function on the page it always returns null.  Is this the correct way to do it? Or is there a better way?

<script type="text/javascript">
function getImageUrl() {
        var imagesLength = document.images.length;
        var url = document.getElementById("<%=myMainImage.ClientID%>").value;
        return url;
    }</script>
 
New Post
9/12/2013 6:37 PM
 
Hi Sondra,

Which version of the Cart and DNN are you currently using?

What are you trying to accomplish with the javascript?
 
New Post
9/12/2013 10:38 PM
 
I am using DNN 7.0.6 and Smith Cart 5.52.
What I was trying to do is dynamically add a Pinterest button because the Show Share bar (configured on the Product Details page) doesn't have it. It only has Twitter, Google plus, and Facebook.

Also, the advertised Smith Social Media Sharebar doesn't list Pinterest as an option.
 
New Post
9/13/2013 12:46 PM
 
The product details page share bar uses the telerik social share control.  Currently, the telerik social share control doesnt have built in support for pinterest but here is an article that explains how to add it:

http://www.telerik.com/community/code...

Let me know if that works for you.



At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartJavascript to get main image urlJavascript to get main image url