|
as long as your pages have been coded correctly and the sever is meant to send js to files to the client it should work. Servers don't really "support" javascript. they send the files. and if they are not doing that then it's probably a security setting or server-side rule for javascript docs.
Javascript runs entirely client side. it can make requests for pages (http request), but that's just about it in terms of client-server interaction.
Like the other poster said; What server are you using???
|
|
|
|
|
maybe the web server only allow to download certain document.
in particular, maybe it DOESN'T allow to download .js file?
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Are you sure its not Java? I always thought jscript runs soley on the users computer.
|
|
|
|
|
I have integrated auto-suggest(using actb.js) within our application Uhuroo (Uhuroo is a web application that provides a smart and secure way of collaborating on documents with distributed teams).
The problem that we face is, suppose the auto-suggest may match 10 items and if we show just 5 at a time, it will show "\/ (5 more)"... Can I replace "\/"(combination of back slash and fore slash) with a nice image?
Thanks
|
|
|
|
|
Probably. But if you need help you need to provide code samples.
|
|
|
|
|
there is a replaceHTML(c,'/\\'); function call in the js file(ie. actb.js) that i have downloaded from here.
where c given like,
a = document.createElement('table');
r = a.insertRow(-1);
c = r.insertCell(-1);
c.style.color = actb_self.actb_textColor;
c.style.fontFamily = 'arial narrow';
c.style.fontSize = actb_self.actb_fSize;
c.align='center';
replaceHTML(c,'/\\');
in some other place replaceHTML is called with '\\/'.
Instead of this up and down arrows we needed an image.
Thanks.
|
|
|
|
|
dunno about replace html - but you can use "innerHTML" or "split" and "join".
|
|
|
|
|
sorry if this was discussed before. but i have to ask this question again.
I have a windows media player on my site. It's working fine with IE but not in firefox. I used javascript to play a video when the image is clicked.
here is my code. im getting an error document.getElementById("player").controls is undefined
Javascript Code:
<script language="javascript">
var forcepage = false;
var forcepagediv = '';
function changepage(page){
//alert(page);
var divwatch, divsynopsis, divreview, divrating, divemail,divrating2, divppv;
var imgwatch, imgsynopsis, imgreview, imgrating, imgemail, imgppv;
divwatch = document.all['divwatch'];
divsynopsis = document.all['divsynopsis'];
divreview = document.all['divreview'];
divrating = document.all['divrating'];
divemail = document.all['divemail'];
divrating2 = document.all['divrating2'];
divppv = document.all['divppv'];
imgwatch = document.all['imgwatch'];
imgsynopsis = document.all['imgsynopsis'];
imgreview = document.all['imgreview'];
imgrating = document.all['imgrating'];
imgemail = document.all['imgemail'];
imgppv = document.all['imgppv'];
if (divwatch && divsynopsis && divreview && divrating && divemail && divrating2 && divppv
&& imgwatch && imgsynopsis && imgreview && imgrating && imgemail && imgppv){
divwatch.style.display = 'none';
divsynopsis.style.display = 'none';
divreview.style.display = 'none';
divrating.style.display = 'none';
divemail.style.display = 'none';
divrating2.style.display = 'none';
divppv.style.display = 'none';
imgwatch.src = 'imgs-movies/watchnow2.jpg';
imgsynopsis.src = 'imgs-movies/but-synopsis.jpg';
imgreview.src = 'imgs-movies/but-review.jpg';
imgrating.src = 'imgs-movies/but-userrating.jpg';
imgemail.src = 'imgs-movies/but-tellfriend.jpg';
imgppv.src = 'imgs-movies/but-ppvbasis.jpg';
switch(page){
case 'watch':
divwatch.style.display = 'inline';
imgwatch.src = 'imgs-movies/watchnow1.jpg';
break;
case 'synopsis':
divsynopsis.style.display = 'inline';
imgsynopsis.src = 'imgs-movies/but-synopsis-on.jpg';
break;
case 'review' :
divreview.style.display = 'inline';
imgreview.src = 'imgs-movies/but-review-on.jpg';
break;
case 'rating' :
divrating.style.display = 'inline';
divrating2.style.display = 'inline';
imgrating.src = 'imgs-movies/but-userrating-on.jpg';
break;
case 'email' :
divemail.style.display = 'inline';
imgemail.src = 'imgs-movies/but-tellfriend-on.jpg';
break;
case 'ppv' :
divppv.style.display = 'inline';
imgppv.src = 'imgs-movies/but-ppvbasis-on.jpg';
break;
default :
divwatch.style.display = 'inline';
imgwatch.src = 'imgs-movies/watchnow1.jpg';
break;
}
}
}
function change(){
changepage('watch');
if(-1 != navigator.userAgent.indexOf('MSIE'))
{
document.getElementById('ForTheFirstTime').controls.play();
}
else if(-1 != navigator.userAgent.indexOf('Firefox'))
{
document.getElementById('ForTheFirstTime2').controls.play();
}
}
</script>
Windows Media Player Code:
<OBJECT id="ForTheFirstTime" style="WIDTH: 500px; HEIGHT: 363px" type="application/x-oleobject"
height="363" width="500" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" VIEWASTEXT>
<PARAM NAME="URL" VALUE="http://url.asx">
<PARAM NAME="rate" VALUE="1">
<PARAM NAME="balance" VALUE="0">
<PARAM NAME="currentPosition" VALUE="0">
<PARAM NAME="defaultFrame" VALUE="">
<PARAM NAME="playCount" VALUE="1">
<PARAM NAME="autoStart" VALUE="0">
<PARAM NAME="currentMarker" VALUE="0">
<PARAM NAME="invokeURLs" VALUE="-1">
<PARAM NAME="volume" VALUE="100">
<PARAM NAME="mute" VALUE="0">
<PARAM NAME="uiMode" VALUE="full">
<PARAM NAME="stretchToFit" VALUE="0">
<PARAM NAME="windowlessVideo" VALUE="0">
<PARAM NAME="enabled" VALUE="-1">
<PARAM NAME="enableContextMenu" VALUE="-1">
<PARAM NAME="fullScreen" VALUE="0">
<PARAM NAME="enableErrorDialogs" VALUE="0">
<embed type="application/x-mplayer2" name="ForTheFirstTime2" id="ForTheFirstTime2" width='500' height='363' src='http://url.asx'
controller="true" displaysize="4" autostart="false" showstatusbar='1' playeveryframe="false"
pluginspage='https://www.microsoft.com/Windows/'>
</OBJECT>
modified on Tuesday, July 28, 2009 4:22 AM
|
|
|
|
|
if i remember rightly FF users need to download a plugin.
|
|
|
|
|
hi, i've downloaded the windows media player 11 plugin but the error is still the same.
|
|
|
|
|
not sure then I'm afraid. You could try removing sections of you r code till you find the offending line. I presume it was working before?
|
|
|
|
|
its not working before.
|
|
|
|
|
Well the only thing I can suggest is using a different player. Personally I found that having to download another plugin puts off many users. So I started using flash (it's already on 95% of computers or something). Plus flash allows you to edit the player to fit in better with the site.
There are other options however. But you will need to research them. Silverlight for example is now on many machines.
If you do choose to go the flash route there are good tutorials on http://gotoAndLearn.com[^]
When developing a media player always publish for slightly older versions - if you don't want users installing plugins. I.e:
Current Flash version is 10. So publish to 8.
Current silverlight is 2 ( I think). SO publish to 1.
|
|
|
|
|
we are going to upgrade our system and we will use silverlight. but for the meantime we are using wmp. the video that we are playing is drm protected. i can't use flash.
|
|
|
|
|
You should use Flash or silverlight to show the video. Media player is old concept.
If you still want to use Media player, use embed tag than object. As most of the browsers doesnt support object tags. It is IE specific.
|
|
|
|
|
i already placed embed tag.
|
|
|
|
|
hello there:
Am using accordion with panes inside it, i want to alert the user to get confirmation form him that he is sure that he wants to change pane and then i should validate things and inform the user of the of the changes. But I could not know how to do that since there is no OnSelectedIndexChange Event. I searched a lot but i did not understand the proposed solution could any body tell how this could be solved. I would like to know also how to use it in JS.
|
|
|
|
|
not sure if its the same but for the select tag you can use selceted index:
var dropdown = document.getElementById("saved_style");
var index = dropdown.selectedIndex;
if (index == 0){
//do nothing
} else if (index == 1){
}
|
|
|
|
|
Well This Might Work on JS and i will check it now but how about server events. There is something written on js let me post the code and you can check it and please if you understood it tell me
function pageLoad(sender, args)
{
var accordEx1 = $find('MyAccordion_AccordionExtender');
accordEx1.add_selectedIndexChanged(onSelectedIndexChanged);
}
function onSelectedIndexChanged(sender, args)
{
var behavior = $find('MyAccordion_AccordionExtender');
var i = behavior.get_SelectedIndex();
var control_clientId='<%= GetControlClientID() %>';
if(control_clientId != "null")
{
var text= $get(control_clientId);
text.value="i am "+i;
}
}
sure some of the code is related to the writers project but in general is this related to a solution for what am searching for???
|
|
|
|
|
yeah I kind a get that but I'm a php guy I'm afraid..
|
|
|
|
|
Dont worry explain it if you knew it i need solution so badly
|
|
|
|
|
Hi
i devoloped a web site which have coding and css class.but it display proper in opera browser but
when i open with IE6 it display diffeent like alignment,text size etc.plz provide me soliution for this.
thanks
|
|
|
|
|
If you are using PHP you could always parse css as php, then check the users environment (browser) and select the appropriate css:
Parse CSS as PHP[^]
|
|
|
|
|
|
can anybody tel wht a content management system is???
|
|
|
|