Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
DazAdams webforumsuser@macromedia.com #1
Why wont the code in the else block run ?
Hi just a quick question.
I have a block of code to stop a user double clicking button (adapted from a double form submit blocker).
Simple question really, the code seems to work but, nothing in the else block gets run!! Therefore the I can't pop up a message to tell the user they have allready told it to open the print window etc..
-Daz
------------------------------------------------------------------------------------
Code is as follows:
code in included page
------------------------------
<script language="JavaScript">
function clsFormSubmission() {
var bFormPosted = false;
this.docTitle = false;
this.docStatus = false;
this.canSubmit = function() {
if (bFormPosted) {
return false;
} else {
bFormPosted = true;
if (this.docTitle) { document.title = this.docTitle; }
if (this.docStatus) { document.status = this.docStatus; }
//alert('Posted. thanks...');
return true;
}
};
}
var oFrmSubmission = new clsFormSubmission();
oFrmSubmission.docTitle = 'The page is currently loading, Please wait...';
</script>
code in main page
------------------------
<script>
function canPrint()
{
canPrint = function() {oFrmSubmission.canSubmit();};
if (canPrint)
{
alert("Can Print");
stockPrintWin('control.cfm?MREQ=app_stockListPrint ');
}
else
{
//this bit doesn't appear to get called
alert("Can't Print");
}
}
</script>
DazAdams webforumsuser@macromedia.com Guest
-
How can I comment out a large block of perl code?
$ perldoc -q 'How can I comment out a large block of perl code?' says to use =begin comment text, =end comment text, but I find the =end comment... -
code block in template control
I have created a templated control. I used for a while and the I decided to put some internatioanlized string instead of hardcoded string into the... -
__doPostBack code block not being generated by asp.net page
I have 2 aspx pages... neither of which do anything out of the ordinary. One of the pages automatically generates this block of code when viewed... -
Intellisense Code Behind vs. Server Side Script Block
Because it was not implemented. Intellisense is only supported C#, VB files not in ASPX files. George. "Mark" <mark.acuff@hp.com> wrote in... -
sfc wont work, gives me a 0x000006a code
I recently went in to the cmd comsole to do a sfc/scannow check and all it would give me was "Windows File Protection could now initiate a scan of...



Reply With Quote

