Advertisement:
NameCheap

Author Topic: href="javascript:void(0);" and the problems with my backslash  (Read 2293 times)

Offline Unregistriert

  • Semi-Newbie
  • *
  • Posts: 20
Hello,

I try to write my own add on. This add on has me inspired.

In the manuals is the following code used:

Code: [Select]
<a href="javascript:void(0);" onclick="replaceText(\'', $variable, '\', '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;" style="text-decoration: none;"><img src=\'images', $variable, '\' align="bottom" alt="', $variable, '" title="', $variable, '" /></a> ';
The variables called like:  '\name'  or '\name\name\'  or something like that.

My problem is, that javascript ignores the backslash, and in the image-tag it is shown.

If i use double-backslash so that the javascript shows one, the image-tag shows both.

has anyone an idea, how i can close this problem?

thx :)

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,519
  • Young and Foolish
    • SimplePortal
Re: href="javascript:void(0);" and the problems with my backslash
« Reply #1 on: July 13, 2009, 01:02:55 PM »
Well, it is hard to guess the problem and offer a solution with a very little portion of code here. Can you provide all the code?

If you have quotes in the text you are inserting, then you need to use a different name for image file though.
Former SMF Core Developer | My Mods | My Anime List | SimplePortal | Samanyolu Fanları

Offline Unregistriert

  • Semi-Newbie
  • *
  • Posts: 20
Re: href="javascript:void(0);" and the problems with my backslash
« Reply #2 on: July 13, 2009, 02:03:06 PM »
Hi  :)

okay, it's possible, that it is hard, to guess the problem.

now complete explanation:

I want to use a math-editor for my forum. So I found THIS modification. But I think, there is a problem for users, which are not that experienced with the TeX-program (it based on). So I asked HERE for a "bigger" modification, with choseable options of symbols.

Like this:

[nofollow]


I didn't found a modification, which I like, so I decided, I program my own  :)


Inspired on THIS modification i started to coding....



This is my result :)
[nofollow]

I started to duplicate the "swapOptions" (no smileys, fileupload...) on the bottom of the text-area, moved it to the top, the icon behind the buttons for the bb-styles, an the new field between the smiley-bar and the text area.


In the Post.template.php must be find the following code:
Code: [Select]
// If this is a poll - use some javascript to ensure the user doesn't create a poll with illegal option combinations.
insert this before:
Code: [Select]
echo '
function swapMathOptions()
{

document.getElementById("postMoreMathOptions").style.display = currentSwap ? "" : "none";

currentSwap = !currentSwap;
}';


then it mus be find the following code:
Code: [Select]
// Now start printing all of the smileys.
if (!empty($context['smileys']['postform']))

in the echo-tag over it (which is closing a table with </td></tr>) must be insert before that </td></tr>:
Code: [Select]
<img src="', $settings['images_url'], '/bbc/divider.gif" alt="|" style="margin: 0 3px 0 3px;" /><a href="javascript:swapMathOptions();"><img src="Themes/default/images/bbc/tex.gif" align="bottom" width="23" height="22" alt="LaTeX" title="LaTeX" style="background-image: url(Themes/default/images/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>

Finally it must be insert the new area:

It must be searched the following code:
Code: [Select]
// Finally the most important bit - the actual text box to write in!
insert this before:
Code: [Select]
// Display the check boxes for all the special options!
echo '
<tr>
<td align="right"></td>
<td valign="middle">
<div id="postMoreMathOptions">

<!--<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?" align="middle" alt="" title="" />
http://www.forkosh.dreamhost.com/mimetex.cgi?
[tex][/tex] -->


<link rel="stylesheet" type="text/css" href="Themes/default/tabcontent.css" />
<script type="text/javascript" src="Themes/default/tabcontent.js"></script>


<ul id="countrytabs" class="shadetabs">
<li><a href="#" rel="country1" class="selected">
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\alpha}{\delta}" align="bottom" alt="{\alpha}{\delta}" title="{\alpha}{\delta}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\alpha}{\delta}
[tex]{\alpha}{\delta}[/tex]--></li>
<li><a href="#" rel="country2">
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{a}\times{b}" align="bottom" alt="{a}\times{b}" title="{a}\times{b}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{a}\times{b}
[tex]{a}\times{b}[/tex]--></a></li>
<li><a href="#" rel="country3">
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{f(x)}" align="bottom" alt="{f(x)}" title="{f(x)}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{f(x)}
[tex]{f(x)}[/tex]--></a></li>
</ul>


