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

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

Pass title from my site to q2a

+1 vote
Hi my functionality is that a user types the question title on my page(implemented in java) and when he clicks submit he is redirected to my question2answer website with the title already filled up.

How can i implement this?

This is exactly how i want it to be

www.puerto-vallarta-directory.com
asked Jul 20, 2010 in Q2A Core by bhargavay5

1 Answer

+3 votes
 
Best answer
Hello bhargavay5

Here is the code I am using on http://www.puerto-vallarta-directory.com/ :

<form method="post" action="http://www.questions.com.mx/ask/">
<table class="qa-form-tall-table-bbb">
<tbody>

<tr>
<td class="qa-form-tall-label-bbb" colspan="2">Do You have questions about Puerto Vallarta ?
</td>
</tr>

<tr>
<td class="qa-form-tall-data-bbb" colspan="2">
<textarea name="title" rows="3" cols="60" class="qa-form-tall-text-bbb" onfocus="this.value=''; this.style.color='#000000'; this.onfocus=null;" >Enter Your question here...</textarea>
</td>
</tr>

<tr>
<td>
<div class="qa-form-tall-note-bbb">You will be redirected to <a href="http://www.questions.com.mx/">Questions.com.mx</a></div>
</td>

<td>
<input name="doask1" title="" value="ASK NOW" onmouseout="this.className=\'qa-form-tall-button-bbb qa-form-tall-button-ask-bbb\';" onmouseover="this.className=\'qa-form-tall-hover-bbb qa-form-tall-hover-ask-bbb\';" class="qa-form-tall-button-bbb qa-form-tall-button-ask-bbb" type="submit" />
</td>
</tr>

</tbody>
</table>
</form>

It is html only, but I hope You can implement it in JAVA as well, I dont know about Java.

If You want to see the classes use firebug or drop a note and I add them here.

Hope this helps.

( By the way, You need to change the domainnames. )

On my site I am as well adding the category where the user is when asking as tag. I did not add here, because this depends on variables of my directory.
So, if a user asks, question title and tags are transferred to my q2a site.

Please feel free to try it on my directory site, just use real questions not things like "adsf dsfsdf  dfs fdafd dsf df " , You know...

Regards

monk333
answered Jul 20, 2010 by monk333
edited Jul 20, 2010 by monk333