Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  TextSuggest: nodeClick javascript not always fired at the client
Previous Previous
 
Next Next
New Post 6/6/2007 1:49 AM
User is offline dlightman
8 posts
10th Ranked


TextSuggest: nodeClick javascript not always fired at the client 

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 7:22 AM
User is offline Jon Henning
1622 posts
www.codeendeavors.com
5th Ranked










Re: TextSuggest: nodeClick javascript not always fired at the client 

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 2:19 AM
User is offline dlightman
8 posts
10th Ranked


Re: TextSuggest: nodeClick javascript not always fired at the client 

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 11:21 AM
User is offline Jon Henning
1622 posts
www.codeendeavors.com
5th Ranked










Re: TextSuggest: nodeClick javascript not always fired at the client 

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 Previous
 
Next Next
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  TextSuggest: nodeClick javascript not always fired at the client
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Windsor Management Group
Fund Accounting Software for K12 Education.
Infinitevisions.com
Convert Visitors to Customers
In order to bring value to your users, we must first understand them. VIVIDSITES will help you build a custom web application and interactive marketing tools that your users will thank you for. We marry high-end creative with head banging technology to entertain and convert visitors into paying customers. Call 314.514.0505 or visit us at http://www.vividsites.com to find out how.
- V I V I D S I T E S -
Gearworx Web Hosting
As a premier provider of Web Hosting, Private/White Label hosting, Server Colocation, Dedicated Server, and other Managed Services, Gearworx offers an array of services designed to more effectively manage strategies driving businesses on the Web. Headquartered in Fremont, California our state of the art tier one data centers and distributed managed services environment enables Gearworx to offer your business enterprise level solutions through simplified processes.
Gearworx Web Hosting

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP