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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:14:46+00:00 2026-05-27T19:14:46+00:00

I just get the parameters from PHP GET method and use them using jQuery.

  • 0

I just get the parameters from PHP GET method and use them using jQuery. There is no output when run the page.

<?php
    if (isset($_GET['url'])){
        $url = $_GET['url'];
        $url = explode(" " , $url);
        echo end($url);
        exit;
    }
?>
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.js"></script>
<script type="text/javascript">
    $('input[type=text]').change(function (){
        if ($(this).val() !== ''){
            var url = $(this).val():
            $.post('grab.php?url='+url+'', function (data){
                window.open(data, 'Download', 'width=10,height=10');
                $(this).html('');
            });
        }
    });
</script>
</head>
<body>
<input type="text" style="width:100%;height:20px;"/>
</body>
</html>

I’m new to designs and hope mistake is there.

  • 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-27T19:14:47+00:00Added an answer on May 27, 2026 at 7:14 pm

    First of all put your document in standards mode (by using a proper doctype at the beginning, which means HTML 4/XHTML 1 strict or HTML 5). Then you can use error console for debugging.

    I found following error

    Unexpected token: ':' on line 7,
    

    The colon should be a semicolon.

    var url = $(this).val():
    

    And then, the actual reason why nothing is happening is because the input is non-existent when the script is invoked/cached. You need to execute it after the DOM has been constructed.

    $(document).ready(function() {
       // content
    });
    

    Final code.

    $(document).ready(function() {
       $('input[type=text]').change(function (){
          if ($(this).val() !== ''){
             var url = $(this).val();
             $.post('grab.php?url='+url+'', function (data){
                window.open(data, 'Download', 'width=10,height=10');
                $(this).html('');
             });
          }
       });   
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quite often I will try and run a PHP script and just get a
Is there a one-line easy linq expression to just get everything from a simple
Im just learning SQLite and I can't get my parameters to compile into the
I just get started using BDD in Rails application, but I'm not sure what
I just get a script from a website to put it on my own
I'm using colorbox , i just get undefined as my get values? $('.banner').colorbox({ opacity:
This is a snippet from my index.php page, where I'm displaying a menu with
I need to be able to determine which page the user just came from
I just get the beach ball all day long (it's been doing nothing for
I've just get a new machine and try to checkout, build and launch my

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.