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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:42:12+00:00 2026-06-17T07:42:12+00:00

I created this script: <script>function txtload () {$(.divbody).load(maintxt/information1.txt);}</script> I am using links like this:

  • 0

I created this script:

  <script>function txtload () {$(".divbody").load("maintxt/information1.txt");}</script>

I am using links like this:

<a href="#" onclick="ChangeImage(), txtload ()">Information 1</a>

I need to change the script to create multiple href’s loading different text for each link:

<a href="#" onclick="ChangeImage(), txtload ()">Information 1</a>
<a href="#" onclick="ChangeImage(), txtload ()">Information 2</a>
<a href="#" onclick="ChangeImage(), txtload ()">Information 3</a>
<a href="#" onclick="ChangeImage(), txtload ()">Information 4</a>

Can you help? I tried removing the “” from the script and placing it in the href itself…don’t have any idea what I’m doing…

Think this should work. Please give me your input:

<script>function txtload () {$(".divbody").load("maintxt/" + filename);}</script>

<a href="#" onclick="ChangeImage(), txtload ("information1.txt")">Information 1</a>

Thanks!

  • 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-17T07:42:14+00:00Added an answer on June 17, 2026 at 7:42 am

    You could use a parameter

    <script>
        function txtload ( url ) {
            $(".divbody").load( url );
        }
    </script>
    

    And then in your html:

    <a href="#" onclick="txtload('url to your text file')">Information 1</a>
    

    Or if you really want it in your href use:

    <a href="your url" onclick="txtload(this.href); return false;">Information 1</a>
    

    In your code is also a function ChangeImage which you haven’t explained anywhere. I just ignored it in my example.

    Another way which is actually a little nicer is this script:

    $("a.some_class_for_these_links").on("click", function (e) {
        e.preventDefault();
        $(".divbody").load( this.href );
    });
    

    And then this html

    <a href="your url" class="some_class_for_these_links">Information 1</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using JQueryUI Dialog and created this function below: <script> $(document).ready(function() { $('#dialog').dialog({
languages used: html, javascript/jquery, and php 5.2 So I created this function that onclick
I bought this program that created a pretty nice imageuploader flash script however I
I have a script task that executes a dynamically created SQL restore statement. This
I have a script which creates a user-defined object like this: obj = new
I have created this script with the help of the Haversine formula, the problem
This should be simple but I'm stuck on this script... It has a function
I have this script below and somehow cannot call function from this anonymous one.
I created this script to be able to send an email after a grid
I currently have this script : function addConsultant() { var sheet_staffing = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(Staffing); var

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.