0

alt text

The above is concept of a search interface I want to build in ASP.net MVC. when user clicks on the '+' button, it should create a row text filters or date filters. Does jQuery offer me this flexibility or are there any such UI frameworks which would help me achieve this? There is a search button, not shown, which when clicked should post back and obtain results and display the results

1
  • What software did you use to make the UI mockup? I like it! Commented Jul 28, 2009 at 22:10

2 Answers 2

2

It sounds like you want to create dynamic form. Just use the Jquery .append to add new elements to your form.

$("#myform").append("<input type='text' name='textfield'>")
Sign up to request clarification or add additional context in comments.

2 Comments

I agree. You're going to need a custom implementation and the dynamic form provides an elegant solution.
Tony: Thanks for the info. Any good tutorials to start off with?
0

A little difficult to visualise what you are talking about as it doesn't show in the question.

But if I understand your question then you want to click on a button and show some filter fields right?

This is do-able not only in jQuery but in just standard javascript. All you need to do is unhide the filter elements.

jQuery will give you a nice way to scroll it open though and then you could do a partial post back and just return the results or partial view.

$("#divFilters").slideDown(300);

The code above will open your div.

Or you could jQuery a partial postback, return RenderPartial from your controller and replace the html in a div somewhere. The RenderPartail would be a partial view with your filters in it. Easier to extend at a later date too I'd have thought.

Is this what you were after?

1 Comment

This is a pretty good starting point jquery.com. If you want actual code then let me know, in a comment here, and I'll post some.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.