Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Help!!!

  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help!!!

    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

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts
    say please...

  • #3
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    please

  • #4
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oistagoimp ???
    rm -f /

  • #5
    Regular Coder
    Join Date
    Aug 2004
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •