Hello everyone. I seem to be stuck on showing and hiding the object/embed tags through JS. I have a div that displays on top of the page when the user clicks on a link. Before I user clicks on the link to show the div, the div is display:none; and after the user clicks on the link it will be display:block. However, before I set the div to have a display:block, I want it to hide all the object/embed tags. I do so by calling a function passing a value of either “close” or “open”. It seems I have it working both ways, but is doesn’t become “visible” again after I hide it? This is what I have:
function swfAction(action) {
var swfs = document.getElementsByTagName("EMBED");
if(swfs.length === 0) {
swfs = document.getElementsByTagName("OBJECT");
}
for(var i = 0; i < swfs.length; i++) {
swfs*.style.visibility = (action === "close" ? "hidden" : "visible");
alert(swfs*.style.visibility);
}
}
When I do the “alert”, the expected value is set accordingly, but the swf/flash file isn’t to be seen!? I appreciate it if anyone can tell me what I am doing wrong, thanks
Yes, I understand… But what if my case you are developing the site on the local server AND you don’t want to give the link out to your site until you finish developing it?
I mean, this is the Development section of this forum and anyone could take my idea and quickly round up a team and develop the site, and there goes my hard work and idea… I am only one programmer compared to how many out there - and I am really slow at programming, hehe. No offense, but I am sure I speak for a lot people who are in the “cautious” zone about this. I understand that “we” (like you mentioned) need to see the site to troubleshoot the problem, but “we” have to take account that a lot of people come here to develop something that is not finished and that is why they are here for help and understanding.
[quote=gregmax;2337369]Yes, I understand… But what if my case you are developing the site on the local server AND you don’t want to give the link out to your site until you finish developing it?
I mean, this is the Development section of this forum and anyone could take my idea and quickly round up a team and develop the site, and there goes my hard work and idea… I am only one programmer compared to how many out there - and I am really slow at programming, hehe. No offense, but I am sure I speak for a lot people who are in the “cautious” zone about this. I understand that “we” (like you mentioned) need to see the site to troubleshoot the problem, but “we” have to take account that a lot of people come here to develop something that is not finished and that is why they are here for help and understanding.[/quote]
I understand what you are saying, but it isn’t likely to happen. No offense, but now a days almost any idea you have will not be new or something so spectacular that people will want to copy it.
If you can’t trust the people you’re asking a question about, with your work, then whats the point of asking
Again…
Yes, I understand… But what if my case you are developing the site on the local server AND you don’t want to give the link out to your site until you finish developing it?
Because I have had previous partners who have taken my idea and went off and used them… thats why.