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!

Compare Date Question
Last Post 11-02-2009 06:07 AM by David To. 10 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
jeropsUser is Offline
river guide
river guide
Posts:99
Avatar

--
10-29-2009 12:57 PM

    Hi,

    I'm trying to figure out how to enter the current date in a field if there is no date.

    I have membership field called JOINDATE.  On my form I have question tied to that membership field.

    Would I use java script to check to see if the field is blank?  And if so, use java script to populate it with the current date?

    I was thinking that if I created an additional field called UpdateJoinDate the java script on that field would check to see if JOINDATE was empty and if so change it's default value to the current date.  If it was populated, the UpdateJoinDate would be the contents of the JOINDATE field.  I would then have a SQL Completion event that updates JOINDATE based on the current value for  UPdateJoinDate.

    Does this sound right?  I'm not sure how to write the java script, so any pointers or suggestions is very much appreciated.

    Thanks

    Jerry

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    10-29-2009 02:09 PM
    Hi, concerning your JOINDATE field, is this a Date Field where user can choose from a calendar, etc? If so, why not make it a required field instead. Then you don't have to error trap and set it to the current date if a user leaves it blank. -- David
    jeropsUser is Offline
    river guide
    river guide
    Posts:99
    Avatar

    --
    10-29-2009 03:53 PM

    This is a field that's been populated from a database import(moved over users from another portal)...so existing users should have a date when they orginally joined...new users to the portal would have this date created automatically when they register their account on the portal. --Jerry

    jeropsUser is Offline
    river guide
    river guide
    Posts:99
    Avatar

    --
    10-29-2009 07:39 PM

    Hi,

    Okay, so I'm trying to use a client side event. On my form I have hidden field called JOINED that is linked to my membership Profile of JOINED. I have another hidden field called CALCJoined. I have a SQL completion event that will write the contents of the CALCJoined field into my JOINED Membership Profile Field.

    On the JOINED field I have a client-side event with the following:
    IF ($(JOINED)) = "
    $(CALCJoined) = $(CurrentDate)
    ELSE $(CALCJoined) = $(JOINED)

    So what I'm attempting to do is if JOINED field is blank, then make the CALCJoined field the current date(which i have another hidden field to get this current date). If it's not blank just copy the content from $(JOINED) to the $(CALCJoined) field. The SQL Completion event will either add the date because it was previously blank or  over write the date with same date.

    I have tried to follow the examples given in tutorial seven and I have tested with these fields as text boxes instead of hidden fields. My JOINED field is bringing up the proper content, but the CALCJoined field is not changing...

    Am I using the right syntax in my client side event? Am I missing something else?

    Any guidance is very much appreciated...thanks --Jerry

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    10-30-2009 06:27 AM
    Hi, change your client side javascript to this:

    IF ($(JOINED)) == ")
    {
    $(CALCJoined) = $(CurrentDate) ;
    }
    ELSE
    {
    $
    (CALCJoined) = $(JOINED);
    };

    -- David
    jeropsUser is Offline
    river guide
    river guide
    Posts:99
    Avatar

    --
    10-30-2009 09:26 AM
    Hi...I've added that to the client side event on the JOINED field but I don't see my CALCjoined being updated....Any ideas?

    IF ($(JOINED)) == ")
    {
    $(CALCJoined) = $(CurrentDate) ;
    }
    ELSE
    {
    $(CALCJoined) = $(JOINED);
    };

    -- Jerry



     

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    10-30-2009 09:31 AM
    Also place this in the Module Configuration under Initial Javascript. This way, it would run on page load. Also since javascript is case sensitive, be sure that your shortnames are correct (case-wise). -- David
    jeropsUser is Offline
    river guide
    river guide
    Posts:99
    Avatar

    --
    10-30-2009 09:36 AM
    in that field I already have:
    $(TotalDue) = parseFloat($(ItemPrice)) + parseFloat($(HandFee));
    $(DisplayTotalDue) = parseFloat($(CalcPrice)) + parseFloat($(CalcHandFee))

    I would I combine both? Would it be

    $(TotalDue) = parseFloat($(ItemPrice)) + parseFloat($(HandFee));
    $(DisplayTotalDue) = parseFloat($(CalcPrice)) + parseFloat($(CalcHandFee));
    IF ($(JOINED)) == ")
    {
    $(CALCJoined) = $(CurrentDate) ;
    }
    ELSE
    {
    $(CALCJoined) = $(JOINED);
    };


    Thanks for your help! --Jerry
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    10-30-2009 09:54 AM
    Yep; that's what it would be. -- David
    jeropsUser is Offline
    river guide
    river guide
    Posts:99
    Avatar

    --
    10-30-2009 10:10 AM
    Hi,

    Okay I tried that and now my TotalDue and Display Total Due are not working...I tried the JavaScript with just my new code for the JOINED stuff and it's not working either....so I put the Total Due script back by itself and that is working again....

    I was doing some reading about javascript and the == and I was wondering if it made a difference in syntax if you were looking for a NULL or if the field type made a difference? The field type of the JOINED column is nvarchar..

    Thanks--Jerry
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    11-02-2009 06:07 AM
    Hi, if you use Firefox, you can download Firebug to debug any javascript logic and syntax errors. What you should do is first set all hidden fields to textbox fields. That way, you can see what the values they are seeing. You may need to perform some error trapping for null values. -- David
    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