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 6475181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:40:27+00:00 2026-05-25T06:40:27+00:00

The following code loads a txt file content in a new tab. But it

  • 0

The following code loads a txt file content in a new tab. But it doesn’t preserve newlines even though the content is inside a <pre> tag:

multiline.html:

<!DOCTYPE html>
<html>
<head>
<script src="js/jquery-1.4.1.min.js"></script>
<script src="js/jquery-ui-1.8.15.custom.min.js"></script>
<link rel="stylesheet" href="js/ui-lightness/jquery-ui-1.8.15.custom.css" type="text/css"></link>
<style>
pre {
  border: 1px red solid !important;
}
</style>
<script>
$(document).ready(function() {
  $("#tabs").tabs({panelTemplate: '<pre></pre>'});
});
</script>
</head>
<body>
  <h3>PRE TAG:</h3>
  <pre>
  Multi
  line
  FTW
  </pre>
  <h3>jQueryUI-loaded PRE TAG:</h3>
  <div id="tabs">
    <ul>
      <li><a href="multiline.txt">Tab</a></li>
    </ul>
  </div>
</body>
</html>

multiline.txt:

I'm line #1
And I'm line #2
Guess what! I'm #3

And woohoo I'm #4 but I wanted to be alone!

As an alternative, I tried to create a jsfiddle, with no success since the browser will yell at me with cross-origin loading error.

  • 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-05-25T06:40:28+00:00Added an answer on May 25, 2026 at 6:40 am

    As per jQueryUI ticket #7669, it can’t be done with the tabs widget.

    Remote tabs expect to load HTML, not plaintext.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code which loads and html file into a webview -
I'm trying to use the following code # LOAD XML FILE $XML = new
So I have the following code to check for the text file called Doctors.txt
I have the following code that loads a user's Active Directory DirectoryEntry object from
I am having issues with the following code which loads an SQLite database. -
I've found the following code: https://github.com/roddi/ValidateStoreReceipt/blob/master/validatereceipt.m which loads the root certificate ('Apple Root CA')
We're on Rails 3.0.6. Will the following code persist across page loads and users
I am using following code to load an image from internal memory to tab
I'm using the following code to read a local text file from a local
So I have the following code where I should read a Text File (This

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.