Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
877 views
in Q2A Core by
edited by

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
by

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>

by
I added it but  this button doesn't seem to work
by
I do not see it. have you removed it ?
by
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
by
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?
...