Connecting Tech Pros Worldwide Forums | Help | Site Map

Using string object in function

OccasionalFlyer
Guest
 
Posts: n/a
#1: Apr 16 '07
I'm trying to get around the limitation of a function that accepts a
string primitive but does not allow for setting attributes of that
sring by using a string objet. It is not paying any attention to the
attributes I set. Can someone please tell me what I'm doing worng?

var msg = new String(
'WARNING: Quiting now will cancel all changes up to this point, ' +
'leaving your schedule as it was when you began this session. ' +
'Are you sure you want to quit?'
);
"msg".blink();
"msg".fontsize(7);

if (confirm(msg))
{
document.location.href = '<jsp:getProperty name="req"
property="contextPath"/>/regcontrol?command=SessionDone';
}
else
{
return false;
}


Thanks.

Ken


Randy Webb
Guest
 
Posts: n/a
#2: Apr 16 '07

re: Using string object in function


OccasionalFlyer said the following on 4/16/2007 2:12 PM:
Quote:
I'm trying to get around the limitation of a function that accepts a
string primitive but does not allow for setting attributes of that
sring by using a string objet. It is not paying any attention to the
attributes I set. Can someone please tell me what I'm doing worng?
Your first mistake is not reading, and following, the answers to other
questions you have asked about this same matter. You continue to start
new threads asking the same question and the answer remains the same -
you can't.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Closed Thread