Hello buddy, I have a problem of passing the Value in HTML Form to the VB Script function. Like example: My Text1 value="1234&abc" when pass the Text1 value to the Function(Text1.value), The Value pass in it will be 1234. but the actual is 1234&abc. ( Client Side ) How Should I solve this Problem.....? Thank you... The Source Code: <html> <form name="form1"> <input type="text" name="refno" value="1234&abcde"><input type="button" value="Submit"onclick="CheckSubmit(document.form1.refno.value)"> </form> </html> <script language="vbscript"> function CheckSubmit(refno) document.write(refno) ' The result will be 1234 Only, not 1234&abcde end function
The problem is not with the passing of the variable but its the problem with the printing of value in the document. Try doing this and all should be fine Code: document.write("<PRE>") document.write(refno) ' The result will be 1234&abcde and not 1234 document.write("</PRE>") Happy coding.
I never knew you have edited the post to include the Code. Making a new post sends an email to all the posters of the thread and so it helps evryone to reply. If you just edit the new post try posting a line like I have edited the tread to include the code so that everyone knows. Also yes you have the solution now probably.