Hi guys maybe someone can help me, I useing this code to add a digg submit news button to a html web site I'm working on and the news item relates to what on each individual page, <script type="text/javascript"> digg_url = 'http://www.webaddressexample.co.uk'; digg_bgcolor = '#ffffff'; digg_skin = 'compact'; </script> <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script> </p> Trouble is I need this on over 200 pages and dont want to type in the address of each indvidual page, is there a way I can use javascript to find or get the url of the page? cheers for any help
i m also trying same thing but m doing for facebook comment pledge... my code is div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=135249243225862"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-comments" data-href="javascript:document.location.href;" data-num-posts="2" data-width="500"></div> </body> i have used javascript as told by you guys which is here in BOLD in this script... anybody tell me how this work how can i use javascript to get current page URL... Regards Hitswa
yes let me include the output of above mentioned code its like this Warning: http: //invalid.invalid/ is unreachable.