473,799 Members | 2,942 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Missing ) after argument list

5 New Member
I am getting a "Missing ) after argument list" on two different sets of commands in the same script - they are part of Dreamweaver MX's files, so i am not sure how they got altered - thanks for the help!

function canAcceptComman d()
{
// Make sure the focus is in the BODY of the document.
var retVal = false;
if (dw.getFocus() == 'document' && dw.getDocumentD OM().getFocus() == 'body') {
retVal = true;
}
if (dw.getFocus(tr ue) == 'html' || dw.getFocus() == 'textView') {
// var fontFamily = arguments[0];
// if (fontFamily != "0Font")
retVal = true;
}
if (dw.getDocument DOM() && dw.getDocumentD OM().getParseMo de() != 'html') {
retVal = false;
}

return retVal;
}

function isCommandChecke d()
{
// if (dw.getFocus(tr ue) == 'html' || dw.getFocus() == 'textView')
// return false;

var bChecked = false;
var fontFamily = arguments[0];

if (dw.getDocument DOM() == null)
return false;

if (fontFamily == "0Font")
{
return dw.getDocumentD OM().getFontMar kup('face') == '';
}
else
{
return dw.getDocumentD OM().getFontMar kup('face') == fontFamily;
}

return bChecked;
}
May 25 '07 #1
9 4050
JosAH
11,448 Recognized Expert MVP
I moved this over from the Java forum.

kind regards,

Jos
May 25 '07 #2
acoder
16,027 Recognized Expert Moderator MVP
On which lines are you getting this error?
May 25 '07 #3
deedub65
5 New Member
the error messages simply say:

"While executing isCommandChecke d in Text_FontFamili es.htm, the following JavaScript error(s) occurred:

missing ) after argument list"

and another which says:

"While executing canAcceptComman d in Text_FontFamili es.htm, the following JavaScript error(s) occurred:

missing ) after argument list"

- does this help?
May 25 '07 #4
acoder
16,027 Recognized Expert Moderator MVP
Which browser are you using?

Can you give the rest of the code.
May 26 '07 #5
deedub65
5 New Member
i use Safari and Firefox, but the errors come when i am working with Dreamweaver - here is the entire file's code:

<!-- MENU-LOCATION=NONE -->
<HTML>
<HEAD>
<!-- Copyright 2000 Macromedia, Inc. All rights reserved. -->
<TITLE>Font Families</TITLE>
<SCRIPT LANGUAGE="javas cript" SRC="../../Shared/MM/Scripts/CMN/string.js"></SCRIPT>
<SCRIPT LANGUAGE="javas cript">
<!--
//--------------- LOCALIZEABLE GLOBALS ---------------

var MENU_Default = "_Default";

//--------------- END LOCALIZEABLE ---------------

function isDOMRequired()
{
return false;
}

function receiveArgument s()
{
var fontFamily = arguments[0];

if (dw.getFocus(tr ue) == 'document') {
if (fontFamily == "0Font")
dw.getDocumentD OM('document'). applyFontMarkup ('face','');
else
dw.getDocumentD OM('document'). applyFontMarkup ('face',fontFam ily);
} else {
dw.getDocumentD OM().source.wra pSelection('<fo nt face="' + fontFamily + '">', '</font>')
}
}

function canAcceptComman d()
{
// Make sure the focus is in the BODY of the document.
var retVal = false;
if (dw.getFocus() == 'document' && dw.getDocumentD OM().getFocus() == 'body') {
retVal = true;
}
if (dw.getFocus(tr ue) == 'html' || dw.getFocus() == 'textView') {
// var fontFamily = arguments[0];
// if (fontFamily != "0Font")
retVal = true;
}
if (dw.getDocument DOM() && dw.getDocumentD OM().getParseMo de() != 'html') {
retVal = false;
}

return retVal;
}

function isCommandChecke d()
{
// if (dw.getFocus(tr ue) == 'html' || dw.getFocus() == 'textView')
// return false;

var bChecked = false;
var fontFamily = arguments[0];

if (dw.getDocument DOM() == null)
return false;

if (fontFamily == "0Font")
{
return dw.getDocumentD OM().getFontMar kup('face') == '';
}
else
{
return dw.getDocumentD OM().getFontMar kup('face') == fontFamily;
}

return bChecked;
}

