Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Changing a plugin source

Cpp NewbieCpp Newbie Posts: 16Member
I need to use java script to change the source of a plugin.

I have been using Dreamweaver and got the following code:


If it is used in the body of the document it works fine but i move it to the javscript it doesnt work. im not sure what it needs 2 make it work.

Thanks for any help,
adam

Comments

  • zibadianzibadian Posts: 6,349Member
    : I need to use java script to change the source of a plugin.
    :
    : I have been using Dreamweaver and got the following code:
    :
    :
    : If it is used in the body of the document it works fine but i move it to the javscript it doesnt work. im not sure what it needs 2 make it work.
    :
    : Thanks for any help,
    : adam
    :
    Here's a simple untested way, which might work:
    [code]

    filename = window.location.search.substring(1);
    document.write('');

    [/code]
    This code writes the -tag into the page, while it is loading. This particular code gets the filename of the sound to play from the URL. The URL to duplicate your original code is like: mypage.html?firework3.wav
Sign In or Register to comment.