473,395 Members | 1,647 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.

swf overlay

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 4946
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 toggleVisibility()
{
if (document.getElementById('div id').style.display==none)
{
document.getElementById('div id').style.display="block";
}
else
{
document.getElementById('div id').style.display="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="toggleVisibility()"[/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="visible" and visibility="hidden" instead of display="none" and display="block"
Hope this makes sense
Oct 10 '07 #2
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 toggleVisibility()
{
if (document.getElementById('div id').style.display==none)
{
document.getElementById('div id').style.display="block";
}
else
{
document.getElementById('div id').style.display="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="toggleVisibility()"[/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="visible" and visibility="hidden" instead of display="none" and display="block"
Hope this makes sense
Oct 10 '07 #3
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
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...
5
by: Fabri | last post by:
Someone call please tell me why this simple code: ================================================================= <html> <head> <title>Example</title> <style type="text/css"> #msg{...
9
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
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...
1
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...
0
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:...
9
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...
2
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
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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.