# Web client .""element" name problems

**URL:** <https://forum.servoy.com/t/web-client-element-name-problems/5607>\
**Category:** Classic Servoy\
**Created:** [March 17, 2006, 2:46pm UTC](https://forum.servoy.com/t/web-client-element-name-problems/5607 "2006-03-17T14:46:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmcmanus](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mmcmanus](https://forum.servoy.com/u/mmcmanus)\
**Post date:** [March 17, 2006, 2:46pm UTC](https://forum.servoy.com/t/web-client-element-name-problems/5607/1 "2006-03-17T14:46:17Z")

</div>

I’ve come to a new issue while working with the web client. Working with a validation of named fields. I’m using the standard loop through a from to get element names.

Like:  
var checkName = forms.GD\_entryDB.elements_getName();_

- var check = checkName.slice(0,3);\*
- if (check == ’ fld’)\*
- —etc\*  
_On the web client I have major problems getting the first line to generate checkName. So I modified it as follows_  
 _var checkElement = forms.GD\_entryDB.elements\*;  
\__ var checkName = checkElement.getName();_\_  
\__ var check = checkName.slice(0,3);_\_  
\__ if (check.equalsIgnoreCase(‘fld’))_\_  
 Even with this I am still getting Javascript erros in the webclient Usually:  
 TypeError: undefined is not a function. (validateWebFormDB; line 10)  
 And since I can’t use popups, I am mailing myself the var info. In Developer I get what I expect.  
 like: “fld\_entry\_marital\_status”  
 In web client I get a different return  
 like “fld\_entry\_marital\_status\_element\_3660”  
\__… of and in many case an empty string if I attempt to mail myself every named element, which cause problems of course.\*\_  
_So I guess the question is. Is this expected operation? And how much code modification will be expected to get something like this working in the web client?_  
_I guess I will have to rap for null in the element nam at this point._

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [March 20, 2006, 2:32pm UTC](https://forum.servoy.com/t/web-client-element-name-problems/5607/2 "2006-03-20T14:32:29Z")

</div>

i tried to reproduce this with our current beta

just have a script that does this:

for(var i=0;i\<elements.length;i++)  
{  
application.output(elements\*.getName());\*  
_}_  
_The webclient output:_  
_WebClient: course_  
_WebClient: label_  
_WebClient: button_  
_WebClient: portal\_course\_pages\_to\_course\_pages\_70_  
_WebClient: sadf_  
_The smartclient:_  
_sadf_  
_portal\_course\_pages\_to\_course\_pages\_70_  
_bean\_1010_  
_button_  
_label_  
_course_  
_This output is by the way a feature that hasn’t made it into beta1. After beta1 you can just do application.output and it the output of the webclient will be in the console of the developer method editor._  
_I hope we can improve that even further that you also can debug through code via the webclient._

---

<div class="post-metadata">

**Author:** ![mmcmanus](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mmcmanus](https://forum.servoy.com/u/mmcmanus)\
**Post date:** [March 21, 2006, 2:28pm UTC](https://forum.servoy.com/t/web-client-element-name-problems/5607/3 "2006-03-21T14:28:19Z")

</div>

Not sure if I understand correctly. Though for some reason I have completely missed the whole application.output thing. So thanks for that!

What I get is 2 list. In developer every named item is listed. In WebClient only data entry fields are listed, all other named items are listed as null. The matching lists then break down as I said before:

Servoy( like this):  
fld\_entry\_news  
fld\_entry\_address\_line3  
fld\_entry\_address\_line2  
fld\_entry\_address\_line1  
fld\_country\_id

web Client (like this):  
fld\_country\_id\_element\_3642  
fld\_entry\_address\_line1\_element\_3644  
fld\_entry\_address\_line2\_element\_3646  
fld\_entry\_address\_line3\_element\_3647

They are in reverse order also. Also the field “fld\_entry\_news” is a checkbox which errors as undefined in web client and runs fine in Servoy.

I’'ve simply parsed out the whole “_element_####” thing for now. And that seems to solve the problem pretty well. Now for the checkbox.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [March 21, 2006, 2:40pm UTC](https://forum.servoy.com/t/web-client-element-name-problems/5607/4 "2006-03-21T14:40:48Z")

</div>

is this 3.0beta1?  
Can you make a case and send in a sample solution?  
[http://crm.servoy.com/servoy-webclient/ … oy\_support](http://crm.servoy.com/servoy-webclient/solutions/solution/servoy_support)
