• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Search and popup

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I want to perform a search and have my result display in a popup window.
Here is my search form:

Here is my popup code:
[CODE]

<script language="JavaScript">
function popup_window() {
window.open('http://e-gun.com/search1.php', 'popup', 'width=450, height=500, menubar=no, scrollbars=yes, toolbar=no, location=no, resizable=no, top=, left=');
}
</script>

/CODE]

How can I make it work together? Any help or suggestion would be appreciate
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm. I'm not sure I understand exactly what you are asking. Perhaps you could rephrase your question and post it in the JavaScript forum? You'll probably get better help with JavaScript there.
 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this code.

<html>
<body>
<form name = "form1" method="get" action="http://e-gun.com/search1.php"> <p align="center">Search E-Gun Directory:<br>
<input type="text" name="keyword" size="20">
<br><input type="button" value="SUBMIT" o n C l i c k =popup_window(document.form1.keyword.value)></form>
<script language="JavaScript">
function popup_window(sanyev) {
url = "http://e-gun.com/search1.php?keyword="+sanyev
window.open(url, 'popup', 'width=450, height=500, menubar=no, scrollbars=yes,toolbar=no,location=no, resizable=no, top=, left=');
}
</script>
</body>
</html>


I am not a java script writer but i think this will serve your needs.
Sanyev

Remove the spaces between the onClick command for the script to work. The system is not allowing me to post the reply with onClick saying that it is not allowed.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aladdin,

Welcome to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

Thanks Pardner! Hope to see you 'round the Ranch!
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JavaScript is not Java.

Repeat ten times.

JavaScript is not Java.
JavaScript is not Java.
JavaScript is not Java.
JavaScript is not Java.
JavaScript is not Java.
JavaScript is not Java.
JavaScript is not Java.
JavaScript is not Java.
JavaScript is not Java.
JavaScript is not Java.

Moving this to the HTML and JavaScript forum...
 
Thierry Duguet
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Sanyev Babu, it works!!
 
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic