Dear experts i am using code from http://stackoverflow.com/questions/9427 ... attributes
------------------------------------------
function subm(f,newtarget)
{
document.myform.target = newtarget ;
f.submit();
}
<FORM name="myform" method="post" action="" target="" >
<INPUT type="button" name="Submit" value="Submit" onclick="subm(this.form,"_self");">
<INPUT type="button" name="Submit" value="Submit" onclick="subm(this.form,"_blank");">
------------------------------------------
but it is causing two IE windows to pop. Firefox behaves fine. I am on WinXP SP2 IE6.
One of my two buttons are to populate db-resultset on bottom of same page in grid and after the grid a second post button PRINT submitting same page to launch report with same data as in grid. i have put the whole php page in IF ELSE. IF part checks if populate grid button is cliked then the default page is generated and in ELSE i check whther PRINT REPORT button is clicked i have made a non formatting page between <Table> --->RPEORT DATA<--- </Table>. hence none of the top left right bottom menus appear and just flat/simple report layout.
I m seeking solution for why IE is nehaving like this. none of the windows comes blank. one is the nomral replica of what is like before pressing any button (plus result grid) and second poped window shows my report. Firefox works perfectly showing the report layout/data in poped tab.
PHP form with two submit buttons for each “target” attribute
Moderator: General Moderators
Re: PHP form with two submit buttons for each “target” attribute
I would bet that
would fix it.
Code: Select all
function subm(f,newtarget)
{
document.myform.target = newtarget ;
f.submit();
return false;
}
<FORM name="myform" method="post" action="" target="" >
<INPUT type="button" name="Submit" value="Submit" onclick="return subm(this.form,"_self");">
<INPUT type="button" name="Submit" value="Submit" onclick="return subm(this.form,"_blank");">Re: PHP form with two submit buttons for each “target” attribute
Dear tasairis, it didnt work. could u further see what could be the problem. Thank you.
Re: PHP form with two submit buttons for each “target” attribute
Please assist...