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

  • Home
  • SEARCH
  • 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 7584643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:58:21+00:00 2026-05-30T18:58:21+00:00

<a href=# onclick=return purchaseEntry(‘39873’);>ABC</a> I’m planning to crawl to a web page and fetch

  • 0
<a href="#" onclick="return purchaseEntry('39873');">ABC</a>

I’m planning to crawl to a web page and fetch certain contents using regex. However, this content only shows up after onclick is activated. I need to get into ABC and fetch the content. I can’t use file_get_content() because there is no link takes me to ABC page. ABC content shows up when user clicks it. Results are called via Javascript/Ajax/Json.

ABC contents are:

Name: XXXX
Address: XXXXXX

Any idea how to crawl to ABC and fetch the content?

Note: I will have to write a PHP script that crawls into remote page and fetch ABC content.

Extra info:

function purchaseEntry(customerid) {
    $('customeridfield').value = customerid;
    if (approvedAgents()) {
        e1 = $('entrylisttable');
        e1.hide();
        getExistingDetails(customerid, 'confirmstatusexistingdetails');
        $('confirmstatushajjlicenceno').value = '';
        $('confirmstatusapproved').checked = false;
        e1 = $('confirmstatus');
        e1.show();
    }

    return false;
}

Also here is getExistingDetails:

function getExistingDetails(customerid, existingdetails) {
    e1 = $(existingdetails);
    e1.innerHTML = 'Loading ... <img src="/jpg/ajaxloader.gif" />';

    var url = '/samex/index.php';
    var pars = 'option=com_directory&view=entry2&customerid=' + customerid + '&format=raw';
    new Ajax.Request(url, { method: 'get', parameters: pars,
        onSuccess: function(request) {
            var json = request.responseText.evalJSON();
            jsondata = json['data'];
            e1 = $(existingdetails);
            e1.innerHTML = jsondata['clientdata'];
        },
        onFailure: function(request) {
            e1 = $(existingdetails);
            e1.innerHTML = 'Unable to get information for customer ' + customerid;
        }
        });
}

Any suggestions?

  • 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-30T18:58:22+00:00Added an answer on May 30, 2026 at 6:58 pm

    You can’t run JavaScript events from PHP. PHP is a server-side language, whereas HTML and JavaScript are client side languages.

    The only way you can get data from the client side HTML and JavaScript is to use one of the following methods:

    Use an HTML form with an action to submit data back to the server.

     <form action="/submit.php">
         <input name="purchaseEntry" value="39873" />
         <input type="submit" value="Submit" />
     </form>
    

    Use an AJAX call to send data to the server without having to reload the page.

     // jQuery ajax
     $.ajax({"url" : "/submit.php", 
            "type" : "post",
            "data" : "purchaseEntry=" + document.getElementById("purchase-entry")
            "success" : function() {
                alert("data sent to server");
            }
     );
    

    Pull data from the $_REQUEST object when the user navigates to a different page. This assumes your data is in the link.

     <p><a href="/page2.php?purchaseEntry=39873">Page 2</a></p>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code in my page: <a href onClick=return false;>Press me!</a> The link
window.location.href does not work to save the current web page url as a bookmark.
I found that onclick function must return false for proceeding with href value and
I have this line of code: <a href=# id=profilelink name=profilelink value=<?php echo $id./.$block_record;?> onClick=return
I am developing a Ajax based web application.I want to add HREF and OnClick,
I have a WebBrowser control and try to set onclick and href attributes on
What does Return false; in onclick event for JavaScript mean? <input type=button runat=server id=btnCancel
I just want to enable / disable onclick and href on elements (a or
Quick Question. Should we put Javascript in the HREF or use onClick (event)? Are
I have this line of code: <a href=# id=profilelink name=link2 onClick=viewornot(<?php echo $freechat_id ?>)><?php

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.