Forum Moderators: open
when i try i get an error of a null value cause i'm calling a text box that is in my other HTML page
any guidence would me much appreciated ...thx
Bee
this is the js code
function numb(num)
{
return "$" + Math.round(num) + ".00";
}
function Calculate()
{
var total = document.Cal.numEmp.value * document.Cal.salary.value * document.Cal.daysWork.value * document.Cal.benLoad.value * document.Cal.empAbsence.value * document.Cal.lostPerEmp.value;
document.Cal.daysLostDay.value = numb(total);
}
The first form tells the code to work its function when you hit submit.
Than the daysLostDay is the value that i would want to be seen on the next form(on another html page).
If i used framesets would it would it work better?
Could i than have the froms work with the same js code?
I'm not using frame sets right now ...just two html pages with a new form on each (I have the same form name for both forms..thinking it would populate thru out cause i have my js as an external)
sorry if i'm blabbing ...i just don't understand what i'm doing wrong or not doing
Bee
Some ways of doing what you want are
1) You submit the data from one form via either a POST or a GET and the second page will load within the same browser window.
2) One of the pages is opened by the other via window.open() method and then you can either refer to it via the name you opened the new window with, or with window.opener (depending on which window is refering to the other).
3) The first page saves the data to somewhere and the second page loads the data from there.
It depends on what you are trying to achieve which will determine which of the above you should use.