...

View Full Version : Help!!!



oistagoimp
09-21-2005, 09:53 PM
I am fairly new at Javascript and I am having trouble integrating a Javascript variable in an HTML <object> tag.

I have created a web site of commercials that POSTs a 1 at the end of the url (?1) when a specific commercial is chosen.

On the page of the commercial I want it to check the integer of the substring in the url and if it is a one to load the higher resolution video and if not then to load the lower resolution. Here is my code:


//I PUT THIS IS AN OBJECT TAG FOR WINDOWS MEDIA PLAYER DIRECT X

<script language = "Javascript">
if(location.search.substr(1).split("?"))
{
<PARAM NAME = "FileName" VALUE = "Movies/OpenIsraelHigh.wmv">
}
else
{
<PARAM NAME= "FileName" VALUE = "Movies/OpenIsrael.wmv">
}
</script>




I also tried:
<script language = "Javascript">
var FileName = null;

if(location.search.substr(1).split("?"))
{
FileName = "Movies/OpenIsraelHigh.wmv"
}
else
{
FileName = "Movies/OpenIsrael.wmv"
}
</script>

<object tag=value
tag = value
<PARAM NAME = "FileName" VALUE = <script language="Javascript">FileName</script>>








ok I have two pages
the first is Commercials.html ( http://www.yarivhorowitz.com/Commercials.htm )
and the second is CommercialNumberOne.html

When you click on the first link for the first commercial on CommercialNumberOne .html. I want CommercialNumberOne.html opened with the variable resolution 1 passed in the url. Then I want a link on CommercialNumberone.html (Hi/LO) if the link 'lo' is chosen then the page is reloaded and a '0' is passed in the url so the low resolution file is loaded in the javascript commands in the <object> tag. Thats where I need help
Edit/Delete Message

looka
09-22-2005, 09:02 AM
say please...

oistagoimp
09-22-2005, 10:55 PM
please

rm-f
09-23-2005, 02:08 AM
oistagoimp ???

looka
09-26-2005, 06:42 PM
i cannot clearly find your problem, either your site... can you only describe the core of the problem?

here is the page for some javascript - objects, properties... i use it all the time: devguru.com

look at the javascript, objects, string - there are property how to find a char in a string



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum