This is a discussion on "embed a plugin after a button click" within the JavaScript Forum section. This forum, and the thread "embed a plugin after a button click are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
embed a plugin after a button click
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
embed a plugin after a button click
I'm still very new in using HTML. Being an amateur Visual Basic programmer, I run into a few problems that seem simple, but I can't find the solution (yet). I want to use a button click (of a self made button (or image) to start a mp3 to play. I wanted to use the <embed> tag, because I want the plugin (quicktime) to show up next to the pressed button. A Member of the HTML forum suggested to use javascript. Thanx |
|
|
|
||||
|
Re: embed a plugin after a button click
Basically you will need to use the button / images on click event to call a function. The function will simply write out the required HTML using javascript's 'document.write' funtions.
Have a go at doing this yourself because it really isnt that hard..... post your code if you get stuck......... We *could* do this for you, but then what do you learn? Research a little about "onclick" and "document.write" and you'll be there in no time. Regards,
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
|||
|
Re: embed a plugin after a button click
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Alert Box</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <img src="Plaatjes/Algemeen/KnopOut.gif" width="160" height="63" onClick="mijnfunctie()"> function mijnfunctie() { <script language="javascript" type="text/javascript"> <!-- document.write("<embed src='Muziek/A Brand New Year (LR).mp3' autostart = 'true'"); //--> </script> } </body> </html> results in showing img + text: function mijnfunctie() { + qtime plugin and starts embedded song straight away without a mouseclick on the image. What did I do wrong ? Last edited by VanderBOOM; Dec 13th, 2005 at 16:47. |
|
||||
|
Re: embed a plugin after a button click
First of all, when posting code, please use code tags, eg.
([code]your code here[/code] ... or in this specific case, [html]your HTML code here[/html]) Lets see.... you have an error in your html... try this:-
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
Last edited by Rob; Dec 13th, 2005 at 17:28. |
|
|||
|
Re: embed a plugin after a button click
regards Hans |
|
||||
|
Re: embed a plugin after a button click
Actually.... if you look closer, you'll see your script tags were also in the wrong place and you never closed the embed tag...... true though... a good learning excercise.
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
![]() |
| Tags |
| embed, plugin, button, click |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help using object/embed tags to embed java applet | Jon1123 | Web Page Design | 2 | Apr 10th, 2007 22:31 |
| automatic pop-up when click on a radio button | joshcxa | JavaScript Forum | 2 | Aug 1st, 2006 06:06 |
| Using a button click to activate an <embed> | VanderBOOM | Web Page Design | 1 | Dec 9th, 2005 15:54 |
| on click button | Monie | JavaScript Forum | 1 | Aug 30th, 2004 06:20 |