using eval() gives me Type mismatch: '[undefin

Results 1 to 2 of 2

Thread: using eval() gives me Type mismatch: '[undefin

  1. #1
    Join Date
    Dec 1969
    Posts
    569

    Default using eval() gives me Type mismatch: '[undefin

    i&#039m migrating a site i&#039ve built in ASP from one server to another. <BR><BR>NT<BR>Option Pack 4<BR>Service Pack 5<BR>IIS 4<BR><BR>often, i may check to see if a certain variable exists in the querystring, and i use the eval function.<BR><BR>msgID = Request.QueryString("pg")<BR><BR>if eval("msgID") then<BR> ...<BR> ....<BR>end if<BR><BR>for each instance of the eval() function, the page returns:<BR><BR>Microsoft VBScript runtime error &#039 800a000d&#039 <BR><BR>Type mismatch: &#039[undefined]&#039 <BR><BR>any help would be R E A L L Y appreciated!<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    236

    Default RE: using eval() gives me Type mismatch: '[und

    msgID = Request.QueryString("pg")<BR><BR>if eval("msgID") then<BR>...<BR>....<BR>end if<BR><BR>you can&#039t use javascript w/ you asp code in this manner -<BR>you have to wait until it&#039s on the client&#039s machine -<BR>try this<BR><BR>var msgID<BR>msgID = "&#060;%=Request.QueryString("pg")%&#062;"<BR><BR> if eval(" + msgID + ") {<BR>...<BR>....<BR>}<BR><BR>or in vbscript on server side<BR><BR>if Request.QueryString("pg") &#060;&#062; "" then<BR>...<BR>....<BR>end if<BR><BR>it&#039s not real clear what your trying to do cause some of the sytax is wrong - but just as well hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •