Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Javascript in template not working when using search
Last Post 07-10-2012 05:59 AM by Ryan Bakerink. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
DonnaWUser is Offline
skipping stones
skipping stones
Posts:14
Avatar

--
07-09-2012 05:32 AM
    I hope I can explain this effectively...

    We have a DV that contains a couple of scripts in the template that select specific records to display text. Example:

    "Visit Joe's website" only displays if Joe has a website record in the table.

    The script works fine if I display the records before a viewer does a search. But, if a viewer searches for someone specifically, say they enter the letter "C" in the last name search field, the records appear just fine except for the parts that are coded in script rather than html. Also, if there are several records and I choose "Next 20", those records appear and include the scripted text.

    It seems like an issue with the timing of the javascript. I've tried re-writing in in jQuery and get the same results.

    Any ideas how I can overcome this? We're currently on version 2.20.10.
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    07-09-2012 12:50 PM
    Hello Donna,

    Have you ever considered using a conditional column to return either the column value or an empty value?

    For instance you can use the Custom SQL as a data source for your Dynamic View, and create a column like I mentioned above.

    Select
    (case when WebSite is null or WebSite = '' THEN '' ELSE WebSite END) As TheWebSite
    from
    YourTable

    Is using JavaScript necessary if you can handle this on the Server Side?

    When you include the token in your Dynamic Views template, the value will either render as empty or a website value.

    Let me know if this makes sense or if you have any questions.

    Thanks,

    Ryan

    DonnaWUser is Offline
    skipping stones
    skipping stones
    Posts:14
    Avatar

    --
    07-10-2012 02:56 AM

    Hi Ryan,

    I think I really need to use a script since I do not want any text to print if the website value is empty.

    Here's the script:

    //**//

    I just don't understand why it works perfectly if I do not do a search, but once I do, it doesn't... that is, unless I go to the Next 20 records...

    Appreciate the help,

    Donna

    DonnaWUser is Offline
    skipping stones
    skipping stones
    Posts:14
    Avatar

    --
    07-10-2012 03:05 AM
    Well... I guess i can't post the script...
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    07-10-2012 05:59 AM
    Hello Donna,

    With SQL you can return labels and values within one column. If the value is null or empty then you could end up returning nothing.
    Here's an example:

    Select
    (case when WebSite is null or WebSite = '' THEN '' ELSE 'Label: ' + WebSite END) As TheWebSite
    from
    YourTable


    JavaScript really isn't the solution for this one, it's only going to create more steps to implement your solution.

    -Ryan
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi