HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Links in Frame
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame
View previous topic :: View next topic  
Author Message
logiq



Joined: 19 Apr 2008
Posts: 1

PostPosted: Sat Apr 19, 2008 4:53 am     Links in Frame Reply with quote

Hello everyone.

I am trying to make a webpage where I have a JavaScript dropdown menu in a iframe. Seems to work just fine. But when I click on one of the links, they next page will be displayed inside the iframe. I cant do something like:

Code:

<a href="filename.html" target=Framename>Example</a>


Because the links are made with the JavaScript..

Here is the Iframe file with the JavaScript menu tree:

Code:
      
<script type="text/javascript" src="dtree.js"></script>
<link rel="stylesheet" type="text/css" href="style.css" />

<br>
<font color="black" size="1px"><div style="margin:-15px 0px 0px 0px">

<div class="dtree">

   <a href="javascript: d.openAll();">Open all</a> | <a href="javascript: d.closeAll();">Close all</a>
<br><br>
   <script type="text/javascript">
      <!--

      d = new dTree('d');

d.add(0,-1,'Our Affiliates');
   d.add(1,0,'Active','');
      d.add(2,1,'Data Delay Devices','data_delay_devices.html');
      d.add(3,1,'RF Identification','rf_identification.html');
      d.add(4,1,'Voltage Supervesory IC','Voltage_Supervesory_IC.html');
      d.add(5,1,'Micro-Controller','Micro_Controller.html');
      d.add(6,1,'Contact Smart Card IC','Contact_Smart_Card_IC.html');
      d.add(7,1,'Standard Analog','Standard_Analog.html');
      d.add(8,1,'Timing Products','Timing_Products.html');
      d.add(9,1,'ASIC & Semi-Custom','ASIC_Semi_Custom.html');
      d.add(10,1,'Development Tools','Development_Tools.html');
      d.add(11,1,'Telecom and Consumer','Telecom_and_Consumer.html');
      d.add(12,1,'Summit Microelectronics','Summit_Microelectronics.html');
   d.add(13,0,'Frequency Control','');
      d.add(14,13,'Crystals & Crystal Filters & Oscillators','Crystals_Crystal_Filters_Oscillators.html');
      d.add(15,13,'Crystals','Crystals.html');
      d.add(16,13,'Oscillators','Oscillators.html');
   d.add(17,0,'LED`s','');
      d.add(18,17,'Ledtronics','Ledtronics.html');
      d.add(19,17,'LED`s','LEDs.html');
   d.add(20,0,'Inductive','');
      d.add(21,20,'EMC Filter','EMC_Filter.html');
      d.add(22,20,'Inductors','Inductors.html');
      d.add(23,20,'Releays','Releays.html');
      d.add(24,20,'Solenoids','Solenoids.html');
      d.add(25,20,'Actutators','Actutators.html');
      d.add(26,20,'Battery Disconnect Relay','Battery_Disconnect_Relay.html');
   d.add(27,0,'Mechanical','');
      d.add(28,27,'Enclosures Bernic','Enclosures_Bernic.html');
      d.add(29,27,'Enclosures Hammond','Enclosures_Hammond.html');
      d.add(30,27,'Enclosures Teko','Enclosures_Teko.html');
   d.add(31,0,'Optic','');
      d.add(32,31,'Photo-Resistors','Photo_Resistors.html');
   d.add(33,0,'Passive','');
      d.add(34,33,'Capasitors','Capasitors.html');
      d.add(35,33,'Component Holders','Component_Holders.html');
      d.add(36,33,'Connectors','Connectors.html');
      d.add(37,33,'Shirkings Tubes','Shirkings_Tubes.html');
      d.add(38,33,'Shunts','Shunts.html');
      d.add(39,33,'Termistors Circuit Protection','Termistors_Circuit_Protection.html');
   d.add(40,0,'Sensors','');
      d.add(41,40,'Temperatur','Temperatur.html');
   d.add(42,0,'Sound','');
      d.add(43,42,'Star','Star.html');
      d.add(44,42,'Digisound','Digisound.html');
   
   
      document.write(d);

      //-->
   </script>

</div>
</div>
</font>
</div>


As you can see, I cant add the frame target html code to the JavaScript, and Im not experienced with JavaScript.

Suggestions would be greatly appreciated

Thanks in advice
Corey Bryant



Joined: 15 May 2004
Posts: 8131
Location: Castle Rock CO USA

PostPosted: Sat Apr 26, 2008 1:32 pm     Reply with quote

I wouldn't use the iframe, but if you need to - check with the provider of the code. They should have the option to add the frame.

Actually I did a quick search and found that if you look in the dtree.js file, you should have a place to specify the target.

_________________
Corey
Hosting Solutions | Mile High Merchant Accounts | Expression Web Blog
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial