Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPITextSuggest: nodeClick javascript not always fired at the clientTextSuggest: nodeClick javascript not always fired at the client
Previous
 
Next
New Post
6/6/2007 3:49 AM
 

Hi all,

I am using VS2005 over Vista (IE 7.0.6000.16448) and I am trying to use TextSuggest on my project. The problem that I have found is that the javascript function nodeClick (in dnn.controls.TextSuggest.js) is not always fired at the client. I have traced the problem down to that function by adding a line on the top of it:

 The message is not always shown. When users browse through the options using the keyboard (up and down arrows) the function works 100% of the times. However when they use the mouse to select the desired value, it does not work so good. Most of the times, if they are fast enough, the event is not fired and textbox remains with the initial text written (and not the whole text of the node being clicked). If they take their time and they are not so fast, the event fires more frecuently but not 100% as when using the keyboard.

Is this a known issue? Something that I could use to avoid this problem? I am not an expert in debugging .js files (who does?) and any help would be greatly appreciated.

Thanks in advance.

 
New Post
6/6/2007 9:22 AM
 

Coiuld you clarify your issue by using a concrete example (does this happen on the webcontrols.dotnetnuke.com site?).  If not could you provide a url demonstrating the issue and give the steps needed to reproduce it?


 
New Post
6/11/2007 4:19 AM
 

First of all, sorry for the delay. No, I cannot give you a public URL since the project is still in early development status, but I have traced it down a little more. This behaviour is shown only when you enable AutoPostBack for the DNNTextSuggest control ( AutoPostBack="True" ).

Enabling AutoPostBack might sound something unneeded first but consider the following (using http://webcontrols.dotnetnuke.com/dnntextsuggest.aspx values as sample):

Suppose you want to use brackets as ID tokens, so that Smith becomes Smith [3]; This however is not always true, this only happens if the user CLICKS on the suggested drop down list. If the name the user is inputting is so small, easy and simple as Smith, he/she might not even grab the mouse to click on any value and he/she will just end writing Smith, with all the letters.

When the user enters the text without using the suggestions on the list, there is no call to nodeClick js function and when the user changes from that field to another, Smith will remain Smith (and not Smith [3]; ) unless you set AutoPostBack="True" and you use additional code on the server side. Since there is no call to nodeClick, in the end there is no call to the postback done by eval(this.postBack.replace('[TEXT]', this.getText())); function selectNode (line 293 of dnn.controls.dnntextsuggest.js)

The fact is that if you enable AutoPostBack for the control, when the code reaches RaisePostBackEvent on line 705 of DNNTextSuggest.vb, the execution does not pass the If args.Length > 1 check because the postback is not done through your JS code and eventArgument variable is set to the empty string ("").

What can we do to avoid this situation? Thanks in advance.

 
New Post
6/11/2007 1:21 PM
 

I would not use autopostback at all.  If the user does not choose a suggestion (no token), you should still get the Smith on the server side in the collection upon postback.  Simply do the lookup there at that time (using the same routine you used in the callback).  If more than one match comes up, then you post an error to the user or choose one at random.


 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPITextSuggest: nodeClick javascript not always fired at the clientTextSuggest: nodeClick javascript not always fired at the client


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out