Jump to content

[facebook] only ones who likes can click on button

- - - - -

  • Please log in to reply
4 replies to this topic

#1
tut

tut

    Newbie

  • Members
  • PipPip
  • 15 posts
How can be done that only ones who "likes it" can click on button. In another word the download button is clickable only after click on ""like button.

#2
lespauled

lespauled

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 231 posts
  • Programming Language:C, C++, C#, JavaScript, PL/SQL, Delphi/Object Pascal, Visual Basic .NET, Pascal, Transact-SQL, Bash
Pretty simply, the state of the download link is changed on the onclick event of the like button

#3
tut

tut

    Newbie

  • Members
  • PipPip
  • 15 posts
Can you edit that code. Need example. Here is my situation

<div id="download-form">


                                <form action="" method="GET" id="download">

                                    <input type="text" name="url" value="<?= isset($url) ? $url : 'Tutaj włożyć link z youtube ...'; ?>" onclick="if(this.value == 'Tutaj włożyć link z youtube ...')this.value='';">


                                <a href="#" onclick="document.forms['download'].submit();">

                                    <span>Ściagaj</span>

                                </a>


                            </form>

                        </div>

If there is needed something more just say it.

#4
tut

tut

    Newbie

  • Members
  • PipPip
  • 15 posts
Any suggestion?

#5
lespauled

lespauled

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 231 posts
  • Programming Language:C, C++, C#, JavaScript, PL/SQL, Delphi/Object Pascal, Visual Basic .NET, Pascal, Transact-SQL, Bash
Create a download link or button, set it to hidden.

Create a "LIKE" link or button, and in it's onclick event, change the visibility of the download button to visible.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users