This works in FireFox but not IE 6. Please advise me with any solutions.
<snippet>
<input type="submit" value="I agree" onMouseOver="hidebox();return false">
</snippet>
6 1710
This works in FireFox but not IE 6. Please advise me with any solutions.
<snippet>
<input type="submit" value="I agree" onMouseOver="hidebox();return false">
</snippet>
Please show us the full code including the Javascript.
Aric
-
var ns4=document.layers
-
var ie4=document.all
-
var ns6=document.getElementById&&!document.all
-
-
//drag drop function for NS 4////
-
/////////////////////////////////
-
-
var dragswitch=0
-
var nsx
-
var nsy
-
var nstemp
-
-
function drag_dropns(name){
-
if (!ns4)
-
return
-
temp=eval(name)
-
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
-
temp.onmousedown=gons
-
temp.onmousemove=dragns
-
temp.onmouseup=stopns
-
}
-
-
function gons(e){
-
temp.captureEvents(Event.MOUSEMOVE)
-
nsx=e.x
-
nsy=e.y
-
}
-
function dragns(e){
-
if (dragswitch==1){
-
temp.moveBy(e.x-nsx,e.y-nsy)
-
return false
-
}
-
}
-
-
function stopns(){
-
temp.releaseEvents(Event.MOUSEMOVE)
-
}
-
-
//drag drop function for ie4+ and NS6////
-
/////////////////////////////////
-
-
-
function drag_drop(e){
-
if (ie4&&dragapproved){
-
crossobj.style.left=tempx+event.clientX-offsetx
-
crossobj.style.top=tempy+event.clientY-offsety
-
return false
-
}
-
else if (ns6&&dragapproved){
-
crossobj.style.left=tempx+e.clientX-offsetx+"px"
-
crossobj.style.top=tempy+e.clientY-offsety+"px"
-
return false
-
}
-
}
-
-
function initializedrag(e){
-
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
-
var firedobj=ns6? e.target : event.srcElement
-
var topelement=ns6? "html" : document.compatMode && document.compatMode!="BackCompat"? "documentElement" : "body"
-
while (firedobj.tagName!=topelement.toUpperCase() && firedobj.id!="dragbar"){
-
firedobj=ns6? firedobj.parentNode : firedobj.parentElement
-
}
-
-
if (firedobj.id=="dragbar"){
-
offsetx=ie4? event.clientX : e.clientX
-
offsety=ie4? event.clientY : e.clientY
-
-
tempx=parseInt(crossobj.style.left)
-
tempy=parseInt(crossobj.style.top)
-
-
dragapproved=true
-
document.onmousemove=drag_drop
-
}
-
}
-
document.onmouseup=new Function("dragapproved=false")
-
-
////drag drop functions end here//////
-
-
function hidebox(){
-
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
-
if (ie4||ns6)
-
crossobj.style.visibility="hidden"
-
else if (ns4)
-
document.showimage.visibility="hide"
-
}
-
- <%if foreignna = "Yes" then%>[HTML]
-
</div>
-
<div id="showimage" style="position:absolute; width:1500px; left:300px; top:275px; height: 167px;">
-
-
<table border="0" width="650" bgcolor="#005999" cellspacing="0" cellpadding="2">
-
<tr>
-
<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"
-
height="36px">
-
<tr>
-
<td id="dragbar" style="cursor:hand; cursor:pointer" width="100%" onMousedown="initializedrag(event)"><ilayer width="100%" onSelectStart="return false"><layer width="100%" onMouseover="dragswitch=1;if (ns4) drag_dropns(showimage)" onMouseout="dragswitch=0"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><strong><small>Important Notice to Foreign Nationals</small></strong></font></layer></ilayer></td>
-
<!--<td style="cursor:hand"><a href="index.asp" onClick="hidebox();return false"><img src="close.gif" width="19"
-
height="14px" border=0></a></td>-->
-
</tr>
-
<tr>
-
<td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="4"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#005999">
-
-
<div align="left"><font size="3">
-
<!-- PUT YOUR CONTENT BETWEEN HERE -->
-
Technical data authorized for export may not be reexported, transferred or diverted from the country of ultimate end-use or from the authorized foreign end-user or disclosed to a national of another country without the prior written approval of the Office of Defense Trade Controls.
-
Technical data posted to this website has been authorized for export from the United States to Four Eyes Allied Partners, nationals of Australia, Canada, and the United Kingdom by the Office of Defense Trade Controls, insofar as individual nationality is not diverse from his or her employing agency. <br><br><br>
-
<!--Added a onmouseover as well as onclick event to accommodate two click events-->
-
<center><input type="submit" value="I agree" onMouseOver="hidebox();return false"></center>
-
<!-- END YOUR CONTENT HERE -->
-
</font></div>[/HTML]
-
<%else%>
-
<%end if%>
-
I found a work around. I just inserted the content from one of the DHTML boxes into the other and that eliminated the duplicate "on" events. Also, I inserted some if-then-else code so that only certain users that needed to view the second box content could.
In other words, I just deleted one DHTML box and stuck to one DHTML box and left the Javascript alone. However, I kept the content block from one of the boxes, then copied and pasted it into the single DHTML box between the content block.
I'm going to move this to the Javascript forum you will most likely get more answers there.
In the code that you have posted, the div is not closed. That might have been the problem. Also, you are using very old code from the mid-1990s. All modern browsers support document.getElementById.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Chris |
last post by:
Heres my problem:
<a href="javascript:void(document.buysell.submit())" target="_parent"
onMouseOver="MM_swapImage('members','','images/membersf2.gif',1)"
onMouseOut="MM_swapImgRestore()"><img...
|
by: Frances Del Rio |
last post by:
I have a form in which submit button is an img.. would like to do it
w/a rollover, but can't get rollover to work.. can you do rollovers
w/img submit buttons? this is code I have:
<input...
|
by: nikou_70 |
last post by:
I have a page with image, image has some image map, I want to submit
form when user mouseover that image map, my code is like this:
<img src="Images/floor4.jpg"usemap="#planetmap" id="IMG1">...
|
by: libsfan01 |
last post by:
Hi all
is it possible to onclick of a button in one form submit that form and
also submit another form on the same page, both with the same 'action'
location? or is it only possible to send one...
|
by: cbjewelz |
last post by:
Hey all.
So I'm having problems with cross browser alignments. I'm looking at Safari and Mozilla Firefox. I develop in Safari and so it looks perfect there however in Firefox my vertical...
|
by: funkiejunkie |
last post by:
Hello all, I posted a thread a while ago and was told to include the code so here it is.
I still dont really get CSS, everything I have done has been blagged because I cant be bothered to read...
|
by: aljamala |
last post by:
I keep getting this error for the given code region (it actually
highlights the line with the body tag):
line 42 column 1 - Warning: <trisn't allowed in <bodyelements
</head>
<body...
|
by: Rabel |
last post by:
I am a flash designer so I dont know a whole lot about the javascript
submit buttons (I may not even be describing it right sorry) but here
is the code I am using.
<IMG name="Checkout"...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |