lundi 31 août 2015

asp call to java script removes brackets

I am new to asp and vbscript and attempting to pass a database critera list to javascript. The criteria will be used in sql statements in clause, if that is what it is called. The problem is the parethesis are removed!

The criterias for the in clause look like

  • "('Not Defined')"
  • "('A Condition')"
  • "('B Condition')"
  • "('C Condition', 'D Condition')"
  • "('E Condition', 'F Condition', 'G Condition')"
  • "('H Condition', 'I Condition', 'J Condition', 'K Condition')"

The javascipt take to parameters for row and column and searches a database and returns a list of table entries dependent on those conditions or set of conditions.

I've been working with the following:

Response.Write "<td WIDTH='6%'  VALIGN='TOP' ALIGN='CENTER' bgcolor = " & ObjDic(elem).clrPreExisting & ">" & vbCRLF
Response.Write "<a href = ""javascript:alert("objDic(elem).critRow")""><font size='2' face='Arial' color='#000000'>" & ObjDic(elem).Get_PreExistingVal(RunningTotal.PreExisting) & "</font></a>" &vbCRLF
Response.Write "</td>" & vbCRLF

the value of objDic(elem).critRow from the immediate window shows

objDic(elem).critRow "('Not Defined')" But thie Java alert shows Not Defined.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire