|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
OnClick
i had a JS func to open a new window . The problem is that i hav another javascript func that takes 2 search parameters and only using that the new window must show the results. how can it be possible .i willsend my first JS
################################################## <script language="JavaScript"> function query(tstampFrom,tstampTo) { document.frm2.tstampFrom.value=tstampFrom; document.frm2.tstampTo.value=tstampTo; document.frm2.submit(); } </script> ################################################## the second one ############################################### <script language="JavaScript"> var newWin = null; function popUp(strURL, strType, strHeight, strWidth) { if (newWin != null && !newWin.closed) newWin.close(); var strOptions=""; if (strType=="console") strOptions="resizable,height="+ strHeight+",width="+strWidth; if (strType=="fixed") strOptions="status,height="+ strHeight+",width="+strWidth; if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,"+ "resizable,location,height="+ strHeight+",width="+strWidth; newWin = window.open(strURL, 'newWin', strOptions); newWin.focus(); } </script> ################################################ The ahref call <td width="40%" valign="middle" align="center" class="txtOne"><a href="#" onClick="query('<?=$tstampFrom?>','<?=$tstampTo?>')" "popUp(this.href,'console',400,600);return false;" target="_blank"><b>Print This Page</b></a></td> This is not working Pls help me Thanx in Advance |
|
#2
|
|||
|
|||
|
RE: OnClick
i hav found an answer to that
################################################## ####just call the query() and from thier u call the popup() and return to the called func simple i will give the complete code changes ################################################## # <script language="JavaScript"> function query(tstampFrom,tstampTo) { document.frm2.tstampFrom.value=tstampFrom; document.frm2.tstampTo.value=tstampTo; popUp('print.php?tstampFrom='+tstampFrom+'&tstampTo='+tstampTo,'console',500,700); } </script> ################################################## ## <script language="JavaScript"> var newWin = null; function popUp(strURL, strType, strHeight, strWidth) { if (newWin != null && !newWin.closed) newWin.close(); var strOptions=""; if (strType=="console") strOptions="resizable,height="+ strHeight+",width="+strWidth; if (strType=="fixed") strOptions="status,height="+ strHeight+",width="+strWidth; if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,"+ "resizable,location,height="+ strHeight+",width="+strWidth; newWin = window.open(strURL, 'newWin', strOptions); newWin.focus(); return;---------------------> The Only Change } </script> ############################################## <td <a href="#" onClick="query('<?=$tstampFrom?>', '<?=$tstampTo?>')"><b>Print</a> ################################################ |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > OnClick |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|