Click to See Complete Forum and Search --> : Putting content in transparent iFrame
Vaneet
05-02-2003, 09:00 AM
Hi Guys,
There are two frames in my window. when the click the menu in my left frame, i want the content to be displayed in iFrame that is inside right FRame.
Actually in right frame, there are two iFrames , one holding a background image that i want to keep all the time. There is another iFRame in right frame that i have made transparent and i want all the content to be displayed in the transparent frame so that USER can see the image in the background while reading the text.
So, When i click any of links on the left frame, i want to see the content (an html page loaded) within iframe that is within right frame. please do tell me and code will be appreciated
Kind regards
Vaneet Sharma
Is the only reason that you are using an iframe inside a frame to keep your background static? If so, try this bit of CSS to do that instead... <body style="background-image:url(your.gif);" background-attachment: fixed;"> Seems like a better alternative than what you are doing...
Vaneet
05-02-2003, 11:05 AM
Thank you for that but my background image need to be zoomed in and out. So, The solutiong of putting content in transparent frame would be nice.
At the moment, I have worked out some solution but need a better solution
The code that worked for me is:
<a HREF="javascript:void(parent.frames[1].transparentFrame.location.href='research.html');"> Research </a>
This code is in left frame. The link in the left frame is putting a document(research.html) in a transparent frame(named transparentFrame) which lies in rightFrame.
It is working fine for me now.......
But i want to use javascript function in this way so that my site can be indexed better in search engines like google while searching..
<a href = "research.html target = rightFrame.transparentFrame" onclick = "some javascrptFunction()" >
If i do like second case, it doesnt work for me,
Can somebody help me in that
Regards
Vaneet
I think that this is the closest you can come...
<a href="research.html" target="rightFrame" onclick="top.rightFrame.transparentFrame.location.href=this.href; return false"> Research </a>
For browsers with javascript disabled, it will open the links in your rightFrame, but not the iframe...
Vaneet
05-02-2003, 11:30 AM
Thank you. Can u please let me know how can i master javascript. Basically i want to make a site in HTML and Javascript or u can say DHTML so that i can simulate exactly like flash. Dynamic but without flash.
If you know any good website or any material , that would be appreciated.
Even if i come to know the DOM tree , i mean API tree telling me properties and functions supported by window object, document object...etc.. it would be very easier for me then as i am well versed with Java and can use attributes provided and play with javascript.
Thankx again
Vaneet
A good place to start is always the source. You can find the javascript documentation at http://developer.netscape.com/docs/manuals/javascript.html Also, if you are looking for a book on javascript, I would recommend 'JavaScript, The Definitive Guide' by David Flanagan. I've never read any javascript tutorials, so I can't point you to any. My personal preferce is to use a book to get the basics and then use some sort of documentation from there.
Hope that helps...