SOLVED
I have a damage calculator on my ot's website, it's written on javascript. As soon as you type a number(onKeyUp), it already makes the calculations, so you don't need to press the submit button each time you change a value.
I want to make this calculator in PHP, but I want to make it instant too, I don't want the page to be reloaded when you click submit, I want submit to show the results right there.
So I was thinking in having a form send data to an iframe(using post). I know how to make links that target an iframe, but what I need is that when you click submit on the form, it's sends the data(magic level, lvl, etc) to the iframe, so I can make the math there.
For example:
I fill the form:
Level: 100
Magic Level: 40
It should target the iframe to.... "damagecalc.php?lvl=100&ml=40", so in damagecal.php, I can get that info using $_REQUEST['lvl'] for example
I have looked all over google and I can't find how to do this, and I have tried this a lot.
Hope someone understands what I'm saying
Thanks
I have a damage calculator on my ot's website, it's written on javascript. As soon as you type a number(onKeyUp), it already makes the calculations, so you don't need to press the submit button each time you change a value.
I want to make this calculator in PHP, but I want to make it instant too, I don't want the page to be reloaded when you click submit, I want submit to show the results right there.
So I was thinking in having a form send data to an iframe(using post). I know how to make links that target an iframe, but what I need is that when you click submit on the form, it's sends the data(magic level, lvl, etc) to the iframe, so I can make the math there.
For example:
I fill the form:
Level: 100
Magic Level: 40
It should target the iframe to.... "damagecalc.php?lvl=100&ml=40", so in damagecal.php, I can get that info using $_REQUEST['lvl'] for example
I have looked all over google and I can't find how to do this, and I have tried this a lot.
Hope someone understands what I'm saying
Thanks
Last edited: