I give up!

Discussion in 'HTML' started by Pascal Herczog, Nov 7, 2005.

  1. Well, I know bugger all about html, and even less about Javascript, but the
    following seems like it must surely be possible, only I can't figure it out.
    Any answers much appreciated!

    I have an html page divided into 2 frames. The left side contains a table
    with a series of hyperlinks to select different movie files to be played in
    the right hand frame. Now, I could do it the easy (boring!) way, and make
    each link call a unique html file that contains the exact same embedded
    object definition for the media player, but each with a unique

    <param name='fileName' value="Filename1.mpg">

    entry to play the correct movie file.

    However, it seems to me that, given that it is possible to call this url
    with some parameters attached, I must surely be able to create a generic
    movieplayer.htm file that uses the ?name=Filename1.mpg parameter to assign
    it as the name of the file to be played.

    So, my table url would be <a
    href="movieplayer.htm?name=Filename1.mpg">Filename1</a>

    But, for the life of me, I can't figure out what javascript function or
    whatever I need to assign the url parameter to the embedded object parameter
    in my movieplayer.htm file.

    Help!!!

    Ta,
    Pascal.
     
    Pascal Herczog, Nov 7, 2005
    #1
    1. Advertising

  2. Pascal Herczog

    JDS Guest

    On Mon, 07 Nov 2005 20:58:01 +0000, Pascal Herczog wrote:

    > But, for the life of me, I can't figure out what javascript function or
    > whatever I need to assign the url parameter to the embedded object parameter
    > in my movieplayer.htm file.


    You need server-side stuff to make this work. Javascript won't help for
    what you describe.

    Mind you, the server side stuff for this small task is very, very, very
    easy.

    How is your server/host configured? Then I can give you tips on how do do
    what you want in your specific environment.

    --
    JDS | lid
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
     
    JDS, Nov 7, 2005
    #2
    1. Advertising

  3. Pascal Herczog

    bernhard Guest

    Pascal Herczog schrieb:

    > I have an html page divided into 2 frames. The left side contains a table
    > with a series of hyperlinks to select different movie files to be played in
    > the right hand frame. Now, I could do it the easy (boring!) way, and make
    > each link call a unique html file that contains the exact same embedded
    > object definition for the media player, but each with a unique
    >
    > <param name='fileName' value="Filename1.mpg">
    >
    > entry to play the correct movie file.
    >
    > However, it seems to me that, given that it is possible to call this url
    > with some parameters attached, I must surely be able to create a generic
    > movieplayer.htm file that uses the ?name=Filename1.mpg parameter to assign
    > it as the name of the file to be played.
    >
    > So, my table url would be <a
    > href="movieplayer.htm?name=Filename1.mpg">Filename1</a>


    This must be done using server side scripting. Check if you can use php
    on your server. it takes less than 10 lines of php code to solve your
    prob.

    bernhard
     
    bernhard, Nov 7, 2005
    #3
  4. "bernhard" <> wrote in message
    news:...
    >
    > Pascal Herczog schrieb:
    >
    >> However, it seems to me that, given that it is possible to call this url
    >> with some parameters attached, I must surely be able to create a generic
    >> movieplayer.htm file that uses the ?name=Filename1.mpg parameter to
    >> assign
    >> it as the name of the file to be played.
    >>
    >> So, my table url would be <a
    >> href="movieplayer.htm?name=Filename1.mpg">Filename1</a>

    >
    > This must be done using server side scripting. Check if you can use php
    > on your server. it takes less than 10 lines of php code to solve your
    > prob.
    >


    Unfortunately I've no idea whether my ISP, Plusnet, supports php. It might
    well do, but I know even less than nothing about that! If you could post the
    required code I'll have a go at it though...

    I had found a javascript example for a querystring function, that looked
    like it ought to do the job. It's code was:

    <script type="text/javascript">
    <!-- Begin

    var qsParm = new Array();
    function qs() {
    var query = window.location.search.substring(1);
    var parms = query.split('&');
    for (var i=0; i<parms.length; i++) {
    var pos = parms.indexOf('=');
    if (pos > 0) {
    var key = parms.substring(0,pos);
    var val = parms.substring(pos+1);
    qsParm[key] = val;
    }
    }
    }
    qsParm['name'] = null;
    qs();
    // End -->
    </script>

    But a) I don't know if this actually works, and b) I can only see how this
    might get called from things like 'onclick' like actions, but not for
    assigning in the

    <param name='fileName' value="Filename1.mpg">

    type of construct. Should that be possible?

    Pascal.
     
    Pascal Herczog, Nov 7, 2005
    #4
  5. Pascal Herczog

    Neredbojias Guest

    With neither quill nor qualm, JDS quothed:

    > On Mon, 07 Nov 2005 20:58:01 +0000, Pascal Herczog wrote:
    >
    > > But, for the life of me, I can't figure out what javascript function or
    > > whatever I need to assign the url parameter to the embedded object parameter
    > > in my movieplayer.htm file.

    >
    > You need server-side stuff to make this work. Javascript won't help for
    > what you describe.


    Yes it will; I use it often to emulate PHP locally without a server.
    Nevertheless, server-side operations are preferable.

    --
    Neredbojias
    Contrary to popular belief, it is believable.
     
    Neredbojias, Nov 7, 2005
    #5
  6. Pascal Herczog wrote:

    > Unfortunately I've no idea whether my ISP, Plusnet, supports
    > php. It might well do, but I know even less than nothing about
    > that! If you could post the required code I'll have a go at it
    > though...


    Oh -- ISP webspace.

    I have no hard data, here, but my hunch is that if you're using
    freebie ISP space, you're probably not going to have server side
    features like PHP.


    --
    Blinky
    Killing all Google Groups posts.
    http://blinkynet.net/comp/uip5.html
     
    Blinky the Shark, Nov 7, 2005
    #6
  7. "bernhard" <> wrote in message
    news:...
    >
    > Pascal Herczog schrieb:
    >
    >> I have an html page divided into 2 frames. The left side contains a table
    >> with a series of hyperlinks to select different movie files to be played
    >> in
    >> the right hand frame. Now, I could do it the easy (boring!) way, and make
    >> each link call a unique html file that contains the exact same embedded
    >> object definition for the media player, but each with a unique
    >>
    >> <param name='fileName' value="Filename1.mpg">
    >>
    >> entry to play the correct movie file.
    >>
    >> However, it seems to me that, given that it is possible to call this url
    >> with some parameters attached, I must surely be able to create a generic
    >> movieplayer.htm file that uses the ?name=Filename1.mpg parameter to
    >> assign
    >> it as the name of the file to be played.
    >>
    >> So, my table url would be <a
    >> href="movieplayer.htm?name=Filename1.mpg">Filename1</a>

    >
    > This must be done using server side scripting. Check if you can use php
    > on your server. it takes less than 10 lines of php code to solve your
    > prob.


    Hmmm - I've actually now got part of it working, so I'm gonna stick with
    Javascript for now.

    I found that by adding a function that actually returns the value asked for
    (duh!), I can get my text to contain the url parameter value. So I used

    function qsVal(key) {
    return qsParm[key];
    }
    .... and the previous function posted...

    and in the body part,

    <script language="javascript" type="text/javascript">
    document.write(qsVal('1'));
    </script>

    nicely in the middle of the text describing the hyperlink.

    Only thing is, I can't seem to get this assigned within the <param... bit of
    my embedded object.

    I'm trying to use

    <param name='fileName' value='javascript:qsVal(0)'>

    But I can't see why it's not doing anything. Any further help much
    appreciated.

    Pascal.
     
    Pascal Herczog, Nov 8, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marcelo Birnbach [MS]
    Replies:
    0
    Views:
    3,366
    Marcelo Birnbach [MS]
    Jun 28, 2003
  2. biteside
    Replies:
    0
    Views:
    4,427
    biteside
    Oct 13, 2003
  3. Edison
    Replies:
    2
    Views:
    1,673
    Jonathan Bromley
    Jun 30, 2003
  4. senthil
    Replies:
    0
    Views:
    637
    senthil
    Nov 21, 2003
  5. grocery_stocker
    Replies:
    10
    Views:
    660
    Keith Thompson
    May 25, 2005
Loading...

Share This Page