<div style="border:1px solid gray; width:500px; margin-bottom: 1em; padding: 10px">

<div id="country1" class="tabcontent">
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\alpha}" align="bottom" alt="{\alpha}  " title="{\alpha}  " />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\alpha}
[tex]{\alpha}[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\beta}" align="bottom" alt="{\beta}" title="{\beta}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\beta}
[tex]\beta[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\gamma}" align="bottom" alt="{\gamma}" title="{\gamma}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\gamma}
[tex]\gamma[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\delta}" align="bottom" alt="{\delta}" title="{\delta}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\delta}
[tex]\delta[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\epsilon}" align="bottom" alt="{\epsilon}" title="{\epsilon}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\epsilon}
[tex]\epsilon[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\zeta}" align="bottom" alt="{\zeta}" title="{\zeta}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\zeta}
[tex]\zeta[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\eta}" align="bottom" alt="{\eta}" title="{\eta}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\eta}
[tex]\eta[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\theta}" align="bottom" alt="{\theta}" title="{\theta}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\theta}
[tex]\theta[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\iota}" align="bottom" alt="{\iota}" title="{\iota}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\iota}
[tex]\iota[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\kappa}" align="bottom" alt="{\kappa}" title="{\kappa}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\kappa}
[tex]\kappa[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\lambda}" align="bottom" alt="{\lambda}" title="{\lambda}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\lambda}
[tex]\lambda[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\mu}" align="bottom" alt="{\mu}" title="{\mu}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\mu}
[tex]\mu[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\nu}" align="bottom" alt="{\nu}" title="{\nu}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\nu}
[tex]\nu[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\xi}" align="bottom" alt="{\xi}" title="{\xi}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\xi}
[tex]\xi[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\pi}" align="bottom" alt="{\pi}" title="{\pi}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\pi}
[tex]\pi [/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\rho}" align="bottom" alt="{\rho}" title="{\rho}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\rho}
[tex]\rho [/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\sigma}" align="bottom" alt="{\sigma}" title="{\sigma}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\sigma}
[tex]\sigma[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\tau}" align="bottom" alt="{\tau}" title="{\tau}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\tau}
[tex]\tau[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\upsilon}" align="bottom" alt="{\upsilon}" title="{\upsilon}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\upsilon}
[tex]\upsilon[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\phi}" align="bottom" alt="{\phi}" title="{\phi}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\phi}
[tex]\phi[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\chi}" align="bottom" alt="{\chi}" title="{\chi}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\chi}
[tex]\chi[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\psi}" align="bottom" alt="{\psi}" title="{\psi}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\psi}
[tex]\psi[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\omega}" align="bottom" alt="{\omega}" title="{\omega}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\omega}
[tex]\omega [/tex]-->

                      <br>      <br>



<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\Gamma}" align="bottom" alt="{\Gamma}" title="{\Gamma}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\Gamma}
[tex]\Gamma[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\Delta}" align="bottom" alt="{\Delta}" title="{\Delta}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\Delta}
[tex]\Delta[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\Theta}" align="bottom" alt="{\Theta}" title="{\Theta}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\Theta}
[tex]\Theta[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\Lambda}" align="bottom" alt="{\Lambda}" title="{\Lambda}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\Lambda}
[tex]\Lambda[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\Xi}" align="bottom" alt="{\Xi}" title="{\Xi}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\Xi}
[tex]\Xi[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\Pi}" align="bottom" alt="{\Pi}" title="{\Pi}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\Pi}
[tex]\Pi [/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\Sigma}" align="bottom" alt="{\Sigma}" title="{\Sigma}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\Sigma}
[tex]\Sigma[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\Upsilon}" align="bottom" alt="{\Upsilon}" title="{\Upsilon}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\Upsilon}
[tex]\Upsilon[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\Phi}" align="bottom" alt="{\Phi}" title="{\Phi}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\Phi}
[tex]\Phi[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\Psi}" align="bottom" alt="{\Psi}" title="{\Psi}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\Psi}
[tex]\Psi[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\Omega}" align="bottom" alt="{\Omega}" title="{\Omega}" />
<!--http://www.forkosh.dreamhost.com/mimetex.cgi?{\Omega}
[tex]\Omega [/tex]-->
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\dot V}" align="bottom" alt="{\dot V}" title="{\dot V}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\dot V}
[tex]{\dot V}[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\ddot m}" align="bottom" alt="{\ddot m}" title="{\ddot m}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\ddot m}
[tex]{\ddot m}[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\vec a}" align="bottom" alt="{\vec a}" title="{\vec a}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\vec a}
[tex]{\vec a}[/tex]-->

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\emptyset}" align="bottom" alt="{\emptyset}" title="{\emptyset}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\emptyset}
[tex]{\emptyset}[/tex]-->

