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!

why can't i use a combobox item with a question event?
Last Post 01-25-2010 10:39 AM by David To. 7 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
threeoUser is Offline
skipping stones
skipping stones
Posts:9
Avatar

--
01-19-2010 03:24 AM

    why can't i use a combobox selected item with a question event?

    i constructed the question event to fire whenever the user chooses an item from a combobox. and this works....it does fire off a postback event. but i can NOT use the selected item in a sql statement to populate another field.

    for example....

    this doesn't work:

    SELECT [ProductID] AS DefaultValue
      FROM [Fruits].[dbo].[aspdnsf_Product]
      where Name = $(ProductList_Text)

    and this doesn't work:

    SELECT [Name] AS DefaultValue
      FROM [Fruits].[dbo].[aspdnsf_Product]
      where ProductID = $(ProductList)

    and this doesn't work either:

    SELECT [Name] AS DefaultValue
      FROM [Fruits].[dbo].[aspdnsf_Product]
      where ProductID = '$(ProductList)'

    but THIS works:

    SELECT [ProductID] AS DefaultValue
      FROM [Fruits].[dbo].[aspdnsf_Product]
      where Name = 'Apples'

    which tells me that i can NOT access the selected item in the combobox even though the manual says that accessing combobox items is accomplished like this:

    "Tokens that include the _Text property such as $(ComboBox_Text)..."  - (bottom of page 180 of the users manual)

     

     

    Richard BaileyUser is Offline
    going with the flow
    going with the flow
    Posts:66
    Avatar

    --
    01-19-2010 06:06 AM
    Assign the value of a hidden field with the selected value from the combo box. Then use the value of the hidden field.
    threeoUser is Offline
    skipping stones
    skipping stones
    Posts:9
    Avatar

    --
    01-19-2010 06:30 AM

    i guess i don't understand.......

    are you saying create another question event and have it trigger off of the selection of an item from the combobox and save the selected value to the hidden field and then change my current question event to pull the token from the hidden field?

    if so.......

    how do i assign the chosen item to the hidden field? i don't see a way to do that in a question event

    also....if i can grab the selected value from the combobox to assign it to the hidden field.....why can't i grab it to use it in the sql?

    Richard BaileyUser is Offline
    going with the flow
    going with the flow
    Posts:66
    Avatar

    --
    01-19-2010 07:12 AM
    I do not know why either... this is just what I had to do to get it working.

    Question1: Combo Box
    Question2: Hidden Checkbox List
    HiddenQuestion3: value_of_question1

    Question2 default value is SQL driven -- select whatever as QuestionOption, whatevervalue as QuestionOptionValue from whereever where condition_field in ('$(HiddenQuestion3)','$(Question2)')

    Question Event 1: When Question1 is selected, unhide Question2
    Question Event 2: Set default value of HiddenQuestion3 to be value selected in Question1


    I honestly don't know why it had to be done that way, it is just what worked for me.
    threeoUser is Offline
    skipping stones
    skipping stones
    Posts:9
    Avatar

    --
    01-19-2010 07:24 AM

    this is the part that throws me:

    Question Event 2: Set default value of HiddenQuestion3 to be value selected in Question1

    question1 is a combobox......and the whole issue i'm trying to solve is how to grab the selected item from a combobox

    so this is kinda circular

    i simply can not grab the selected value of a combobox - let alone assign it to another field.

    know whut i mean vern?

    Richard BaileyUser is Offline
    going with the flow
    going with the flow
    Posts:66
    Avatar

    --
    01-19-2010 08:19 AM
    i am not sure why you are unable to do that... I have this working in several forms.

    Is the sort order correct for the Questions (Sort order, not same as how they appear in order on the page)?
    threeoUser is Offline
    skipping stones
    skipping stones
    Posts:9
    Avatar

    --
    01-19-2010 08:59 AM

    how do you assign a combobox's selected value to another field???

    where is that done?

     

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

    --
    01-25-2010 10:39 AM
    HI, use client side javascript for this. Let's say your combobox shortname is "combo". And your other field is "field2". In the client side event of your combobox, type in:

    $(field2) = $(combo);

    -- 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