Loading ...
Sorry, an error occurred while loading the content.

Re: [JavaScript] Setting param attributes

Expand Messages
  • Pramod Kunju
    How can I submit two values simultaneously using HTML multi-box? Thanks, Pramod ... [Non-text portions of this message have been removed]
    Message 1 of 3 , May 11, 2009
    • 0 Attachment
      How can I submit two values simultaneously using HTML multi-box?

      Thanks,
      Pramod

      On Mon, May 11, 2009 at 12:09 PM, Dermot <paikkos@...> wrote:

      >
      >
      > Hi,
      >
      > I am struggling to get IE to play a quicktime file.
      >
      > I have a small function that, once the page is loaded, sets the <param
      > src> value to a file in the same directory. The function works with FF
      > v3+ but I can only get IE to work if I specify the src statically
      > (within the HTML) whereas I want to set the src dynamically.
      >
      > Is my javascript ok? Is there some trick I am missing with IE7 that
      > might help me achieve this?
      >
      > I've created a snippet below. I can't really supply a quicktime file
      > on the list :-/ Any help is much appreciated.
      > Thanx,
      > Dp.
      >
      > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      >
      > "http://www.w3.org/TR/html4/loose.dtd">
      >
      > <html>
      >
      > <head>
      >
      > <meta http-equiv="Content-type" content="text/html;charset=iso-8859-1" >
      >
      > <title>Test</title>
      >
      > <script type='text/javascript'>
      >
      > function init() {
      >
      > var file = 'k0010009-h.264.watermarked.mov';
      >
      > var MyParam = document.getElementById("quickTimeParam"); // Param fo IE.
      >
      > // alert(MyParam+' '+MyParam.id);
      >
      > MyParam.setAttribute('src', file);
      >
      > var MyEmbed = document.getElementById("quickTimeEmbed"); // Param fo
      > Netscape
      >
      > MyEmbed.setAttribute('src', file);
      >
      > }
      >
      > </script>
      >
      > </head>
      >
      > <body onload="init()">
      >
      > <div id="movContainer">
      >
      > <object id="quickTimeObject"
      > CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="480"
      > height="380"
      >
      > type='video/quicktime' CODEBASE="
      > http://www.apple.com/qtactivex/qtplugin.cab">
      >
      >
      >
      > <param name="src" value="Blank.mov" id="quickTimeParam">
      >
      > <param name="loop" value="false">
      >
      > <param name="controller" value="true">
      >
      > <param name="autoplay" value="true">
      >
      > <embed src="Blank.mov" width="480" height="400"
      > controller="true" loop="false" autoplay="true"
      > id='quickTimeEmbed'></embed>
      >
      > </object>
      >
      > </div>
      >
      > </body>
      >
      > </html>
      >
      >


      [Non-text portions of this message have been removed]
    • Jon Stephens
      ... I think what you ve got is changing the parameter s *name* to k0010009-h.264.watermarked.mov . Try this: myParam.setAttribute( value , file); or even
      Message 2 of 3 , May 12, 2009
      • 0 Attachment
        > Setting param attributes
        > Posted by: "Dermot" paikkos@... dermotduke
        > Date: Mon May 11, 2009 12:24 pm ((PDT))
        >
        > Hi,
        >
        > I am struggling to get IE to play a quicktime file.
        >
        > I have a small function that, once the page is loaded, sets the <param
        > src> value to a file in the same directory. The function works with FF
        > v3+ but I can only get IE to work if I specify the src statically
        > (within the HTML) whereas I want to set the src dynamically.
        >
        > Is my javascript ok? Is there some trick I am missing with IE7 that
        > might help me achieve this?
        >
        > I've created a snippet below. I can't really supply a quicktime file
        > on the list :-/ Any help is much appreciated.
        > Thanx,
        > Dp.
        >
        >
        >
        >
        > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        >
        > "http://www.w3.org/TR/html4/loose.dtd">
        >
        > <html>
        >
        >
        >
        > <head>
        >
        > <meta http-equiv="Content-type" content="text/html;charset=iso-8859-1" >
        >
        > <title>Test</title>
        >
        >
        >
        >
        >
        > <script type='text/javascript'>
        >
        >
        >
        > function init() {
        >
        > var file = 'k0010009-h.264.watermarked.mov';
        >
        > var MyParam = document.getElementById("quickTimeParam"); // Param fo IE.
        >
        > // alert(MyParam+' '+MyParam.id);
        >
        > MyParam.setAttribute('src', file);

        I think what you've got is changing the parameter's *name* to
        "k0010009-h.264.watermarked.mov".

        Try this:

        myParam.setAttribute('value', file);

        or even

        myParam.value = file;



        cheers

        jon.

        >
        > var MyEmbed = document.getElementById("quickTimeEmbed"); // Param fo Netscape
        >
        > MyEmbed.setAttribute('src', file);
        >
        > }
        >
        >
        >
        > </script>




        --
        This message has not been scanned for viruses.

        Since I do not use a Microsoft operating
        system or software, and use only plaintext
        for email, there is little need for me to do so.
      Your message has been successfully submitted and would be delivered to recipients shortly.