Want to thank and support me for my work?
Buy my iWebFAQ.org E-Book (15$) (reviews) (sample) or...
iWebFAQ.org is presented by Cédric and hosted by HostExcellence
It is currently Fri May 24, 2013 12:48 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Password a page in iWeb
Author Message
 Post subject: Password a page in iWeb
PostPosted: Tue Sep 13, 2011 4:46 am 
Offline

Joined: Sun Jan 23, 2011 2:52 am
Posts: 9
I am using the code below to redirect users to a different sub page. Not a big site just for a group of school dance group to keep a calendar private to just the dancers and parents.

<SCRIPT>
function passWord() {
var testV = 1;
var pass1 = prompt('Please Enter The Belles Password',' ');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1.toLowerCase() == "password") {
alert(' Emerald Belles & Parents Only!');
window.open('http://emeraldbelles.com/Belles/Private.html');
break;
}
testV+=1;
var pass1 =
prompt('Access Denied - Password Incorrect, Please Try Again.','Password');
}
if (pass1.toLowerCase()!="password" & testV ==3)
history.go(-1);
return " ";
}
</SCRIPT>
<CENTER>
<FORM>
<input type="button" value="Click Here - Belles & Their Parents Only" onClick="passWord()">
</FORM>
</CENTER>

I got the code at : http://www.javascriptkit.com/script/cut10.shtml

Half of my users complain that they get bounced back to the home page of the site or that nothing happens. Most usually with IE. Chrome and Mozilla seems to be less problematic. All that I can garner from research is to simply "clear the cache" which make a lot of sense but it still seems to be a random but consistant problem. The users pretty basic moms. Any ideas?

Love the book Cedric. Waiting for the cold weather to put the Snow on my sites.

Rick


Top
 Profile Send private message  
 
Password a page in iWeb
Author Message
 Post subject: Re: Password a page in iWeb
PostPosted: Tue Sep 13, 2011 11:49 am 
Offline
Site Admin

Joined: Tue Jun 10, 2008 1:14 am
Posts: 1840
Location: Basel, Switzerland
Hi Rick,

I would suggest you to try the solution discussed here instead:

http://iwebfaq.org/site/iWeb_Login.html

Regards,
Cédric

_________________
Thank you for visiting my websites:
http://iwebfaq.org - http://rapidweaverfaq.org - http://wpfaq.org - http://ebookstoretoday.com
All my websites are hosted by: HostGator


Top
 Profile Send private message  
 
Password a page in iWeb
Author Message
 Post subject: Re: Password a page in iWeb
PostPosted: Wed Sep 14, 2011 4:53 am 
Offline

Joined: Sun Jan 23, 2011 2:52 am
Posts: 9
Having a problem with part of the code. My difficulty is the syntax where the sitename code is.

I only have one username and password for the small group of users who are all the small 80 member school dance team so I don't need a unique username/password for multiple users. The /Private.html hold only a iCal calendar for the dancers and a bit of text with a link back to the abc.com/Belles.html - home page.

I think I have /// the uncecessary code properly. The Target Page I have created in iWeb is http://abc.com/Belles/Private.html . The abc is not the real domain for obvious reasons.

So how do I properly code this in the sitename references? And do I do harm if i delete the ////// lines?


if(usercode == "13189" && passcode == "11660477472"){
window.open('/Private/'+username+'.html','_blank');
}
//// else if(usercode == "121343508" && passcode == "121343508"){
//// window.open('/sitename/'+username+'.html','_blank');
//// }
//// else if(usercode == "1213848300000" && passcode == "1213848300000"){
//// window.open('/sitename/'+username+'.html','_blank');
//// }
else{
window.location.href ="/sitename/error.html";
}

Thanks,
Rick

PS. was this in your PDF booklet? If so I missed it.


Top
 Profile Send private message  
 
Password a page in iWeb
Author Message
 Post subject: Re: Password a page in iWeb
PostPosted: Wed Sep 14, 2011 5:32 am 
Offline
Site Admin

Joined: Tue Jun 10, 2008 1:14 am
Posts: 1840
Location: Basel, Switzerland
window.open('/Private/'+username+'.html','_blank');

should be

window.open('/Belles/'+username+'.html','_blank');

and Private the username people use to login.

Yes delete all the / which aren't in the code you find on the page . I don't know why you got them...

It's on page 301 of the E-Book where it's called Login form.

Regards,
Cédric

_________________
Thank you for visiting my websites:
http://iwebfaq.org - http://rapidweaverfaq.org - http://wpfaq.org - http://ebookstoretoday.com
All my websites are hosted by: HostGator


Top
 Profile Send private message  
 
Password a page in iWeb
Author Message
 Post subject: Re: Password a page in iWeb
PostPosted: Sat Sep 17, 2011 12:23 am 
Offline

Joined: Sun Jan 23, 2011 2:52 am
Posts: 9
Perfect Cedric

IE users still have the same issue with bouncing them back to home page. Wierd how Chrome, Safari, iPad, iPhone and and Mozilla are just fine.

PS. Page 310 not 301.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Jump to:  
cron






Want to support me for my work?

or buy my iWebFAQ.org E-Book (15$)

(reviews) (sample)

Thanks,
Cédric



 

This website is hosted by HostExcellence



© 2008, 2009 Powered by phpBB Group
Macinscott 3 style by Scott Stubblefield