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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:36:57+00:00 2026-05-28T06:36:57+00:00

i am developing a web tracker for my site, and one of the ways

  • 0

i am developing a web tracker for my site, and one of the ways i am transferring data, is by auto-filling form data on page load, with javascript queries being used to fill each field…..

i just need strings of text to be transferred from the form to another php script…..

this side of it is easy…..

the form ( and data collected on page load ) is hidden in an invisible iframe, so that it can do its work in the background….

i need the url of the main page (not the iframe) to be auto inserted into one of the form fields…..

heres what i have so far,,,,

this is the code that is displayed on parent page (in this example “events”):

    <iframe src="/track/track.html?events" height="500" width="500" scrolling="no" border="0"></iframe>

i know i said invisible iframe, the 500×500 size is so i can see behind the scenes while developing….

then in the iframe the code i have is :

    <?php 
    $ip = $_SERVER['REMOTE_ADDR']; 

    $my_t = getdate(date("U"));

    $url = $_SERVER['REQUEST_URI'];

    ?>


    <html>

    <body> 

    <form action="/track/location.php" method="post">

    <input type="text" name="time" value="<?php echo "$my_t[weekday], $my_t[month] $my_t[mday], $my_t[year] - $my_t[hours]:$my_t[minutes]:$my_t[seconds]" ?>">

    <input type="text" name="ip" value="<?php echo $ip ?>">



    // script A //

    <script type="text/javascript">

    document.write(window.location.search);

    </script>

    // end script A //


    // script B //

    <script>

    var url = ['alert(window.location.search)'];
    document.write("<input type=\"text\" name=\"url\" value=\"" + url + "\">");

    </script>

    // end script B //



    <input type="submit" name="submit" value="submit">

    </form>

script A will produce a statement of text “?events” where inserted as “document.write”

script B will produce a text box with the text “alert(window.location.search)” pre inserted as a value…. which is kind of what i want…..

i basically need to be able to combine script a and b so that it will write the (window.location.search) data (“?events”) in the text box instead of the plain text java command….

i will be very greatful if anyone can help me, thanks in advance guys 🙂

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

    Is this what you want?

    var url = ['alert(' + window.location.search + ')'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing web app that user can save his/her work to server. The data
I am developing web app using asp.net. I have plenty of javascript files which
I'm developing web site using asp.net. In my web site after login i set
I am developing web pages which reference external links/images/stylesheets etc. I have 1 page
I have been developing Web Applications using WAMP stack. I use javascript jQuery extensively
I'm developing web site on java. Site contains some texts and sponsored links. I
I am developing web site using jQuery and other tech. I have problem in
I am developing web app using ASP.NET and i am also using javascript in
When developing web parts in SharePoint can I inherit from the existing web parts
I've been developing web apps for over a decade now, all the way from

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.