Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How to place answer and follow button on question list?

0 votes
422 views
asked Nov 8, 2014 in Q2A Core by Vadym
edited Nov 8, 2014 by Vadym

Hi all!

I just wanted to see answer button on question list. I put the answer button's code to the question list but it doesn't seem to work. It's just refreshing if clicked

http://qanday-qilib.uz/

 

I did it according to this answer: http://www.question2answer.org/qa/23137/post-answer-button-like-http-pokemondb-pokebase-below-answers?show=23137#q23137

 

But it isn't working 

 

Q2A version: 1.6.3

1 Answer

0 votes
answered Nov 8, 2014 by maxjtechno

You have this error :

qa_toggle_element is not defined (index):558onclick

onclick="return qa_toggle_element('anew')"

Try to include the qa-question.js javascript :

<script src="../qa-content/qa-question.js?1.6.3" type="text/javascript"></script>

commented Nov 8, 2014 by maxjtechno
However that code cannot work, the qa_toggle_element is expecting as input the id of a hidden element that is on the page, and "anew" is the id of an element (a div containing the form with the ckeditor) on the question page, not on the question list
commented Nov 8, 2014 by Vadym
I hid it (display:none)  not to confuse users.  Yes  I didn't thought about it first. Is it possible to do it? Could you help me with it?
...