• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 89
  • Last Modified:

Pass input text from web page to google costume search function

Hello,

i need some help with some google API costume searching and html. i am trying to achieve the following Pass input text from web page to google costume search function.

Web page input text
	
                 <input type="text" name="Search" placeholder="Enter your keywords"/>
		

Open in new window



google search code

<script>
  (function() {
    var cx = '002768865969631046146:50gvw_uzv0q';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//cse.google.com/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>

Open in new window

0
Chris Jones
Asked:
Chris Jones
  • 3
1 Solution
 
Eddie ShipmanAll-around developerCommented:
Which variable gets the search value?
0
 
Eddie ShipmanAll-around developerCommented:
Hey, I'm located over in Austin. My nephew goes to A&M. Here's a fiddle demonstrating how to do it:

http://jsfiddle.net/Mrbaseball34/7mcu0p9u/
0
 
Chris JonesLead Application Web DeveloperAuthor Commented:
cool beans this works great
0
 
Eddie ShipmanAll-around developerCommented:
So, do you think you could accept my answer?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now