473,395 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to Embed HTML in JavaScript

I want to embed the following code in javascript function javascript function is written just after the object code, I want to replace the popup window code with this object code while the file name will be received in function parameter.

[HTML]<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=10,0,0,0"
ID=Child1 width=820 height=621>
<param name=src value="Child1.dcr">
<param name=swRemote value="swSaveEnabled='true' swVolume='true' swRestart='true' swPausePlay='true' swFastForward='true' swContextMenu='true' ">
<param name=swStretchStyle value=none>
<PARAM NAME=bgColor VALUE=#DDDDDD>
<embed src="Child1.dcr" bgColor=#DDDDDD width=820 height=621 swRemote="swSaveEnabled='true' swVolume='true' swRestart='true' swPausePlay='true' swFastForward='true' swContextMenu='true' " swStretchStyle=none
type="application/x-director" pluginspage="http://www.macromedia.com/shockwave/download/"></embed>
</object>[/HTML]

[HTML]<script type="text/javascript">
function jump(menu){
var vLen = menu.choice.options[menu.choice.selectedIndex].value.length;
var vExt = menu.choice.options[menu.choice.selectedIndex].value.substring(vLen-3,vLen);

if (vExt == 'dxr' || vExt == 'dcr'){
MyWindow3=window.open('images/'+menu.choice.options[menu.choice.selectedIndex].value,'MyWindow3',"height=600,width=800,toobar=0, location=0,directories=0,status=0,menubar=0,scroll bars=1,resizeable=0");
vExt=null;
}
}
</script>[/HTML]
Nov 4 '08 #1
1 6229
acoder
16,027 Expert Mod 8TB
I want to replace the popup window code with this object code
Do you mean you want to create the object element or do you want to set the value of a param element?
Nov 4 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Csaba2000 | last post by:
I want to be able to embed a single quote into an INPUT element within a dynamically generated IFRAME. The example below shows how the IFRAME is generated. Challenge: I'd like the alert box to...
3
by: Tony Sutton | last post by:
I have this following code in my html file: <object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#...
8
by: jalexa9898 | last post by:
I am asking because I wrote some flex that was put in xml and I want to embed it in some html is this hard to do?
3
by: abrtlt | last post by:
I would like to have a web page in which, when the user clicks on any of several specific elements, a specific audio file is played, without reloading the page. The specific audio file name is...
2
polymorphic
by: polymorphic | last post by:
I am no longer good at Javascript and need help. I'm trying to embed pdf files in html then build some sort of navigation between the pdfs via the pdf numbered file name. I can generate the...
13
by: windsorben | last post by:
I have some javascript that checks whether or not an answer is correct. It was working fine when the question was asked with text but now that I'm asking the question with audio, the javascript no...
3
by: helraizer1 | last post by:
I have this code in JS function show_player() { document.mediaplayer1.style.visibility = "visible"; } function content(p, clip) { var mus = document.getElementById('music'); ...
5
by: elbin | last post by:
Hello, first to say that I am a total beginner in Javascript but I know some programming (python in particular) and am able to understand methods/parameters and so on. Here's my problem: I am...
2
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.