</div>










<div id="country2" class="tabcontent">

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\frac{a}{b}" align="middle" alt="\frac{a}{b}" title="\frac{a}{b}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?\frac{a}{b}
[tex]\frac{a}{b} [/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{a}+{b}" align="middle" alt="{a}+{b}" title="{a}+{b}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?a+b
[tex] {a}+{b} [/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{a}-{b}" align="middle" alt="{a}-{b}" title="{a}-{b}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?a-b
[tex] {a}-{b} [/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{a}\times{b}" align="middle" alt="{a}\times{b}" title="{a}\times{b}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{a}\times{b}
[tex]{a}\times{b}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\neq}" align="middle" alt="{\neq}" title="{\neq}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\neq}
[tex]{\neq}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\ge}" align="middle" alt="{\ge}" title="{\ge}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\ge}
[tex]{\ge}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\le}" align="middle" alt="{\le}" title="{\le}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\le}
[tex]{\le}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{sqrt{\beta}}" align="middle" alt="{sqrt{\beta}}" title="{sqrt{\beta}}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{sqrt{\beta}}
[tex]{sqrt{\beta}}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{sin(x)}" align="middle" alt="{sin(x)}" title="{sin(x)}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{sin(x)}
[tex]{sin(x)}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{360^\circ}" align="middle" alt="{360^\circ}" title="{360^\circ}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{360^\circ}
[tex]{360^\circ}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{X^{n}}" align="middle" alt="{X^{n}}" title="{X^{n}}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{X^{n}}
[tex]{X^{n}}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{{X}_{n}}" align="middle" alt="{{X}_{n}}" title="{{X}_{n}}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi? {{X}_{n}}
[tex]{{X}_{n}}[/tex]-->

</div>











<div id="country3" class="tabcontent">

<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\sum_{k=1}^N k^2}" align="middle" alt="{\sum_{k=1}^N k^2}" title="{\sum_{k=1}^N k^2}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\sum_{k=1}^N k^2}
[tex]{\sum_{k=1}^N k^2}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\int_{-N}^N e^x\,dx}" align="middle" alt="{\int_{-N}^N e^x\,dx}" title="{\int_{-N}^N e^x\,dx}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\int_{-N}^N e^x\,dx}
[tex]{\int_{-N}^N e^x\,dx}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{n \choose k}" align="middle" alt="{n \choose k}" title="{n \choose k}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{n \choose k}
[tex]{n \choose k}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\begin{pmatrix}{a_1}&{a_2}&{a_3}\\\{b_1}&{b_2}&{b_3}\\\{c_1}&{c_2}&{c_3}\end{pmatrix}}" align="middle" alt="{\begin{pmatrix}{a_1}&{a_2}&{a_3}\\{b_1}&{b_2}&{b_3}\\{c_1}&{c_2}&{c_3}\end{pmatrix}}" title="{\begin{pmatrix}{a_1}&{a_2}&{a_3}\\{b_1}&{b_2}&{b_3}\\{c_1}&{c_2}&{c_3}\end{pmatrix}}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\begin{pmatrix}{a_1}&{a_2}&{a_3}\\{b_1}&{b_2}&{b_3}\\{c_1}&{c_2}&{c_3}\end{pmatrix}}
[tex]{\begin{pmatrix}{a_1}&{a_2}&{a_3}\\{b_1}&{b_2}&{b_3}\\{c_1}&{c_2}&{c_3}\end{pmatrix}}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\begin{vmatrix}{a_1}&{a_2}&{a_3}\\\{b_1}&{b_2}&{b_3}\\\{c_1}&{c_2}&{c_3}\end{vmatrix}}" align="middle" alt="{\begin{vmatrix}{a_1}&{a_2}&{a_3}\\{b_1}&{b_2}&{b_3}\\{c_1}&{c_2}&{c_3}\end{vmatrix}}" title="{\begin{vmatrix}{a_1}&{a_2}&{a_3}\\{b_1}&{b_2}&{b_3}\\{c_1}&{c_2}&{c_3}\end{vmatrix}}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\begin{vmatrix}{a_1}&{a_2}&{a_3}\\{b_1}&{b_2}&{b_3}\\{c_1}&{c_2}&{c_3}\end{vmatrix}}
[tex]{\begin{vmatrix}{a_1}&{a_2}&{a_3}\\{b_1}&{b_2}&{b_3}\\{c_1}&{c_2}&{c_3}\end{vmatrix}}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{}^4_2\mathrm{He}" align="middle" alt="{}^4_2\mathrm{He}" title="{}^4_2\mathrm{He}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{}^4_2\mathrm{He}
[tex]{}^4_2\mathrm{He}[/tex]-->
&nbsp;
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?{\lim_{n\to{\infty}}x_n}" align="middle" alt="{\lim_{n\to{\infty}}x_n}" title="{\lim_{n\to{\infty}}x_n}" />
<!-- http://www.forkosh.dreamhost.com/mimetex.cgi?{\lim_{n\to{\infty}}x_n}
[tex]{\lim_{n\to{\infty}}x_n}[/tex]-->


