I am trying to create a clikable popup window of sorts for my policy pages.
When I first started was getting 5 to 10 errors in FF. Now I don't show errors (but that doesn't mean its right) but in Dreamweaver the whole section in the body part is underlined. What am I doing wrong? Should I just chuck it all and put the files in a .pdf format?
The code
(Currently in header section)
<script type="text/javascript">
<!--
function changePropRestore() {//v1.0
var d=document,x; if(d.$cpe) { for(i=0; i<d.$cpe.length; i++) { x=d.$cpe[i];
if(x.v=="") x.v=""; eval("x."+x.n+"=String(x.v)"); } d.$cpe=null; }
}
function changeProp() {//v1.0
var args=arguments,d=document,i,j,id=args[0],o=getObjectByID(id),s,ao,v,x;
d.$cpe=new Array(); if(o) for(i=2; i<args.length; i+=2) { v=args[i+1]; s="o";
ao=args[i].split("."); for(j=0; j<ao.length; j++) { s+="."+ao[j]; if(null==eval(s)) {
s=null; break; } } x=new Object; x.o=o; x.n=new Array(); x.v=new Array();
x.n[x.n.length]=s; eval("x.v[x.v.length]="+s); d.$cpe[d.$cpe.length]=x;
if(s) eval(s+"=v"); }
}
function getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
function openNewWindow(w,h,nav,loc,sts,menu,scroll,resize,name,url) {//v1.0
var windowProperties=''; if(nav==false) windowProperties+='toolbar=no,'; else
windowProperties+='toolbar=yes,'; if(loc==false) windowProperties+='location=no,';
else windowProperties+='location=yes,'; if(sts==false) windowProperties+='status=no,';
else windowProperties+='status=yes,'; if(menu==false) windowProperties+='menubar=no,';
else windowProperties+='menubar=yes,'; if(scroll==false) windowProperties+='scrollbars=no,';
else windowProperties+='scrollbars=yes,'; if(resize==false) windowProperties+='resizable=no,';
else windowProperties+='resizable=yes,'; if(w!="") windowProperties+='width='+w+',';
if(h!="") windowProperties+='height='+h; if(windowProperties!="") {
if( windowProperties.charAt(windowProperties.length-1)==',')
windowProperties=windowProperties.substring(0,windowProperties.length-1); }
window.open(url,name,windowProperties);
}
// -->
</script>
The Code
(currently in body section)
<table
style="width: 100%" >
<tr>
<td id="id1" onmouseout="changePropRestore()"
onmouseover="changeProp(/*id*/'id1',1,'style.color','#FF0000');"
onclick="openNewWindow('410', '310', false, false, false, false, true, true, '', /*href*/'Policy/privacy_policy.html')">Privacy Policy |</td>
<td id="id2" onmouseout="changePropRestore()"
onmouseover="changeProp(/*id*/'id2',1,'style.color','#FF0000');"
onclick="openNewWindow('410', '310', false, false, false, false, true, true, '', /*href*/'Policy/domain_name_dispute_resolution_p.html')">Domain Resolution Policy |</td>
<td id="id3" onmouseout="changePropRestore()"
onmouseover="changeProp(/*id*/'id3',1,'style.color','#FF0000');"
onclick="openNewWindow('410', '310', false, false, false, false, true, true, '', /*href*/'Policy/domain_name_agreement.html')"> Domain Name Agreement |</td>
<td id="id4" onmouseout="changePropRestore()"
onmouseover="changeProp(/*id*/'id4',1,'style.color','#FF0000');"
onclick="openNewWindow('410', '410', false, false, false, false, true, true, '', /*href*/'Policy/terms_of_service.html')"> Terms of Service</td>
</tr>
</table>
That's Question Number one. I will ask question number two after I have this thingy thing done. Thanks in advance for everyone's help.
Janina
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1892
I've been thanked 34 times.
Offline
I cant help you with the dreamweaver side but if you decide to go into the html and java script side i can definitely give you a script to help with that, the video's on my site all open up in popups if you wanna check it out.
Personally though, i wouldn't put the policies in a pop up, a normal webpage is best and a pdf for download from that page would be perfect. It just looks more professionally... and if the user is blocking popups it may look fishy when the links to your policies don't work...
My up and coming... soon to be real website... www.thewebguy.co.za (one day i will finish it
)Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2793
I've been thanked 77 times.
Offline
jQuery (framework) and Thickbox (plugin)
real page, seo friendly and a really fancy pop-upbox
Thanks guys. I'm just trying to learn everything that I can possibly learn. I already have the files in a .pdf format, but was trying to learn the code for this thing.
Northie, I will try the jguery. I have something from them already too, (have to check what it is). Thanks again. Now back to work.
| Never |


