Click to See Complete Forum and Search --> : iframe and javascript


netsonic
05-05-2003, 06:26 PM
hi all i am using hv dhtml menu.downloaded from dynamicdrive.com ...

the script works good but i have a problem...i am using iframe
middle of my webpage and call every pages in this centered iframe.....

now also i have adhtml menu and i want to give links to this iframe!!!

as u know we link iframes like this ==> games.asp target="main"

now how can i give this link in my dhtml menu?
the menu codes are like this


Menu2=new Array("Dosyalar-Download","updown.asp","goster",2);
Menu2_1=new Array("General","http://yildizteknik.com/index.asp","",5,20,150);
Menu2_1_1=new Array("CNN","http://www.cnn.com","",0,20,150);
Menu2_1_2=new Array("ABCNews","http://www.abcnews.com","",0);
Menu2_1_3=new Array("MSNBC","http://www.msnbc.com","",0);

where am i going to insert the target="main" code....?
this is my problem

plz help me)

thank u & c u

brendandonhue
05-05-2003, 07:25 PM
Put this code in the <head>section of the page.
<BASE TARGET="main">
All links in the page will be targeted to the iframe.

netsonic
05-05-2003, 11:11 PM
hey thanx but it is not what i ve asked...

i am not going to give links in my iframe...as i said before i ll give links from my dhtml menu...
and when u give links u say for exm: games.asp target="main" how am i going to insert this code to my dhtml menu?
this is my question....

thank u
c u

mili
05-05-2003, 11:28 PM
In your exmplmenu_var.js, there is a variable that is defined like this :
var DocTargetFrame='space'; // Frame where target documents appear
Change this to: var DocTargetFrame='main';

netsonic
05-06-2003, 06:59 AM
thanx a lot i like this ;)

mili
05-06-2003, 09:15 AM
u r welcome

netsonic
05-06-2003, 04:40 PM
there is another problem noww....when i ve made the DocTargetFrame='main'; my hv menu gets sticky to the left-top corner of the iframe(which is called main)

normally my menu was on the left side of the browser...but now its sticky to the iframe which is in the middle of the browser...

how can i correct the problem?
i ve tried smthng but didnt work...

plz gimme an idea

thank u

brendandonhue
05-06-2003, 05:18 PM
What you want is for the links to be opened in the iframe, right?
The code I gave you will work for that...

netsonic
05-06-2003, 07:13 PM
no.dont u read my posts?

i am talking about dhtml menus...

u know about dhtml and coding?its different then u do with html