2 Replies - 646 Views - Last Post: 09 April 2012 - 05:42 PM

#1 S3lkies  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 247
  • Joined: 09-January 09

How to open 2 pages in one link

Posted 09 April 2012 - 04:56 PM

Hey guys , sorry about the question - not completely sure how to word it and im not even sure if this can be solved or solved in HTML

Im making an internal web page for a business (the files will be on a server)

however there are mac's and windows computer , the server is running windows - however the company will only put this in a drop box so everyone can have access to it as not everyone has permission to access the servers.

However my question is , Im trying to link to pdf's on the server , which works fine when it runs from a PC as the server address is
file://///KP01D923TS/Quotes/INV/28142631.pdf


however Im not sure how to set it up for the mac's as I know they cant connect to the server from that , they need to have it as
file://///Volumes/Quotes/INV/28142631.pdf
(Volumes being the difference between the server name on mac and windows.

There will be around 20,000 links on this webpage , so if theres an easy quick fix :P

Is there any way that I can possibly set it up so that it tries to open the web page as the first link and if it cant open it will try the other link , so that I can get it running for both window users and mac users without having to make 2 webpages 1 for windows and 1 for mac?

Cheers for the help in advance!

This post has been edited by S3lkies: 09 April 2012 - 08:27 PM


Is This A Good Question/Topic? 0
  • +

Replies To: How to open 2 pages in one link

#2 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1252
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: How to open 2 pages in one link

Posted 09 April 2012 - 05:39 PM

Quick and dirty: Use jQuery to detect what operating system the client is using.

Then using a jQuery selector change recreate the href="" property of a given link, replacing KB812381283 with Volume and vice-versa; as needed.


A better more robust solution would be to detect the operating system on the backend and set that URL property accordingly. What language/framework is this application running in?

If you're using Apache, I think you can use some mod_rewrite rules to react to a download link and return the appropriate file. But I'm not familiar with Apache someone else would have to help there.

This post has been edited by Sergio Tapia: 09 April 2012 - 05:41 PM

Was This Post Helpful? 1
  • +
  • -

#3 S3lkies  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 247
  • Joined: 09-January 09

Re: How to open 2 pages in one link

Posted 09 April 2012 - 05:42 PM

Thanks!

Ill give that a go , if it does the job it doesnt need to be 110% perfect its only a quick and easy thing to make life easier for the employee's here.

Ive only written it in HTML at the moment , think I could do better?

This post has been edited by S3lkies: 09 April 2012 - 05:42 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1