Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Search and popup  RSS feed

 
Thierry Duguet
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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.
 
Sanyev Babu
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • 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.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • 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
  • 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...
[ June 21, 2004: Message edited by: Dirk Schreckmann ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!