Need some quick JS help

Status
Not open for further replies.

rogerke

Regular Member
Joined
Oct 5, 2014
Messages
271
Reaction score
146
Ok, so I got this Facebook share code, but when hitting the share button nothing happens. Ripped it from another page where it works flawlessly.

Anyone able to fix this? A free answer in the comment section is always nice, bit I could pay $5 for this simple fix as well.

Code:
<div class="share-wrap">                        <h4 class="schritt-one"><a href="#">Step 1: Share This Page</a></h4>
                        <a id="postos" href="javascript:void(0)" onClick="gt=window.open


('https://www.facebook.com/sharer/sharer.php?u=http://www.example.com', 


'gt','top=176,left=500,toolbar=no,location=yes,directories=no,status=no, 


menubar=no,scrollbars=no,resizable=no,width=800,height=50'); gt.onload = function () 


{gt.focus();}; return false;"><strong><img src="http://i.imgur.com/ib8IFaX.gif" align="top" 


border="0"></strong></a>
                    </div>
                    <div class="like-wrap">
 
I hope you made sure to empty your inbox,a lot of developers will want their chance to claim the reward money I am sure
 
Last edited:
try replacing the the javascript:void code with the link of your page
 
Hey mate, here is your solution:

The problem was that javascript can't render multi lines like other languages, so just put all the JS code that is inside "onClick" in one line. It will work.
I can't post here because i cant post links. But do as i say, remove all spaces on your code and put all in one line, it will work, i've tested here.


Will send my paypal email through PM.

Enjoy.
 
Code:
<a id="postos" href="#" onClick="gt=window.open('https://www.facebook.com/sharer/sharer.php?u=http://www.example.com','gt','top=176,left=500,toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=800,height=50'); gt.onload = function (){gt.focus();}; return false;"><strong><img src="http://i.imgur.com/ib8IFaX.gif" align="top" border="0"></strong></a>

Fixed&Tested

Everyone send me millions of bitcoins!!!! 1JGh27VymKNLKJ2d7txL8Qz9As2zCjWnDB
 
Last edited:
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top