simple javascript not working?!?!?

D

Daniel Bass

why doesn't PrintGrid() get called at Print Button OnClick???!??!!

-------------------- Code in aspx file

.....initial stuff
<HEAD>
.... title and meta stuff
<SCRIPT LANGUAGE="javascript">

function GetDate(CtrlName)
{
// this method gets called??!!
....method code
}

function CheckWindow()
{
// linked into the onload body...
....method code
}

function PrintGrid()
{
alert([about to print]); // this doesn't get processed!!! Here
so i knon when it does
parent.overview.focus();
window.print();
alert([printed]);
}

</SCRIPT>
</HEAD>

<BODY onunload="CheckWindow();" MS_POSITIONING="GridLayout">

.... other HTML ...

<!-- this works and calls method above... -->
<A HREF="javascript:GetDate('txtEndDate');"><img id=btnToDate
src="images\SmallCalendar.gif" BORDER=0></A>

<!-- this doesn't even called the function?!?!? -->
<BUTTON TYPE="button"
ONCLICK="javascript:printGrid();"><b>Print</B></BUTTON>

.... more HTML and closing ...
 
D

Daniel Bass

worked, thanks James! I thought alert syntax was : (?)

alert([message]);

new to javascript and nots me favourite.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top