6 replies [Last post]
CSSdummy
Offline
newbie
Last seen: 17 years 51 weeks ago
Joined: 2005-06-08
Posts: 2
Points: 0

Guess the moderator doesn't feel my question on creating CSS coding is worth being on the board, so I will go elsewhere.

Tags:
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 20 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Creating page with password login and new window PDF file??

CSSdummy I'm moving this post to 'Off Topic' as the question does not have much to do with CSS code and certainly nothing to do with 'Beginners CSS Questions'

I would have thought that if you wanted a secure login script you should really be looking at a PHP script or if you have Apache using an .htaccess password protected file.

Others may have a more detailed solution but I don't think Javascript is suitable for this purpose.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

CSSdummy
Offline
newbie
Last seen: 17 years 51 weeks ago
Joined: 2005-06-08
Posts: 2
Points: 0

Creating page with password login and new window PDF file??

Sorry I didn't make it clearer, but I was indeed looking for help creating the same coding using CSS if it was possible. I'm sorry you didn't feel my post worthy enough to be on here.

K

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 years 12 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Creating page with password login and new window PDF file??

CSS has nothing to do with logins, other than a limited amount of styling that can be done to the input widgets.

Login authentification and authorization are server side functions, handled either by the web server itself or by a server side script and database. All that happens on the client is that a form is submitted.

CSS can prettify the widgets, but do nothing to get you logged in.

As to causing a link to a PDF document to open in a new window, that partly depends on the user's configuration. He may be set so that a PDF file opens in its own PDF viewer, or have the PDF viewer open in the browser window. In the first case, there's nothing for you to do; it's out of your hands. In the second, you can use an onclick event handler to open the link in a new window. If your visitor has the first case scenario, he may be p*ssed about opening another instance of his browser plus opening Acrobat, Ghostview, or Xpdf.

On the chance that you're willing to chance it, here is one way to do it;

 
<a href="some.pdf"  
   onclick="return !window.open(this.href);">My PDF</a>
What this little nugget does is open a new window with your file. If it succeeds, it says don't activate the link. If it fails or if javascript isn't there or is turned off, it activates the html link and the present window handles it. You'll have graceful failover.

cheers,

gary


cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 1 year 5 weeks ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Creating page with password login and new window PDF file??

Quote:
Guess the moderator doesn't feel my question on creating CSS coding is worth being on the board, so I will go elsewhere.

I don't think he understands that CSS has nothing to do with secure logins or opening new windows :roll:

Verschwindende wrote:
  • CSS doesn't make pies

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 9 years 44 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Creating page with password login and new window PDF file??

CSSdummy - let me put it another way: would you go to a forum dedicated to car engines and ask how to operate a car park ticket machine? Please don't be sarcastic (twice).

Life's a b*tch and then you die!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 20 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Creating page with password login and new window PDF file??

CSSDummy just in case you pop back and read this at no point did I say that your question was not worthy to be on this board, I pointed out that the question did not relate to the main area of discussion that this board deals with and that it was more suited to the 'Off Topic' area.
That was quite generous of me.

Please do not put words in my mouth that I did not utter.

At no point in your original question did you say that you wanted to try and use CSS for the purpose of secure login your question described attempts at creating a secure login using javascript.

Sadly your attitude has let you down here as you would have had and indeed did receive some help on the question and undoubtedly have received more had you not allowed your feelings to get the better of you.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me