Well, well, well... I've been busy today !
This is the last thing I found : After all trouble I have had to print a quiet complex and very long form, I'd like to be able to delete some items on this form !
Isn't it cool ?!?!?! :evil:
So this is the script I do not want to use:
1] In the head tag:
<SCRIPT LANGUAGE=JavaScript>
function myconfirm( Item )
{ return confirm("Are you sure you want to delete "
+ Item + " ?");
}
2] Far further on, somewhere in this very long script...
echo "<form method=post action=
Delete_Item.php name=fdelete>\n";
echo "<input type=Hidden name=\"Item\" VALUE=
".$r["Product_Name"].">\n
<input type=button name=_submit value=Delete
onClick=\"if(myconfirm('".$r["Product_Name"]."')){document.fdelete.submit();}\">".$r["Product_Name"]."
</form>\n";
3] The result:
It looks great, when you click on the Delete button, you get the right warning with the right name, BUT.... If you click on OK
you get the most famous JAVASCRIPT ERROR ever invented :
THE Famous ERROR RUNTIME - This method is not supported by this object, do you want to debug? SoI did, and it point to the function itself "{document.fdelete.submit();}" ...
If somebody out there can tell me, even better show me what I do wrong, it will be a release for me and my over-heated brain.
Thanks to all of you,
Erick.



