DNNDev.com Forums Minimize
Jump Menus
Last Post 04 Feb 2012 04:05 PM by Will Baker. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Will Baker
New Member
New Member
Posts:54
Avatar

--
03 Feb 2012 01:19 PM  
Still new to XMP and I’m looking for a steer on how to create a jump menu. I have a basic table with ID and Name and my drop down is populated using a Control Data Source. The submit button should redirect to xxx.com/detail.aspx?id=[[ID]]

I’m getting confused about whether I should be using a form or a template for this? If a form, does it have to be attached to a table in the db? I’ve tried just using the redirect on the udpate button but it’s complaining about not finding records. What am I missing?

If someone can give me a pointer, I’m sure I can figure out the details...

Thanks,

Will
DNNDev Admin
Senior Member
Senior Member
Posts:6419
Avatar

--
03 Feb 2012 05:10 PM  
Hi Will,

You can do it both ways. If you go with the form approach, you'll get the form redirect option and the ControlDataSource for binding to a data table.

If you go with the template approach, you would basically be adding an <xmod:Template> tag to your template that dynamically builds a drop-down list. You can then use some Javascript to redirect the user to the page selected in the list.

I have a couple of blog posts that talk about building the drop-down list in a template. It's geared for filtering results but the mechanics are the same. See:

http://dnndev.com/Blog/tabid/347/EntryId/153/Data-bound-Drop-down-Filters-in-XMod-Pro-ndash-Part-1.aspx

http://dnndev.com/Blog/tabid/347/EntryId/160/Data-bound-Drop-down-Filters-in-XMod-Pro-ndash-Part-2.aspx

If you go with the form route, please provide more details about the errors your getting and how you have your button setup.

Best,
Kelly
Power Your Website With XMod Pro
Buy XMod Pro Today
Will Baker
New Member
New Member
Posts:54
Avatar

--
04 Feb 2012 04:02 PM  
Thanks Kelly.

In the end I went with the template option and adapted your example which was a great help. I’ll put off using the form option to another day as I'm still not sure how to get a form to post without saving data to the table. I used to use 'nosave' in xmod to make custom searches etc but can't seem to find how this is done in xmp.

Best,

Will
DNNDev Admin
Senior Member
Senior Member
Posts:6419
Avatar

--
04 Feb 2012 04:03 PM  
Hi Will,

Glad to see you got it working.

FYI, the "nosave" option can be implemented in XMod Pro by simply removing the SubmitCommand from the form.

Best,
Kelly
Power Your Website With XMod Pro
Buy XMod Pro Today
Will Baker
New Member
New Member
Posts:54
Avatar

--
04 Feb 2012 04:05 PM  
That'll be the one...

Doh!

Thanks again,

Will
You are not authorized to post a reply.

Active Forums 4.1
spacer
dummy