PDA

View Full Version : Slide-In Menu and iframes



Raven2911b
05-12-2006, 07:16 AM
:confused:
Ok, this is really driving me crazy.

I have the Dynamic Slide-in menu that links pdf files to the iframe on the same page in a IE browser (its the only one I can use for this little project). The problem (which appears to be a common one) is that after the pdf loads into the iframes, the menu gets displayed behind it. At first I thought there wasnt a fix, but I came across the follwoing site:

http://www.fluidedesign.com/embedded_pdf_example2.htm

I looked at the code and i just cannot figure out how this is done. Rights now its 4:13AM and eyes are gone buggy.
I would truly appreciate ANY help with this.

Thx
Wayne

PS: I tried z-index, but oviously need to read more about cuz that didnt work either.

My apologies... I forgot to link to the script I am using.
Here it is
http://www.dynamicdrive.com/dynamicindex1/davidmenu.htm

Raven2911b
05-12-2006, 08:00 AM
here is the code im using if it helps:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>CRJ 100/200 Maintenance Manuals</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
<!--
A.ssmItems:link {color:black;text-decoration:none;}
A.ssmItems:hover {color:black;text-decoration:none;}
A.ssmItems:active {color:black;text-decoration:none;}
A.ssmItems:visited {color:black;text-decoration:none;}
//-->
</style>

<SCRIPT SRC="ssm.js" language="JavaScript1.2">
</SCRIPT>
<!--Dynamic-FX slide in menu v6.5 (By maXimus, http://maximus.ravecore.com/)-->
<!--Updated July 8th, 03' for doctype bug-->
<!--For full source, and 100's more DHTML scripts, visit http://www.dynamicdrive.com-->
<SCRIPT SRC="ssmItems.js" language="JavaScript1.2">
</SCRIPT>

</head>

<body bgcolor="#FFFFFF" text="#000000">
<strong><font face="Arial"> <font color="#FFFFFF">.......</font>CRJ 100/200 Maintenance
Manuals</font> </strong>

<table width=100% border="0" cellspacing="0" cellpadding="0" height="100%" align="left" valign="top" marginwidth="0" marginheight="0">
<tr>

<td height=1000 width="25"></td>
<td bgcolor="#CCCCCC" width="999"> <p>

<iframe name="IF1" height="100%" width=100% frameborder="1" color="#cccccc" ></iframe>

</td>

<td width="2" ></td>
</tr>
<tr>

<td height=1* width="24"></td>

<td width="999" ></td>

<td width="2" ></td>
</tr>
</table>

</body>
</html>

Raven2911b
05-13-2006, 03:32 AM
does anybody even have a guess?
I'm really stuck folks and would appriciate any info.

djr33
05-13-2006, 05:45 AM
so... you want a link to open NOT in the iframe the link was in?

just use <a href..... target="framename">text</a>

Note: I'm not sure what the main frame is called, but I *think* it's just main, but not sure if that's default or if you have to set it first... the iframe is obviously whatever the name= attribute is... but not sure for the host. I do think it's "main" though.

That should work for what you want... unless your question is more complex than I'm seeing it. Sorry if so.

Raven2911b
05-13-2006, 09:26 AM
ok, I've uploaded a sample of what my problem is.

http://home.rushcomm.ca/~raven/

When you select the "Whats New" or "Whats Hot", it loads the page in the iframe just like its supposed to. But when you select the "Test PDF File", the file gets loaded, the then the slide menu falls behind the iframe.

I hope this explains it better by actaully seeing it in action.

Raven2911b
05-18-2006, 01:51 AM
im still here trying to figure out this problem.....

djr33
05-18-2006, 04:05 AM
doesn't work at all in Safari... probly just the original script. It seems to work in mozilla, though.

Downloading a file isn't something you can really control. Some browsers will use a plugin to actually view it like a webpage within the window, including a back button and address bar, etc.
Others will download.

For mozilla (mac version), when I click download, the prompt to download pops up and the menu slides back to the side it started at. Seems like that's what you would want.

For browsers that don't do that, you may want to make it a special command on the link for the pdf: <a href=.... onClick="function()">
if you need two functions (you already have one) the syntax is "function1();function2()".

Now... the only question is which function to use. Looking at the script supplied with on the DD page, I can't tell what minimizes the window.
Try them all, I guess.
Might be makeStatic()... that seems, based on the name, like the most likely choice.

Anyway, just call that and when you click the pdf link, it will know the hide the menu. That will be nice 'cause it won't get hidden.


Note: generally, controlling how files are downloaded is either hard or impossible because of weird browsers and security in them... so... try to find a way around it like hiding the menu rather than changing the way downloads work... it'll save a lot of time.
(Not saying you planned to do that... just that it's worth knowing)

Raven2911b
05-18-2006, 07:38 PM
thanks drj33
i will certainly give that a try.
i did do a small mod and put a button on the top that the user can select to clear the iframe and see the menu once again. its a temporary work-around for now.

i appreicate your help.

Raven

djr33
05-18-2006, 11:16 PM
Sure.

I hope what I'm suggesting works. Feel free to try other stuff... not really sure about this.

I do think the key is manually (through the code anyway) controlling when the popup is there and not, though... that will simplify hiding and such.

streamfx
06-29-2006, 02:24 AM
I am trying to get http://www.dynamicdrive.com/dynamicindex1/ to work in Safari. Any ideas why it doesnt?