</div>





</div>


<script type="text/javascript">

var countries=new ddtabcontent("countrytabs")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()

</script>







</div>
</td>
</tr>';













// Show list of Vietnamese characters
$maths = array(
'{\Omega}', '{\Sigma}'
);


echo '
<tr>
<td align="right"></td>
<td valign="middle">';
foreach ($maths as $math)
echo '<a href="javascript:void(0);" onclick="replaceText(\'', $math, '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;" style="text-decoration: none;"><img src=\'http://www.forkosh.dreamhost.com/mimetex.cgi?', $math, '\' align="bottom" alt="', $math, '" title="', $math, '" /></a> ';


         echo  "<img src=\"http://www.forkosh.dreamhost.com/mimetex.cgi?{\Omega}\" align=\"bottom\" alt=\"{\Omega}\" title=\"{\Omega}\" />";
echo '
</td>
</tr>';



















// Show list of Vietnamese characters
$vietCharsM = array(
'Ä?', 'ỵ'
);
$vietCharsC = array(
'Ä?', 'á»´'
);

echo '
<tr>
<td align="right"></td>
<td valign="middle">';
foreach ($vietCharsM as $vietChar)
echo '<a href="javascript:void(0);" onclick="replaceText(\'', $vietChar, '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;" style="text-decoration: none;">', $vietChar, '</a> ';

echo '
</td>
</tr>';
echo '
<tr>
<td align="right"></td>
<td valign="middle">';
foreach ($vietCharsC as $vietChar)
echo '<a href="javascript:void(0);" onclick="replaceText(\'', $vietChar, '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;" style="text-decoration: none;">', $vietChar, '</a> ';

echo '
</td>
</tr>';

Finally the modifications from the "Tag LaTeX" are needed (Link I posted on top)


I know there is much useless code, and some errors, but the most is working :)


The tab-Script I found HERE [nofollow]
then there are needed following files:

tabcontent.css
tabcontent.js

(in the moment in the "Themes/default/" directory)


I think, that should it be...

I uploaded my files for the Version 1.1.4



Here it is working:
http://fhgefb02.de/___test/index.php?action=post;topic=1.0;num_replies=2 [nofollow]

Offline Unregistriert

  • Semi-Newbie
  • *
  • Posts: 20
Re: href="javascript:void(0);" and the problems with my backslash
« Reply #3 on: July 13, 2009, 02:12:37 PM »
To change the file-names i am not able, it caused, the math-script from http://www.forkosh.dreamhost.com [nofollow] used this:

{\Omega}


{\begin{pmatrix}{a_1}&{a_2}&{a_3}\\{b_1}&{b_2}&{b_3}\\{c_1}&{c_2}&{c_3}\end{pmatrix}}




certainly I am able to write for each icon:
Code: [Select]
<a href="javascript:void(0);" onclick="replaceText(\'{\\\Omega}\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;" style="text-decoration: none;"><img src=\'http://www.forkosh.dreamhost.com/mimetex.cgi?{\Omega}\' align="bottom" alt="{\Omega}" title="{\Omega}" /></a>
to show the Icons in the Forum, i did, but I think it is too pedantically. :)