473,915 Members | 5,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

swf overlay

10 New Member
Hi everyone,
I'm having problem with my html code. I'm new to the html programming so please bare with me. The problem that I'm having is that I have a swf file that i have placed in a div tag. This div tag is overlaying the web page, which it is intended to do so. The swf play automatically when the page is loaded. Is there a way that I can collapse the div tag? Because i want the button that i have created to expand the div tag to play the swf file.
Oct 9 '07 #1
3 4976
FullyH3ktik
52 New Member
Hi everyone,
I'm having problem with my html code. I'm new to the html programming so please bare with me. The problem that I'm having is that I have a swf file that i have placed in a div tag. This div tag is overlaying the web page, which it is intended to do so. The swf play automatically when the page is loaded. Is there a way that I can collapse the div tag? Because i want the button that i have created to expand the div tag to play the swf file.
In the head section of your document add this:
[HTML]<script type="text/javascript">
function toggleVisibilit y()
{
if (document.getEl ementById('div id').style.disp lay==none)
{
document.getEle mentById('div id').style.disp lay="block";
}
else
{
document.getEle mentById('div id').style.disp lay="none";
}
}
</script>[/HTML]
div id is the id of the div
then add this to the div tag:
[HTML]style="display: none;"[/HTML]
and in the button input tag add this:
[HTML]onclick="toggle Visibility()"[/HTML]
because we are using display, when the value is "none" the surrounding elements might "collapse" and fill the space where the div used to be
If you still want the "presence" of the div to be there without displaying it though, you use visibility="vis ible" and visibility="hid den" instead of display="none" and display="block"
Hope this makes sense
Oct 10 '07 #2
mindshare
10 New Member
Thanks for the response let me give it a try and I'll get back to you later.


In the head section of your document add this:
[HTML]<script type="text/javascript">
function toggleVisibilit y()
{
if (document.getEl ementById('div id').style.disp lay==none)
{
document.getEle mentById('div id').style.disp lay="block";
}
else
{
document.getEle mentById('div id').style.disp lay="none";
}
}
</script>[/HTML]
div id is the id of the div
then add this to the div tag:
[HTML]style="display: none;"[/HTML]
and in the button input tag add this:
[HTML]onclick="toggle Visibility()"[/HTML]
because we are using display, when the value is "none" the surrounding elements might "collapse" and fill the space where the div used to be
If you still want the "presence" of the div to be there without displaying it though, you use visibility="vis ible" and visibility="hid den" instead of display="none" and display="block"
Hope this makes sense
Oct 10 '07 #3
mindshare
10 New Member
Thanks for the code. The only problem that I'm having is that the div tag is overlaying my button and I can't click on it. What can I do.
Oct 26 '07 #4

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

Similar topics

0
1764
by: Byron | last post by:
HI- I have a problem while resizing a Window to make a transparent overlay. Using a control looks terrible due to flicker, but you can use a borderless form with the transparency setting that doesn't accept focus. When you click and drag, the bounds of the form are updated. Moving the mouse from the top left of the screen towards the bottom right looks great. But when you move from the bottom right to the top left
5
2798
by: Fabri | last post by:
Someone call please tell me why this simple code: ================================================================= <html> <head> <title>Example</title> <style type="text/css"> #msg{ position: absolute; background-color: white;
9
5014
by: Ross | last post by:
it seems that it is only supported by w3c but not IE or netscape, but what is a w3c browser ?
0
5686
by: Never Best | last post by:
I'm having troubles attaching the Device to a window using its hWnd, and I have some troubles with getting transparancy to work with a DDOverlay... if anyone could help it would be greatlay appreasated. Here is some of my code. The Transparancy isn't working because the ColorSpaceLow/HighValue isn't set... The Line" overFX.DestinationColorKey.ColorSpaceLowValue = Color.White" returns the error "Cannot Modify the return value because it...
1
3937
by: sendhil | last post by:
hi, Iam doing some graphics programming with C#. I have to create a Windows MetaFile from a base64 encoded string. How do i create the file. I want to Overlay this Windows MetaFile on a image which is present in a Picture box. Any ideas to do this? Thanks senthil
0
5167
by: odie5533 | last post by:
I am looking to make a program similar to Xfire which will overlay information while playing a directx game. For an example of what xfire is capable of, see the image below: http://media.xfire.com/xfire/xf/themes/XFire3/images/tour/tour_image_4.jpg I believe it is possible to overlay to DX games without needing to use directx since I don't see any calls to d3d or dd libraries in Xfire. I am able to get a basic overlay using...
9
5880
by: Chuck Anderson | last post by:
Is it possible to overlay a transparent watermark on an image - dynamically? I'd like the result to look like this example: <http://www.cycletourist.com/temp/photo.php> That is a bit of overkill, but you can see what I mean. The watermark image (a png image) is included separately below the photo. I tried using a class from phpclasses.org <http://www.phpclasses.org/browse/package/1580.html...
2
3295
by: pravinnweb | last post by:
i have dropdown select menu in my page. when i click any button the black overlay comes while loading. in FF overlay working fine but in IE the select option menu appeared on overlay...please help me
5
3881
by: pravinnweb | last post by:
i have dropdown select menu in my page. when i click here link the black overlay comes .in FF overlay working fine but in IE6 the select option menu appeared on overlay...please help me thanks in advance! here is the code <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>LIGHTBOX EXAMPLE</title>
1
3967
by: linksterman | last post by:
I want to make a simple app to overlay subtitles on youtube videos. Is there a way to do this and keep the files hosted on youtubes servers (eg just overlay the text with another flash app)? I have researched simple FLV players as a way to overlay text, but so far it seems youtube is being very hard at making the direct URL to the FLV very hard to obtain.
0
10039
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11354
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7256
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3368
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.