// getDynamicConte nt returns the contents of a dynamically generated menu.
// returns an array of strings to be placed in the menu, with a unique
// identifier for each item separated from the menu string by a semicolon.
//
// return null from this routine to indicate that you are not adding any
// items to the menu
function getDynamicConte nt(itemID)
{
var fonts = null;
var i;
fonts = new Array();
fonts[0] = new String(MENU_Def ault + ";id='0Font '"); // start with the base "Default" font
var dwFnt = dw.getFontList( );
if (dwFnt.length > 0)
{
for (i=1; i<=dwFnt.length ; i++)
{
fonts[i] = new String(dwFnt[i-1]);
fonts[i] += ";id='"+escQuot es(dwFnt[i-1])+"'"; // each item needs an ID
}
}
return fonts;
}
// -->
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
May 28 '07 #6
acoder
16,027 Recognized Expert Moderator MVP
There's still code missing. Where's this "dw" object and its methods getFocus an getDocumentDOM?

What are you trying to do here? I'm sure there's a better way than this.
May 29 '07 #7
deedub65
5 New Member
i am not quit as saavy as you might think - so not sure how to answer you - bottom line - this is the ENTIRE code in an .html document that is part of my Dreamweaver MX program - i didn't write this code - it literally came with the software - i am not sure if i did something wrong, because i didn't always get this warning - it started awhile back -

so, best i can tell - there is no other code to this particular file - does that help make sense?

i am not intending to do anything except figure out how to NOT get the error message -
May 31 '07 #8
acoder
16,027 Recognized Expert Moderator MVP
Ok, there is a script included, string.js. Perhaps you could post some of that code.

Perhaps a file has been changed that wasn't supposed to be.
Jun 1 '07 #9
deedub65
5 New Member
i am pretty sure i might have inadvertenly messed something up - here is the string.js code - thanks SO much for your continued help!


//SHARE-IN-MEMORY=true
//
// Copyright 2000,2001 Macromedia, Inc. All rights reserved.
//
//string.js
//
//Generic set of functions for manipulating and parsing text strings
//
//------------------------------------------------------------------
//
//
//extractArgs(beh FnCallStr){
//escQuotes(theSt r){
//unescQuotes(the Str){
//quoteMeta(theSt r){
//errMsg() {
//badChars(theStr ){
//getParam(tagStr ,param){
//quote(textStr,q uoteType){
//stripSpaces(the Str) {
//StripChars(theF ilter,theString ) //Strips all chars in theFilter out of theString and returns the result
//AllInRange(x,y, theString) //Returns true if all of the chars in theString are in the range x,y (inclusive)
//reformat (s) //tricky: see desc below
//Trim(theString) //returns theString with white space trimmed of the front and back

//createDisplaySt ring(theStr, maxLen) //limits string size and appends ellipsis: fn("foo bar zoo",6) => "foo..."
//entityNameEncod e(origStr) //Given a string, returns the string with high-ASCII chars entity encoded.
//entityNameDecod e(origStr) //Given a string, returns the string with high-ASCII chars entity decoded.

//stripAcceralato r(theStr) // Strips Acceralator characters (_E) for Japanese

//SPrintF(pattern , strings); //SPrintF routine. accepts %s or %s1, etc...

//Given a function call, extracts the args and returns them in array

//Respects ', skips over stuff between quotes, and returns them dequoted.
//IMPORTANT: argArray[0] is the function call!! Actual args start at argArray[1].

function extractArgs(beh FnCallStr){
var i, theStr, lastPos, argArray;
argArray = getTokens(behFn CallStr,"(),");
for (i=0; i<argArray.leng th; i++) {
theStr = stripSpaces(une scQuotes(argArr ay[i]));
lastPos = theStr.length-1;
if (theStr.charAt( 0) == "'" && lastPos > 0 && theStr.charAt(l astPos) == "'")
argArray[i] = theStr.substrin g(1,lastPos);
}
return argArray
}



//Passed a string, finds special chars '"\ and escapes them with \

