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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:01:06+00:00 2026-06-12T14:01:06+00:00

Okay, so in my <head> section i have the following: <script> var userDefaultInfo =

  • 0

Okay, so in my <head> section i have the following:

<script>
    var userDefaultInfo = '<?=$userInfo;?>';
    var jGets = new Array ();
    <?
    if(isset($_GET)) {
        foreach($_GET as $key => $val)
            echo "jGets[\"$key\"]=\"$val\";\n";
    }
    ?>
</script>

Now In my external .JS file, In the $(document).ready() section I can access userDefaultInfo fine, however, I am trying to access jGets, but not directly from there.

in the external .JS file, outside of $(document).ready(); I have the following function:

var sendGET = function () {
    var data = $(this).val();
    var elementName = $(this).attr("name");
    var url = "zephi.php?p=home/support/admin_support.php&"+elementName+"="+data;
    jQuery.each(jGets, function(i, val) {
           alert(val);
        });
    alert(url);
    window.location = url;
}

When a user changes a box, this function fires and changes the window location using the data. However, I want to add the data in the variable jGets, but I do not seem to be able to reference it at all in there.

Why is this?

  • 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-12T14:01:07+00:00Added an answer on June 12, 2026 at 2:01 pm

    You’re “mis”-using an Array as an Object.

    var jGets = {};
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I have the following create action #posts_controller, nested resource under discussions def create
Okay, I've been banging my head against the wall with this one. I have
Okay. I have been bashing my head against the wall for like 2 hours
Okay guys, I have been scratching my head like mad over this issue and
Okay, so I am trying to wrap my head around how to get stuff
Okay, I just can't get my head around multi-threading scenarios properly. Sorry for asking
Okay, I know it is weird but when I put this code between <head
I'm having trouble getting my head around algorithm analysis. I seem to be okay
Okay, next PHPExcel question. I have an HTML form that users fill out and
Okay this question is very simple: I have a facebook page, and a website.

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.