The issue I am having is that I have a partial that has a form. The requirements are that the search is in the url so the user can email their search and others can view what they found. In order to put the search criteria in the url I am using a post to do the search and get back a view and display it.
Right now I have my main index page that has a onchange event that is bound to a drop down. When it detects a change it loads the partial that relates to the drop down value. In this view I have a button to search which puts the search data into the url and reloads the page.
My issue is how can I go from the index which has the drop down, to the partial which loads the search options to the result that has the search results.
Related
I have a redirect_to and need the user to be placed at the specific anchor (can do that much), but with the collapsed portion of the page already opened up.
I tried
giving an element inside the collapsable portion an id, then redirecting to that id using anchor, but that doesn't open the collapsed portion of the page, so the user doesn't see what they're supposed to, and they may get confused
Running some javascript after the redirect, but it may not be possible
How can this be achieved?
I solved this by using a session variable (e.g. collapse = 'show'), accessing that in the view to append that value to the bootstrap collapse class so it looks like this when it should be collapsed collapse, and it should look like this when it should load the page not collapsed collapse show
This approach could be better if using query params for the action being redirected to (either way will work, but the second method won't clutter the user's session)
I am having a page with search parameters and a grid in bottom of the page (which is partial page). When user enters a search criteria and click the Find button. I am calling a Search method on a controller and getting the filtered data and then calling Partial View. But some how I am getting blank page. When I am trying to read the return data, it is giving "undefined". Please help me to resolve this.
I have an mvc app where I pass a list to a view. In a most click, I want to be able to render the next item in the last but am having trouble figuring out how to do that efficiently. My approach originally was to use an index i but I realized that one the page is rendered, accessing my model last at i will always leaf to the same result since that item in the list is rendered on page load and can't just be accessed dynamically. Any insight to an approach for this problem?
The model can't be accessed as it's only used on the server side.
There are a few ways of solving the problem, you can use Knockout.js or similar client side view model components, once the user click on the button just render then next item from the knockout model.
Or use AJAX to retrieve the next value from the back end and then render it to the screen.
Or generate the whole screen and just hide all items from the user and then display them once the user clicks the button
I have set up a one-page, horizontal scrolling website with several anchors combined with DIV-id's. The website has five pages side-by-side that automatically render full-page based on the visitors browser-window.
The menu contains seven hyperlinks that address different anchors (div-id's) on the page (for example: http://www.url.com/#partsix). When they are clicked, the visitor will automatically be scrolled to the anchor part of the page. This works fine and really smooth.
The problem i'm dealing with is that, since the page is not being reloaded, the address-bar is not updated. So if a visitor wants to link to a page, or, for example, like the URL with a facebook button, it will be very difficult.
Is there a way to rewrite the address bar with the anchorlink without reloading the page?
EDIT: I have found out that i can user the action onclick="window.location.hash = hash;" on the hyperlinks. This will return the hash of the anchor it is scrolling to in the address bar. Works like a charm. But: my menu plugin does not let me add this action to the hyperlinks. So i wanted to check if i can use javascript to apply this action to all hyperlinks in the same li class. Does anyone know how?
The li class that contains all menu links is 'mc_menu mc_depth_2'
SHAREPOINT 2007
I've created a customer site column. When the user creates a webparts page the column must be populated.
What I want to do is have the value of this column automatically appear on the web page.
This should not be that hard.....
If you are using the out of the box input form, for them to fill in the data, the column will show up there automatically. If you are referring to a list view that is already on a page, you will need to edit the page, modify the webpart settings and customize the view (or simply pick an existing view that has the column added to it.)
When you put a list on a web part page, the list view format is psuedo copied to the page in that the page will not reflect and changes to the view that existed when it was put on the page, which is why you either have to reselect the default view or else customize the view of the webpart on the page.