NetTalk Central

Author Topic: Bug in multiple select?  (Read 2717 times)

ChrisLaurie

  • Newbie
  • *
  • Posts: 40
    • View Profile
Bug in multiple select?
« on: March 20, 2012, 02:40:40 AM »
I have traced the code that is making multiple select drop list not work. The problem is that you cannot prime the value of the the field for the browser.

In the NetWebServerWorker.CreateSelect method there is the following code:

  If p_multiple > 0
    ReturnValue  = '<input type="hidden" name="'&clip(p_Name)&'" value=";|;multiple;|;"></input>'
  End

This always makes the content of value property in this input to be ";|;multiple;|;". There is no way to replace this value before the value is sent to the browser.

This means I can receive multiple values but I cannot prime the select with multiple values, making it worthless as an input option.

To solve this I suggest that the template changes. Instead of just concatenating the return from the CreateSelect  to the packet, store it in a local variable, give me an embed point so I can replace the ;|;multiple;|; part of the result with something meaningful and then after this embed, concatenate the local variable.

Workable? Of course the best solution would be for the Nettalk template and classes to handle this transparently and store the appropriate values and never use ;|;multiple;|; - even if this means I have to work with strings delimited with ;|; - that's what I have StringTheory for.