Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7764027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:48:31+00:00 2026-06-01T14:48:31+00:00

I am writing an HTML program that will be accessed by over 500 people

  • 0

I am writing an HTML program that will be accessed by over 500 people , in the html page i need to link it to pdf files from a side server – however I cant upload the webpage to the server,

The computers are split between macs and PC’s , how can I use Jquery to detect what Operating system the computer is and from that decide which href link to use (as to get the file from the pc is using the server name KPA0DSOT10 – however from the mac I need to use “Volumes” , or is there a way in JQUERY to put one link forward and if it cant open it it will try another link ? – there are over 20,000 links on the one html page so if theres a quick and easy way to update them all without having to write out all the links again would be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:48:33+00:00Added an answer on June 1, 2026 at 2:48 pm

    Check the navigator.appVersion variable then modify all the links to a .pdf on the page accordingly. Do this from the .ready() function.

    $(document).ready(function() {
        if (navigator.appVersion.indexOf("Win") != -1) {
            // Computers runs windows
            $("a[href*='.pdf']").each(function() {
                this.href = this.href.replace("word_to_replace", "win_replacement");
            });
        }
        if (navigator.appVersion.indexOf("Mac") != -1) {
            // computer is a Mac
            $("a[href*='.pdf']").each(function() {
                this.href = this.href.replace("word_to_replace", "mac_replacement");
            });
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a program that will draw the sine curve with canvas. HTML: <canvas
When writing interpreters for PDF, HTML and other documents we need to deal with
I'm about to start writing a program which will attempt to extract data from
I am writing a Java program that creates HTML code. What's the best/easiest possibility
I'm writing a program to add some code to html files I was going
I am writing a program that will help me find out sites are my
I am writing a program that an HTML scraper that when it grabs the
I am writing an HTML/JavaScript program that gives me a JSON object as a
I'm writing a program (in Java) that needs to extract links from webpages. I'm
I am writing a program that gets a HTML file in Android and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.