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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:07:58+00:00 2026-05-23T20:07:58+00:00

I’m trying to create a PhoneGap application that in part, makes available a custom

  • 0

I’m trying to create a PhoneGap application that in part, makes available a custom search engine. I’ve followed the instructions at Google and created the following HTML file that works fine in a desktop browser when accessed as file:///text.html. When I use it as the phone gap start page it renders fine. There is a text box and the “search” button. However when I press “Search” I get an “Application Error” on the Android device, saying “file:///google.com/cse?q=…. can not be found.”

The CustomSearchControl injects some code into the page — basically a form. I though I might be able to manipulate the DOM at the ‘cse’ element to fix the URL scheme but I don’t see the google.com URL with Firebug.

Looking for a way to make the problem go away or work around it. Here is the html code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google AJAX Search API Sample</title>
    <script src="https://www.google.com/jsapi?INSERT-YOUR-KEY"></script>
    <script type="text/javascript">
        google.load('search', '1');
        google.setOnLoadCallback(function(){
          var search = new google.search.CustomSearchControl('007447616601297022092:7nhsxzpy6ao').draw('cse');
        }, true);
    </script>
  </head>
  <body style="font-family: Arial;border: 0 none;">
    <div id="cse" style="width:100%;">Loading...</div>
  </body>
</html>
  • 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-23T20:07:58+00:00Added an answer on May 23, 2026 at 8:07 pm

    I was able to find a workaround for this after much trying of stuff…

    Though I’m not sure, I believe the root of the problem is that the Google script is seeing that it is being run from the local file system of the device and it mistakenly tries to submit the form into file:///.

    I’m using Sencha Touch on top of PhoneGap. I thought I might be able to use some of the dom and component access functions to manipulate the submit event. However Google’s JS is nearly impenetrable after it’s shortened. Even after deminification you have code like aob. omg.

    So I just punted and used an iframe within the Sencha app to pull down the script shown in the question above to the device. Some code from Conor Armstrong was very helpful for making it all work nicely in Sencha Touch.

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

Sidebar

Related Questions

No related questions found

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.