Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 11th, 2005, 11:25 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default placemarks

I have a HTML page called 'help.htm'.

How do i set placemarks on this page beside the Online registration area and the agency setup area so that i can reference it from a hyperlink:

eg.
<a href="help.htm">On-line Registration</a>
<a href="help.htm">Agency Setup</a>

i.e. so the page jumps straight to that area when clicked.
something like <a href="help.htm#top">On-line Registration</a>
(takes me to top of page!)

Picco

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old March 11th, 2005, 11:29 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default


<ul id='top'>
    <li><a href='help.htm#anchor1'>Anchor 1</a></li>
    <li><a href='help.htm#anchor2'>Anchor 2</a></li>
    <li><a href='help.htm#anchor3'>Anchor 3</a></li>
    <li><a href='help.htm#anchor4'>Anchor 4</a></li>
</ul>

<p id='anchor1'>
Some paragraph text. <a href='help.htm#top'>Top</a>
</p>
<p id='anchor2'>
Some paragraph text. <a href='help.htm#top'>Top</a>
</p>
<p id='anchor3'>
Some paragraph text. <a href='help.htm#top'>Top</a>
</p>
<p id='anchor4'>
Some paragraph text. <a href='help.htm#top'>Top</a>
</p>

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old March 11th, 2005, 01:14 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

how do i pass this in my javascript:

var menu2=new Array()
menu2[0]='<a href=# onclick=parent.main.location.href="help.htm#anchor 1"; target="_parent"><b>Registration</b></a><br>'
menu2[1]='<a href=# onclick=parent.main.location.href="help.htm#anchor 2"; target="_parent"><b>Agency Setup</b></a><br>'
menu2[2]='<a href=# onclick=parent.main.location.href="help.htm#anchor 3"; target="_parent"><b>Staff User Names</b></a><br>'

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
 
Old March 11th, 2005, 01:22 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

I have a menu system . What I want now is to create a
menu that the submenus will cross a frame border.

i.e.
______________
Top Frame/w Menu
-------------------
        |submenu|

Bottom Frame
______________
Is there a way to make the submenus cross the border and cover what is in
the bottom frame?



Any help is greatly appreciated.

Thanks.


www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
 
Old March 11th, 2005, 01:33 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

My full code:

<script type="text/javascript">

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br>'
menu1[1]='<a href="http://www.freewarejava.com">Freewarejava.com</a><br>'
menu1[2]='<a href="http://codingforums.com">Coding Forums</a><br>'
menu1[3]='<a href="http://builder.com">Builder.com</a><br>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a onclick=parent.main.location.href="help.htm"; onmouseover=style.cursor="hand"; target="_parent"><b>Registration</b></a><br>'
menu2[1]='<a onclick=parent.main.location.href="help.htm"; onmouseover=style.cursor="hand"; target="_parent"><b>Agency Setup</b></a><br>'
menu2[2]='<a onclick=parent.main.location.href="help.htm"; onmouseover=style.cursor="hand"; target="_parent"><b>Staff User Names</b></a><br>'


var menuwidth='165px' //default menu width
var menubgcolor='#003366' //menu bgcolor
var disappeardelay=300 //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';backg round-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWid th-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeig ht-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeigh t
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHe ight
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

</script>

<table width="800" border="0" align="center">
  <tr>
    <td><div align="center"><img src="images/mack_demo_navframe.gif" width="515" height="33">
      <table border="1" width="515" align="center" cellpadding=0 cellspacing=0 bordercolor="#000000" bgcolor="#000000" id=link_table name=link_table>

        <tr bordercolor="#AEBDE5">
          <td width="128" align="center" style="border:1px solid #999999;cursor:hand;background-color:#003366;text-align:center" onclick="parent.main.location.href='airbook.asp';" onmouseover="fadeImgend2(0)" onmouseout="fadeImg2(0)">Flights</td>
          <td width="128" align="center" style="border:1px solid #999999;cursor:hand;background-color:#003366;text-align:center" onclick="parent.main.location.href='bookings.asp'; " onmouseover="fadeImgend2(1)" onmouseout="fadeImg2(1)">Bookings</td>
          <td width="128" align="center" style="border:1px solid #999999;cursor:hand;background-color:#003366;text-align:center" onclick="parent.main.location.href='admin_login_fo rm.asp';" onmouseover="fadeImgend2(2)" onmouseout="fadeImg2(2)">Admin</td>
          <td width="129" align="center" style="border:1px solid #999999;cursor:hand;background-color:#003366;text-align:center" onclick="return dropdownmenu(this, event, menu2, '200px');" onmouseover="fadeImgend2(3)" onmouseout="fadeImg2(3);delayhidemenu()">Help</td>
          <td width="129" align="center" style="border:1px solid #999999;cursor:hand;background-color:#003366;text-align:center" onclick="parent.location.href='logout.asp?logOut=t rue';" onmouseover="fadeImgend2(4)" onmouseout="fadeImg2(4)">Logout</td>
        </tr>
      </table>
    </div></td>
  </tr>
</table>


www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
 
Old March 15th, 2005, 10:24 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

does anyone know how to remove trial from apycom dhtml menu

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
 
Old March 15th, 2005, 04:37 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Go here: http://dhtml-menu.com/order.html and then click the Buy Now! link....

Imar
 
Old March 23rd, 2005, 11:39 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

think its 30 quid though

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.