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.
Add a comment
|
1 Answer
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>
1 Comment
Maay
I didn't know, that ajax call is invoking action. Thank you, for answering my newbie question.