How Do I Force An Object On The Page To PostBack or Reload?

P

pbd22

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!
 
K

Kailash Nadh

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!

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
 
P

pbd22

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

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?
 
V

VK

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?
 
K

Kailash Nadh

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?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top