Does anyone know why the value would be the same? Many thanks for any help on this.
Set TypeLib = CreateObject("Scriptlet.TypeLib")
GetGuid = Left(CStr(TypeLib.Guid), 38)
Set TypeLib = Nothing
The GetGuid method runs at the server. The GetGuid_test_f method runs at the client. The reason the second bit of code works is because you're calling the server side method multiple times, while in the first example you're only calling it once. If you were to view the source of your page in the browser, you would see that your GetGuid_test_f method will have a single hard coded value. As in:
Is the number of times that you need to call GetGuid a fixed amount, or could it vary?
The actual application is a "create new div" code, and the function for creating the new div sets a variable equal to the result of the GetGuid (ASP) function (below).
var strObj_GUID = '<%=GetGuid()%>';
Each time a user clicks on the "create new div" button, the same code will be called. So, the number of times is widely variable.
Is the GetGuid function not accessed more than once (as it returns the same result each time)?
Thanks again for your help.
Many thanks - I think it's a little clearer now.
I decided to append the ASP UUID string with the current date from js, incl milliseconds, to make it unique.