Javascript and PHP help?

  • Thread starter Thread starter David D
  • Start date Start date
D

David D

Guest
You don't call document.getElementById in the code you provided. The error must be coming from somewhere else.
 
I have a javascript function that i need to pass variables so i can call it in php. Here is the javascript function:

function checkBothTotals()
{
if(toatl1 > 0 && toatl2 > 0)
{
document.write('<a href="php_page.php?toatl1='+toatl1+'&toatl2='+toatl2+'">See Next Page!</a>');

total1 and total2 are both global variables in javascript. But for some reason i get the error:
document.getElementById(...)' is null or not an object.

Please help.
}
}
Well i get the before the link shows up i get the error. BUT if i click it it doesnt show up but the right values appear in the URL.
 
Back
Top