0

I have a div with a jquery video-player and a hidden div with a link of video for this player. The link is configured by current controller's action and by refreshing it, we will have another link for the player. Is there a way, to refresh video-player div and controller, without refreshing the page? I know, that such function should be handled with ajax, but just couldn't figure anything up. Should I render a separated link-action, called by ajax, on the page and then refresh the player div and link action? In which way should i look?
Any tips would help, thank you in advance.

1 Answer 1

2

What do you mean by "is there a way to refresh the video player div and controller"? Any time you make an ajax call to the server you are invoking some action and invoking the controller. If you're just asking how to refresh some div by clicking a link, then the following code should work:

<div id="video-player">video player here</div>

<a href="#" onclick="$('#video-player').load('/controllername/actionname')">
 refresh the video player</a>
Sign up to request clarification or add additional context in comments.

1 Comment

I didn't know, that ajax call is invoking action. Thank you, for answering my newbie question.

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.