1jaws
asked on
dont want function to execute
function onButtonClicked(sender, args)
{
var commandName = args.get_item().get_comman dName();
if (commandName == "message")
{
onWindowLoad(<%= RadToolBar1.ClientID %>, ""); <-------what can I write here that wont throw and error on that function.. I need onWindowLoad shouldnt execute if commandName is message...
}
}
function onWindowLoad(sender, args)
{
var html = "<br /><br /><br /><hr />" +
"<strong>From:</strong> " + $get("from").innerHTML + "<br />" +
"<strong>Sent:</strong> " + $get("sent").innerHTML + "<br />" +
"<strong>Subject:</strong> " + $get("subject").innerHTML + "<br />" +
$get("message-body").inner HTML;
sender.get_contentFrame(). contentWin dow.setEdi torContent (html);
}
{
var commandName = args.get_item().get_comman
if (commandName == "message")
{
onWindowLoad(<%= RadToolBar1.ClientID %>, ""); <-------what can I write here that wont throw and error on that function.. I need onWindowLoad shouldnt execute if commandName is message...
}
}
function onWindowLoad(sender, args)
{
var html = "<br /><br /><br /><hr />" +
"<strong>From:</strong> " + $get("from").innerHTML + "<br />" +
"<strong>Sent:</strong> " + $get("sent").innerHTML + "<br />" +
"<strong>Subject:</strong>
$get("message-body").inner
sender.get_contentFrame().
}
ASKER
well, my radwindow opens up on OnClientPageLoad="onWindow Load" so that is getting executed what I need what code I can put that while that function executes it wont throw and error.. because I really dont want to get the html content out of that function for that paticular commandname executed...
ASKER
I need that function return no html ...basically.. so do Ineed to pass a "" or null or something?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, I think you understood what I meant :) .. tried to code still can see the html content... passing null should have take care but didnt...for some reason by the way, sender of onwindowload is radwindow...
ASKER
I debugged... first this function function onButtonClicked(sender, args) gets executed and we are passing null, null values.. which is ok and goes to function onWindowLoad(sender, args) ... this steps ok.. but than I noticed, function onWindowLoad(sender, args) gets executed again and this time sender is not null which is radwindow.. so still gives me html back....
ASKER
thanks for trying to help.. got that work differently...
So it should be : if (commandName == "message")
instead : if (commandName != "message")