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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:03:46+00:00 2026-06-10T08:03:46+00:00

My situation is this: I was able to write text from a form in

  • 0

My situation is this: I was able to write text from a form in a different html page. But what I wanted to do is create a link using only the text in that form.
Originally I used javascript, especially widget.preferences (a sort of method to save the changes made in the form) and the “var” tag:

<script>

addEventListener
(
'DOMContentLoaded',
function()
{

// get the var elements with an id and set their textContent to the corresponding  widget.preferences
    var vars = document.querySelectorAll( 'var[id]' );
    for( var i=0,element=null; element=vars[i++]; )
    {
        element.textContent = widget.preferences[ element.id ];
    }


},
false
);

</script>
</head>
<body>

<h1>Popup window</h1>
<p>Here is a list of preferences and their associated value:</p>
<ul>
    <li><var id="foo"></var>
    <li><var id="bar"></var>
    <li><var id="baz"></var>
    <li><var id="check"></var>
    <li><var id="group1"></var>
    <li><var id="myMultipleSelect"></var>
</ul>

</body>

But, as I said at the beginning, my goal is to make links using the text from the form on the other page. The form is as follows:

<fieldset>
  <p>
    <input id="text1" name="foo" type="text"></input>
    <label for="text1">foo</label>
  </p>
  <p>
    <input id="text2" name="bar" type="text"></input>
    <label for="text2">bar</label>
  </p>
  <p>
    <input id="text3" name="baz" type="text"></input>
    <label for="text3">baz</label>
  </p>
</fieldset>
  • 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-10T08:03:48+00:00Added an answer on June 10, 2026 at 8:03 am

    I was not sure exactly what your question is, but for retrieving info from other pages with javascript, the answer is ajax.

    There is an important caveat to this answer: To do this, your page and the page of the form you are trying to get data from need to be on the same domain. Modern browsers have security measures in place against XSS (cross site scripting), so you will not be able to get that information otherwise.

    To get the contents of the form, make an ajax request for the page with that form on it, and then parse it’s html content as XML. You can then navigate through its DOM or use a framework like jQuery to extract the info you need for your links.

    If you are new to ajax, try the w3c schools tutorial at http://www.w3schools.com/ajax/default.asp

    If the webpage you are trying to access is on another domain, you may be out of luck. There are several proposed solutions for making friendly cross-site requests, such as microsofts XDR object, but there is no standard, so it will be quite a bit of work (if it is possible at all) to get that to work across the board.

    Additionally, the restrictions against XSS are made in the browser where the js is currently running, so if you have access to a server-side language you can “shuttle” requests from a handler of some kind into your page.

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

Sidebar

Related Questions

I haven't been able to find anything for a situation like this. I have
I have this situation: $(#button).toggle(function(){ $(#window).animate({top:'0%'},1000); },function(){ $(#window).animate({top:'-100%'},1000); }); but I need change it
The Situation (Ignore this it is boring): I have reports that I created using
I need to be able to create a WAV file using the mic in
To simplify escaping strings using mysql_real_escape_string I was hoping to be able to write
My situation is this: I want to have a pop-up box open from your
In this situation I have two models, Comment and Score. The relationship is defined
I have this situation: http://jsfiddle.net/bRDgK/3/ In this situation I have a modal dialog with
The situation is this: I have a div with overflow auto containing a table.
I have this situation: { float foo[10]; for (int i = 0; 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.