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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:54:40+00:00 2026-06-11T07:54:40+00:00

I have 2 constantly updating spans with coordinates in them. These spans are updated

  • 0

I have 2 constantly updating spans with coordinates in them. These spans are updated from a separate js file that someone else wrote that is VERY sensitive to changes.

I can see the spans just fine and they are updating the coordinates just fine, however I need to pass them as variables though in a link. For example, I have a link on page some.php?var1=[value of constantly updating div1]&var2=[value of constantly updating div2] that I need the user to be able to click.

I need this link to, when clicked, either gets the value of the spans and submits it to a page handler (some.php in this case) or is just constantly updated from the spans. I’ve tried to get the innerHTML value of the spans, it doesn’t seem to be working though to constantly update them….

  • 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-11T07:54:41+00:00Added an answer on June 11, 2026 at 7:54 am

    Let’s say your <span> elements have IDs:

    <span id="var1">(constantly updating)</span>
    <span id="var2">(constantly updating)</span>
    

    Then just construct a placeholder link:

    <a href="#" id="link">click me!</a>
    

    And the following jQuery should do the trick:

    $(document).ready(function() {
        $('#link').click(function() {
            window.location = 'some.php?var1=' + 
                $('#var1').text() + '&var2=' + $('#var2').text();
        });
    });
    

    You also might want to consider using encodeURIComponent() on the values of your <span> elements to make sure they get passed correctly, unless you’re always sure that the format of the value is URI-safe.

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

Sidebar

Related Questions

I have an application that needs updating constantly. I would like to create a
I have a background worker thread that is constantly syncing data to/from a remote
I have a vector that is constantly being updated (about 5-20 times a second)
I have an NSImageView that needs to redraw a constantly updating image. I have
I have an iframe that contains a page that is constantly updating (basically a
these tables will be constantly inserted new rows or updating. i have a big
so basicly I have a table that consist about 700million rows, and constantly updating
I have a WinForms utility that I use constantly, and enhance regularly. Roughly one
I am constantly updating my local git hooks. I have a repo to house
I am trying to place a constantly updating Donation Ticker on my website that

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.