Jump to content

Mathematical expressions


gaya

Recommended Posts

Hi,Please tell me how to include all mathematical expressions in a clipboard and when clicking the font button, the clipboard is to get open. After by selecting the expression,corresponding value is seen between the font tags. Is it possible to do.Please tell me.

Link to comment
Share on other sites

Mathematical expressions are a really complicated thing to handle. HTML is not prepared for it, so the current approach is to use images of the expressions. Font tags are deprecated, so you shouldn't be using them, anyways. There's a language called MathML but there's almost no support for it in browsers, and less if the expressions is embedded on the page.

Link to comment
Share on other sites

Thanks for the reply Ingolme.Actually after clicking the button the corresponding values will be seen like <font>π</font> in my database.This is the value seen in database in the font tag π-π

Edited by gaya
Link to comment
Share on other sites

Special characters aren't difficult to handle, you can use entities to represent them. Just look for the proper code for each character in one of these tables:http://www.w3schools.com/tags/ref_entities.asphttp://www.w3schools.com/tags/ref_ascii.asphttp://www.w3schools.com/tags/ref_symbols.asp As for things that can't be represented with HTML I was referring to fractions, limits and summatories in my previous post.

Link to comment
Share on other sites

It would require Javascript. A simple example of how it could work is like this:

<button id="pi">π</button><textarea id="destination"></textarea> <script>document.getElementById("pi").onclick = function() {    document.getElementById("destination").value += "π";}</script>

  • Like 1
Link to comment
Share on other sites

Thanks Ingolme. The code you preferred is perfectly working and this is the thing what i want. But you selected it with specific id. If i'm having two textareas means how it is possible. Also please tell me, it should be viewed inbetween the font tag. And also please tell me for all other values whether the same function is used.

Edited by gaya
Link to comment
Share on other sites

You're going to have to learn Javascript in order to build up on this. The code I gave is really simple, if you learn Javascript you should be able to modify it to work the way you want it to. You'll need one <button> or <input type="button"> for each symbol you want to add to the textarea. You need to use HTML DOM to select the elements you want to apply event listeners to or to modify.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...