Hi.
I am using xmlhttp to send a querystring to the current page.
this returns a URL to the windows media player widget on my page:
<object id="Player" style="border:solid 1px black; width:500px;
height:400px;" classid="CLSID:6BF52A52-394A-11d3-B153-SD8FF79FAA6">
<param
name="URL" value="<% =GetPlayerUrl() %>" />
<param
name="AutoPlay" value="true" />
<param
name="stretchToFit" value="-1"/>
<param
name="EnableContextMenu" value="false" />
</object>
So, the player usually starts on postback but since this is XMLHTTP,
how
do I force just the player to reload so it can grab the appropriate
url string?
Thanks!
Kailash Nadh - 28 Nov 2007 16:38 GMT
> Hi.
>
[quoted text clipped - 19 lines]
>
> Thanks!
Well, you could try this (dirty) trick.
<div id="player">
... <object> code ...
</div>
and on receiving a response just clear the innerHTML of #player and
insert new <object> code with your new url :)
Ps : I am sure there are straightforward methods
--
Kailash Nadh | http://kailashnadh.name
pbd22 - 28 Nov 2007 16:52 GMT
> > Hi.
>
[quoted text clipped - 31 lines]
> --
> Kailash Nadh |http://kailashnadh.name
thanks but i don't think that will pull the new url from the server.
i don't have the URL on the client. my xmlhttp request has created
the url string on the server and a postback would allow this code:
"<% =GetPlayerUrl() %>" to play the new file. But, I don't want to
postback so, how do I get "<% =GetPlayerUrl() %>" to pull the server
value? I am thinking forcing the object tag itself to refresh but
how do I do that?
Kailash Nadh - 29 Nov 2007 00:17 GMT
> > > Hi.
>
[quoted text clipped - 39 lines]
> value? I am thinking forcing the object tag itself to refresh but
> how do I do that?
hm, that is confusing. Can't you get a javascript routine (client
side, using xmlhttprequest) to fetch the url from the server,
construct the <object>.. code with the url and insert the code snippet
into place, as I mentioned earlier?
http://www.w3schools.com/ajax/ajax_server.asp
--
Kailash Nadh | http://kailashnadh.name
VK - 28 Nov 2007 16:58 GMT
> Hi.
>
> I am using xmlhttp to send a querystring to the current page.
You cannot send a querystring "to" the page, you only can send a query
string "from" the page, in HTTP all connections are initiated by
client, not server. So either you did not describe the actual task
properly or you are trying to do something beyond the capabilities of
HTTP protocol. If the first then could you provide a bit more of
details?
-Lost - 30 Nov 2007 19:41 GMT
Response to pbd22 <dushkin@gmail.com>:
> So, the player usually starts on postback but since this is
> XMLHTTP, how do I force just the player to reload so it can grab
> the appropriate url string?
I am not entirely sure you have ascertained your problem correctly,
but you're a smart lad so I'll just toss a solution your way and
hopefully you can adapt it as you see fit.
From our good friend ASM (Stephane Moriaux):
function refreshObject(obj)
{
var o = document.getElementById(obj);
var b = o.cloneNode(true);
o.parentNode.replaceChild(b, o);
}
I use this quite frequently to refresh stalled Flash applications.

Signature
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.