function escQuotes(theSt r){
var i, theChar, escStr = "";
for(var i=0; i<theStr.length ; i++) {
theChar = theStr.charAt(i );
escStr += (theChar=='"' || theChar=="'" || theChar=="\\")? ("\\"+theChar): theChar;
}
return escStr;
}


//Passed a string, finds any escape chars \ and removes them

function unescQuotes(the Str){
var strLen, i, theChar, unescStr = "";
strLen = theStr.length;
for(i=0; i<strLen; i++) {
theChar = theStr.charAt(i );
if (theChar == "\\" && i < strLen - 1) //if escape char and not end
theChar = theStr.charAt(+ +i); //append next char and skip over
unescStr += theChar;
}
return unescStr;
}

//Passed a string, finds meta chars and escapes them with \

function quoteMeta(theSt r){

theStr = theStr.replace(/\\/g, "\\\\")
theStr = theStr.replace(/\[/g, "\\[")
theStr = theStr.replace(/\^/g, "\\^")
theStr = theStr.replace(/\{/g, "\\{")

return theStr;
}

//Emulates printf("blah blah %s blah %s",str1,str2 )
//Used for concatenating error message for easier localization.
//Returns assembled string.

function errMsg() {
var i,numArgs,errSt r="",argNum=0,s tartPos;

numArgs = errMsg.argument s.length;
if (numArgs) {
theStr = errMsg.argument s[argNum++];
startPos = 0; endPos = theStr.indexOf( "%s",startP os);
if (endPos == -1) endPos = theStr.length;
while (startPos < theStr.length) {
errStr += theStr.substrin g(startPos,endP os);
if (argNum < numArgs) errStr += errMsg.argument s[argNum++];
startPos = endPos+2; endPos = theStr.indexOf( "%s",startP os);
if (endPos == -1) endPos = theStr.length;
}
if (!errStr) errStr = errMsg.argument s[0];
}
return errStr;
}


//Passed a string, finds removes special chars '"! and space

function badChars(theStr ){
var i,theChar,isBad =false;
var someBadChars = " ~!@#$%^&*()_+|`-=\\{}[]:\";'<>,./?";
for (i=0; i<theStr.length ; i++) {
theChar = theStr.charAt(i );
if (someBadChars.i ndexOf(theChar) != -1) isBad = true;
}
return isBad;
}


//Accepts a pattern string and some substrings (or numbers). Inserts the strings into the pattern.
//The pattern string can use %s or %s0, etc for the strings. You can mix them if you like - the %s
//pattern will ignore the %s0 pattern as far as count.
//That is:
//SprintF("%s%s2% s", "a", "b", "c") will return "acb"
//
//Note that you can only have 10 indexed strings.
function SPrintF()
{
var argc = SPrintF.argumen ts.length;
if (argc == 0)
return "";

if (argc == 1)
return SPrintF.argumen ts[0];

var resultString = "";
var nextIndString = 1;
var splits = SPrintF.argumen ts[0].split("%s");

for (i=0; i<splits.length ; i++)
{
//write out the split itself.
var splitToWrite = splits[i];
if (splitToWrite.l ength > 0 && !isNaN(splitToW rite.charAt(0)) )
resultString += splitToWrite.su bstring(1,split ToWrite.length-1);
else
resultString += splitToWrite;

//Now write out the next string in the list. See if the next string was part of
//an %s0 pattern, or was normal.
if (i < splits.length-1)
{
if (splits[i+1].length > 0 && !isNaN(splits[i+1].charAt(0)))
{
//use the indexed strng.
var stringIndex = parseInt(splits[i+1].charAt(0));
resultString += SPrintF.argumen ts[stringIndex];
}
else
{
//Pick the next string out of the array.
resultString += SPrintF.argumen ts[nextIndString++];
}
}
}

return resultString;
} //SPrintF


//Custom non-Javascript code to extract tags and get object names.
//Passed HTML tag (ie IMG), gets the current doc source
//HTML and returns an array of names (empty if unnamed).
//This argument is not case sensitive (can be LAYER, Layer, or layer).
//For Example, given <IMG NAME="myPhoto"> <IMG><IMG name="bobsPhoto ">
//returns array: myPhoto,,bobsPh oto

function getParam(tagStr ,param){
var j,tokenString;
var theName = "";
var tokenArray = new Array;
tokenArray = getTokens(tagSt r," =<>");
for (j=0; j<(tokenArray.l ength - 1); j++) {
tokenString = tokenArray[j].toUpperCase(); //force UPPER CASE
if (tokenString.in dexOf(param.toU pperCase()) == 0) { //found name
theName = tokenArray[j+1]; //should return single quoted element in array
firstChar = theName.charAt( 0);
lastChar = theName.charAt( theName.length - 1);
if ((firstChar == lastChar) && (firstChar == "'" || firstChar == "\""))
theName = theName.substri ng(1,theName.le ngth - 1);
break;
} }
return theName;
}

//function: quote
//description: wraps text string in single or double quotes
//argument - textStr
// quote type - use 1 for single quotes and 2 for double quotes

function quote(textStr,q uoteType){
var quote = (quoteType == 1)?"'":'"';
return quote + textStr + quote;
}


//Removes any spaces at the beginning or end of the string

function stripSpaces(the Str) {
if (!theStr) theStr = ""; //ensure its not null
theStr = theStr.replace(/^\s*/,""); //strip leading
theStr = theStr.replace(/\s+$/,""); //strip trailing
return theStr;
}


//Given an object reference string, returns the object name. For ex:
// objName = getNameFromRef( "document.image 1"); //returns "image1"
// objName = getNameFromRef( "document.layer s['image1']"); //returns "image1"
//
//If given an object in a frame, returns the objName?frameNa meOrNum:
// objName = getNameFromRef( "parent.fra mes['main'].document.image 1"); //returns "image1?mai n"
//This is an expected value for MM_findObj().

function getNameFromRef( objRefStr) {
var c, startPos, objName=objRefS tr, frameSearch;
var lastDot = objRefStr.lastI ndexOf(".");
var lastBracket = objRefStr.lastI ndexOf("]");

if (lastDot != -1 || lastBracket != -1) {
if (lastDot > lastBracket) { //name after a dot
objName = objRefStr.subst ring(lastDot+1) ;
} else { //name in brackets
while (lastBracket > 0 && ((c=objRefStr.c harAt(lastBrack et-1))=="'" || c=='"' || c=="\\"))
lastBracket--; //skip ',",\
startPos = lastBracket-1; //start at end of name
while (startPos > 0 && ((c=objRefStr.c harAt(startPos) )!="'" && c!='"' && c!="\\" && c!="["))
startPos--; //seek ',",\,[
objName = objRefStr.subst ring(startPos+1 ,lastBracket);
}
frameSearch = objRefStr.match (/\.frames\[\\?['"]?([^'"\\]+)\\?['"]?\]/); //find .frames['foo'] or .frames[3]
if (frameSearch && frameSearch[1]) { //if framename, add after a question mark
objName += "?"+frameSe arch[1];
}
}
return objName;
}



function StripChars(theF ilter,theString )
{

if (!theString)
theString = "";
/*
Returns theString with all occurrences of every char in theFilter
deleted:

Example:
var x = StripChars("lo! ", "Hello World!")
alert(x) // x is now "He Wrd"
*/

var strOut,i,curCha r

strOut = ""
for (i=0;i < theString.lengt h; i++)
{
curChar = theString.charA t(i)
if (theFilter.inde xOf(curChar) < 0) // if it's not in the filter, send it thru
strOut += curChar
}
return strOut
}

function AllInRange(x,y, theString)
{
/*
Returns true if all characters in theString
fall in the range x,y (inclusive)

Example:
AllInRange("0", "9", "848393874" ) is true
AllInRange("0", "9", "22Hello33" ) is false
*/

var i, curChar

for (i=0; i < theString.lengt h; i++)
{
curChar = theString.charA t(i)
if (curChar < x || curChar > y) //the char is not in range
return false
}
return true
}


function reformat (s)
{
/*
reformat()
params:
s - the string to be reformatted
Then alternating numbers and strings

Example:
var x = reformat("76043 46267", 0, "(", 3, ")", 3, "-")
alert(x) // x is now (760)434-6267
*/

var arg;
var sPos = 0;
var resultString = "";

for (var i = 1; i < reformat.argume nts.length; i++) {
arg = reformat.argume nts[i];
if (i % 2 == 1)
resultString += arg;
else
{
resultString += s.substring(sPo s, sPos + arg);
sPos += arg;
}
}
return resultString;
}


function Trim(theString)
{
/*
Returns theString with white space trimmed off the front and back
*/
var i,firstNonWhite

if (StripChars(" \n\r\t",theStri ng).length == 0 ) return ""

i = -1
while (1)
{
i++
if (theString.char At(i) != " ")
break
}
firstNonWhite = i
//Count the spaces at the end
i = theString.lengt h
while (1)
{
i--
if (theString.char At(i) != " ")
break
}

return theString.subst ring(firstNonWh ite,i + 1)

}


function IsValidVarName( theName)
{
if (!MM.allowDotIn Name)
{
if (StripChars("AB CDEFGHIJKLMNOPQ RSTUVWXYZabcdef ghijklmnopqrstu vwxyz0123456789 _",theName).len gth > 0)
return false;
}
else
{
if (StripChars("AB CDEFGHIJKLMNOPQ RSTUVWXYZabcdef ghijklmnopqrstu vwxyz0123456789 _.",theName).le ngth > 0)
return false;
}
if (theName.charAt (0) == "_" || theName.charAt( theName.length - 1) == "_")
return false;
if (MM.allowDotInN ame)
{
if (theName.charAt (0) == "." || theName.charAt( theName.length - 1) == ".")
return false;
}

if (AllInRange("0" , "9", theName.substri ng(0,1)))
return false;

return true;
}



//Returns a single-line string with entities replaced.
//If optional maxLen param is passed, returns string
//no longer than maxLen chars. If it exceeds that length, it is
//shortened and ... is appendend.

function createDisplaySt ring(theStr, maxLen) {
theStr = stripSpaces(the Str);
theStr = theStr.replace(/\s+/," "); //replace all newlines and whitespace with a single space
theStr = entityNameDecod e(theStr);
if (maxLen && maxLen>3 && theStr.length>m axLen) theStr = theStr.substrin g(0,maxLen-3) + "...";
return theStr;
}


var ENTITY_MAP = new Array(
"\x20", "&nbsp;",
"\x22", "&quot;", //Low-ASCII chars that should use entities
"\x26", "&amp;",
"\x3C", "&lt;",
"\x3E", "&gt;",

"\x80", "&euro;", //Hi-ASCII chars
"\xA1", "&iexcl;",
"\xA2", "&cent;",
"\xA3", "&pound;",
"\xA4", "&curren;",
"\xA5", "&yen;",
"\xA6", "&brvbar;",
"\xA7", "&sect;",
"\xA8", "&uml;",
"\xA9", "&copy;",
"\xAA", "&ordf;",
"\xAB", "&laquo;",
"\xAC", "&not;",
"\xAD", "­",
"\xAE", "&reg;",
"\xAF", "&macr;",
"\xB0", "&deg;",
"\xB1", "&plusmn;",
"\xB2", "&sup2;",
"\xB3", "&sup3;",
"\xB4", "&acute;",
"\xB5", "&micro;",
"\xB6", "&para;",
"\xB7", "&middot;",
"\xB8", "&cedil;",
"\xB9", "&sup1;",
"\xBA", "&ordm;",
"\xBB", "&raquo;",
"\xBC", "&frac14;",
"\xBD", "&frac12;",
"\xBE", "&frac34;",
"\xBF", "&iquest;",
"\xD7", "&times;",
"\xF7", "&divide;",
"\xC6", "&AElig;",
"\xC1", "&Aacute;",
"\xC2", "&Acirc;",
"\xC0", "&Agrave;",
"\xC5", "&Aring;",
"\xC3", "&Atilde;",
"\xC4", "&Auml;",
"\xC7", "&Ccedil;",
"\xD0", "&ETH;",
"\xC9", "&Eacute;",
"\xCA", "&Ecirc;",
"\xC8", "&Egrave;",
"\xCB", "&Euml;",
"\xCD", "&Iacute;",
"\xCE", "&Icirc;",
"\xCC", "&Igrave;",
"\xCF", "&Iuml;",
"\xD1", "&Ntilde;",
"\xD3", "&Oacute;",
"\xD4", "&Ocirc;",
"\xD2", "&Ograve;",
"\xD8", "&Oslash;",
"\xD5", "&Otilde;",
"\xD6", "&Ouml;",
"\xDE", "&THORN;",
"\xDA", "&Uacute;",
"\xDB", "&Ucirc;",
"\xD9", "&Ugrave;",
"\xDC", "&Uuml;",
"\xDD", "&Yacute;",
"\xE1", "&aacute;",
"\xE2", "&acirc;",
"\xE6", "&aelig;",
"\xE0", "&agrave;",
"\xE5", "&aring;",
"\xE3", "&atilde;",
"\xE4", "&auml;",
"\xE7", "&ccedil;",
"\xE9", "&eacute;",
"\xEA", "&ecirc;",
"\xE8", "&egrave;",
"\xF0", "&eth;",
"\xEB", "&euml;",
"\xED", "&iacute;",
"\xEE", "&icirc;",
"\xEC", "&igrave;",
"\xEF", "&iuml;",
"\xF1", "&ntilde;",
"\xF3", "&oacute;",
"\xF4", "&ocirc;",
"\xF2", "&ograve;",
"\xF8", "&oslash;",
"\xF5", "&otilde;",
"\xF6", "&ouml;",
"\xDF", "&szlig;",
"\xFE", "&thorn;",
"\xFA", "&uacute;",
"\xFB", "&ucirc;",
"\xF9", "&ugrave;",
"\xFC", "&uuml;",
"\xFD", "&yacute;",
"\xFF", "&yuml;");


//If a string has high-ASCII characters or low-ASCII that should be encoded, those characters
//are converted to entities. For example, and accented "e" will become &egrave;.
//Note that this does not affect low ascii chars that should be encoded like <>".
//Uses the entity map above (ENTITY_MAP). If a high-ASCII char is not found in
//the map, sets the char to &#nnn;, where nnn is the charCode.
//Returns the encoded string.

function entityNameEncod e(origStr) {

var i,j, retStr;

retStr = origStr;

var charCode, hasEntity = false;

for (i=0; i<retStr.lengt h && !hasEntity; i++) {
charCode = retStr.charCode At(i);
// if high-ASCII, ", &, <, or >
hasEntity = (charCode > 127 || charCode == "\x22" || charCode == "\x26" || charCode == "\x3C" || charCode == "\x3E");
//DEBUG: for Japanese, don't encode if high-ASCII. Need to modify the previous line for the J release.
}

if (hasEntity) { // iff entity found, entity-encode string
oldStr = retStr; //copy string
retStr = ""; //and build new one
for (i=0; i<oldStr.length ; i++) {
charCode = oldStr.charCode At(i);
theChar = oldStr.charAt(i );
if (charCode > 127 || charCode == "\x22" || charCode == "\x26" || charCode == "\x3C" || charCode == "\x3E") {
for (j=0; j<ENTITY_MAP.le ngth-1; j+=2) { //search map
if (ENTITY_MAP[j] == theChar) { //if found
theChar = ENTITY_MAP[j+1]; //set theChar to matching entity
break;
}
}
if (j >= ENTITY_MAP.leng th) { //if not found in map
theChar = '&#' + parseInt(charCo de) + ';'; //set to integer
}
}
retStr += theChar; //append char to string
}
}

return retStr;
}



//If a string contains encoded strings like &quot; or &egrave;, they will be converted
//to their character equivalents for proper display. Returns the decoded string.

function entityNameDecod e(origStr) {
var i, theEntity, retStr = origStr;
var entityPattern = /&\w+;/g;

while ((theEntity = entityPattern.e xec(origStr)) != null) { //with each entity found
for (i=1; i<ENTITY_MAP.le ngth; i+=2) { //look up entity in map
if (ENTITY_MAP[i] == theEntity) { //when found
retStr = retStr.replace( RegExp(ENTITY_M AP[i]),(ENTITY_MAP[i-1])); //replace entity with value
break;
}
}
}
var charSet = dw.getDocumentD OM().getCharSet ();
if (charSet == "iso-8859-1")
{
//return dreamweaver.lat in1ToNative(ret Str);
return retStr;
} else {
return retStr;
}
}

function stripAcceralato r(theStr){
if (dreamweaver.ap pVersion && dreamweaver.app Version.indexOf ('Mac') != -1)
{
theStr = theStr.replace(/\(_\w+\)/,"");
}
return theStr;
}

function httpError(statu sCode)
{
var statusMessage = "";

switch (statusCode)
{
case 200:
{
statusMessage = MM.MSG_HTTP200;
break;
}
case 400:
{
statusMessage = MM.MSG_HTTP400;
break;
}
case 404:
{
statusMessage = MM.MSG_HTTP404;
break;
}
case 405:
{
statusMessage = MM.MSG_HTTP405;
break;
}
case 500:
{
statusMessage = MM.MSG_HTTP500;
break;
}
case 503:
{
statusMessage = MM.MSG_HTTP503;
break;
}
}
return statusMessage;
}
Jun 2 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

8
3969
by: Alex Vinokur | last post by:
Various forms of argument passing ================================= C/C++ Performance Tests ======================= Using C/C++ Program Perfometer http://sourceforge.net/projects/cpp-perfometer http://alexvn.freeservers.com/s1/perfometer.html
4
2463
by: Conrad Weyns | last post by:
vc7.1 has no problem with the following snippet: template <typename T> class TTest { std::list<T*>::iterator m_It; }; but metrowerks codewarrior 9.2 kicks my butt and online Comeau confirms: 1. MW:
1
18514
by: soup_or_power | last post by:
I'm passing the return from window.open as a function argument and getting the error "missing ] after element list" when tested with FireFox. Here is the relevant code. Many thanks for your help. function blurCkbox(num, disp, but_id, sugg) { if (num == 1) { eval("self.opener.document.forms." + but_id + ".value=\'" + sugg + "\'");
77
17067
by: Ville Vainio | last post by:
I tried to clear a list today (which I do rather rarely, considering that just doing l = works most of the time) and was shocked, SHOCKED to notice that there is no clear() method. Dicts have it, sets have it, why do lists have to be second class citizens?
2
17923
by: ehsansad | last post by:
I have the following code. function updateTermsList() { var termDivBox = document.getElementById("termarea"); var terms = searchXMLHttp.responseXML.getElementsByTagName("term"); for(var i=0;i<terms.length;i++){ var name = terms.childNodes.firstChild.nodeValue; var value = new String(terms.childNodes.firstChild.nodeValue); var a = document.createElement('div');
5
2272
by: Vv_vV | last post by:
Hi all, I try to call onchange a function and get "missing ) after argument list" error Probably systaxis issue Thanks in advance for any help! Code: var html = ""; var myurl = "http://www.example.com/url.php?dummy=";
4
10691
by: Pasquale | last post by:
I am attempting to populate a few select drop down menus from the selection of the first drop down. I am using ajax to submit data via a PHP GET and from the response populate the other drop down menus. I figured out how to get it to do so for more than one drop down, but I am getting the following error below. This was working fine until I tried to populate more than one other drop down menu. Any idea why the SELECT object isn't being...
8
2302
by: A. Anderson | last post by:
Howdy everyone, I'm experiencing a problem with a program that I'm developing. Take a look at this stack report from GDB - #0 0xb7d782a3 in strlen () from /lib/tls/i686/cmov/libc.so.6 #1 0xb7d4c2f7 in vfprintf () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7d6441b in vsprintf () from /lib/tls/i686/cmov/libc.so.6 #3 0x08049ba0 in character_data::printf (this=0x800, argument=0x0) at character.c:198
1
1598
by: hariomt | last post by:
Hi, i have to create table's rows dynamically. I am using bellow code snipet... function copySelectedAttr() { var attrValue= document.getElementById('fromEntityAttrBox').options.text; var attrtype=document.getElementById('fromEntityAttrBox').value;
0
9538
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10249
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10219
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10025
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7563
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6804
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5461
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5584
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4138
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.