javascript - asp problem, expected '(' -
i error when viewing page in internet explorer webpage error details
message: expected '(' line: 152 char: 4 code: 0 <script>/* <![cdata[ */qmad.mwidths=new object();if(qmad.bvis.indexof("qm_mwidths_a(b.cdiv,o);")==-1)qmad.bvis+="qm_mwidths_a(b.cdiv,o);";;function qm_mwidths_a(sub,item){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.match_widths)&&!z["on"+qm_index(sub)])return;var ss;if(!item.settingsid){var v=item;while((v=v.parentnode)){if(v.classname.indexof("qmmc")+1){item.settingsid=v.id;break;}}}ss=qmad[item.settingsid];if(!ss)return;if(!ss.mwidths_active)return;if(qm_a(item.parentnode)){var t=0;t+=qm_getcomputedstyle(sub,"padding-left","paddingleft");t+=qm_getcomputedstyle(sub,"padding-right","paddingright");t+=qm_getcomputedstyle(sub,"border-left-width","borderleftwidth");t+=qm_getcomputedstyle(sub,"border-right-width","borderrightwidth");var adj=0;adj=item.getattribute("matchwidthadjust");if(adj)adj=parseint(adj);if(!adj||isnan(adj))adj=0;sub.style.width=(item.offsetwidth-t+adj)+"px";var a=sub.childnodes;for(var i=0;i<a.length;i++){if(a[i].tagname=="a")a[i].style.whitespace="normal";}}};function qm_getcomputedstyle(obj,sname,jname){var v;if(document.defaultview&&document.defaultview.getcomputedstyle)v=document.defaultview.getcomputedstyle(obj,null).getpropertyvalue(sname);else if(obj.currentstyle)v=obj.currentstyle[jname];if(v&&!isnan(v=parseint(v)))return v;else return 0;}/* ]]> */</script> 148: <% 149: useripaddress = request.servervariables("http_x_forwarded_for") 150: if useripaddress = "" 151: useripaddress = request.servervariables("remote_addr") 152: end if 153: 154: 155: if left(useripaddress,11) = "192.168.130" or left(useripaddress,10) = "236.234.11" 156: %> 157: 158: <% 159: if ucase(request.querystring("go"))="" 160: go="home" 161: else 162: go = ucase(request.querystring("go")) 163: end if 164: 165: if ucase(request.querystring("rdate"))="" 166: rdate = formatdatetime(now(), 2) 167: else 168: rdate = ucase(request.querystring("rdate")) 169: end if 170; 171: if not(isdate(rdate)) 172: rdate = formatdatetime(now(), 2) 173: end if 174: %>
this view source code/runtime
150: <script> 151: <!-- 152: if request.querystring("rdate")<>"" 153: rdate=request.querystring("rdate") 154: else 155: rdate= now() 156: end if 157: 158: function queryst(ji) { 159: hu = window.location.search.substring(1); 160: gy = hu.split("&"); 161: (i=0;i<gy.length;i++) { 162: ft = gy[i].split("="); 163: if (ft[0] == ji) { 164: return ft[1]; 165: } 166: } 167: } 168: var rundate = queryst("rdate"); 169: 170: if request.querystring("rdate")<>"" 171: rundate=request.querystring("rdate") 172: else 173: rdate= now() 174: end if 175: 176: document.write(rdate); 177: document.write("<br>"); 178: --> 179: </script>
@newprogrammer: seem mixing asp javascript (in second code snippet, ln. 150 - 179). both of if request.querystring
blocks in code should in asp delimiters, <% %>
, take care of specific syntax error you're getting.
it appears if don't need whole second block @ though since doesn't ever use again , rundate
get
parameter checked , set in asp, comment out or remove whole second block.
Comments
Post a Comment