Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

Sync client side info to server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lloyd Sheen - 30 Oct 2007 21:20 GMT
Here are the components:

Using VS 2005 Pro / ASP.NET / AJAX.NET / VB.NET

Here is the application:

I have an app which has a navigator/search facility to find media files
available to my app and then using the media player ActiveX play them.  It
can get a list of files and using Javascript it can play then as if in a
playlist.  The navigator component is a server side component which
generates Javascript for buttons which are placed in a repeater.  Once the
list of media files is created and the playing started it is handled solely
by the Javascript.  Using Ajax allow the app to use the navigation component
to find more files and still have the media player ActiveX play the media
without interuption.

What I need to do is the following:

Since I know the URL for the media file playing I would like to be able to
navigate back to the currently playing file location (most likely a folder
on my server) without interupting the media playing.  I have an image button
for this since the naviagation will take place on the server.

I have tried the following:

- use a hidden text field to hold the current media playing.  This is
updated by the javascript.  When the image button is clicked I access the
hidden text field but the information that the Javascript placed there is
not passed (most likely a viewstate issue).

- use Javascript to do the following:

<%--<script type="text/javascript">
function Tester()
{
   //debugger;
   var playList;
   var argument;
   playList = document.getElementById("ddPlayList");
   if (playList.options.length>0)
   {
       argument = 'RESTORE' + playList.options[0].value;
       __doPostBack('__PlayAllButton', argument);
   }
}
</script>
--%>

This results in the page refreshing, the media stopping and the playlist
destroyed.

I would appreciate any ideas.

Thanks
Lloyd Sheen
andrew.douglas11@gmail.com - 30 Oct 2007 21:40 GMT
2 suggestions...  Perhaps you could place the code that executes the
PostBack that you need in an IFRAME so that the refresh won't affect
the player that's in the main page.  This would make your JavaScript a
little more complicated, but it should work if an IFRAME is an option.

Secondly, you could use AJAX to pass through JavaScript the current
directory stored in your hidden field into an ASP.Net page that looks
up whatever you need through server-side code, and return it to the
JavaScript that called it.

Hope that helps.

Andy

> Here are the components:
>
[quoted text clipped - 51 lines]
> Thanks
> Lloyd Sheen

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.