Re: replace function.....
Quote:
Originally posted by heero
hi
i have one textfield to replace single quote and double quote into 2 single quotes but when i display i can onli display single quote but for the double quote i did not displayed out so can enlightened me...thank alot..
countryName = repalce(request.form("CountryNameTF"), "'", "''")
countryName = replace(request.form("CountryNameTF")), chr(34), "''")
response.write "<td width='15%' height='20' valign='top'>" response.write Country_ID
response.write "</td><input type='hidden' name='CountryID' value="
response.write Country_ID
response.write ">"
response.write "<td width='30%' height='20' valign='top'><input type='text' name='CountryNameTF' value="""
response.write trim(CountryName)
response.write """ size='30' maxlength='50' class='formtextfield'>" response.write "<td width='10%' height='20' valign='top'><input type='button' value='"
response.write localizedData(lang, UpdateBtn)
response.write "' name='submit_but' class='formbutton' onClick='submit_but_onclick();'></td>" response.write "<td width='10%' height='20' valign='top'></td>"
--------------------
x = chr(34)
countryName =x + request.form("CountryNameTF") + x
mprint = "<td width='15%' height='20' valign='top'>" & countryName & "</td><input type='hidden' name='CountryID' value=" & Country_ID & ">"
mprint = mprint & "<td width='30%' height='20' valign='top'><input type='text' name='CountryNameTF' value="&
& trim(CountryName) &" size='30' maxlength='50' class='formtextfield'>" mprint = mprint & "<td width='10%' height='20' valign='top'><input type='button' value="&
localizedData(lang, UpdateBtn)&" name='submit_but' class='formbutton' onClick='submit_but_onclick();'></td>"
mprint = mprint & "<td width='10%' height='20' valign='top'></td>"
response.write mprint
-------------------------
Try this Code.....