Forum Moderators: open
How do I make the results appear in a new window?
I'm not good with HTML so hopefully I didn't cut out anything important when I tried to make the code anonymous and simpler. Please let me know if you need more details.
Any help much appreciated.
Thanks,
P
<div class="clear"></div>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<div class="mystyle" style="font-family: arial, verdana; margin:auto; font-weight: bold; font-size: 12px; border: 1px solid black; width: 125px; padding: 20px; padding-top: 50px; background:url(http://theirsite.com/images/ads/cd_bg.gif) top left no-repeat;">
<form action="http://www.othersite.com/interactive" onsubmit="return validateSearchForm(this)" name="sidesearch" method="get">
<div class="bold" style="padding-top:4px; ">Color:</div>
<select name="WidgetColor" id="WidgetColor" class="form" style="width:120px;">
<option value="" selected>Any color</option>
<option value="1">Blue</option>
<option value="2">Green</option>
</select>
<div class="bold" style="padding-top:4px; ">Origin:</div>
<div>
<select name="OriginID[]" id="OriginID[]" size="5" multiple class="form" style="width:130px;" onchange="showOriginDetailsMulti(this)">
<option value="" selected>Any origin</option>
<option value="1">Origin 1</option>
<option value="2">Origin 2</option>
</select>
</div>
<br>
<br>
<input name="Thing" type="image" value="Go" src="http://www.theirsite.com/images/searchbutton.gif" alt="Search" width="90" height="25" border="0">
<input type="hidden" name="aid" value="12345"/>
<input type="hidden" name="pid" value="67890"/>
<input type="hidden" name="url" value="http://res.theirsite.com/widgets/search.rvlx"/>
</form>
</div>
</body>
</html>
<img src="http://www.othersite.com/image-12345" width="1" height="1" border="0"/>
<div class="clear"></div>
<br />
Can you make the search widget itself available from a new dedicated page on your domain, rather than integrating the widget code directly into each of your existing pages?
That way, someone clicks on a link for the search widget and a new page opens on your domain that contains the inputs for the widget. Then when they submit the form the result will appear in the new window you just opened - but the user still has one window available from your domain.
Figured out a way, and figured I'd share in case anybody else is in this bind. Just need to insert target="_blank" within the open form tag!
So rather than...
<form action="http://www.othersite.com/interactive" onsubmit="return validateSearchForm(this)" name="sidesearch" method="get">
It's now...
<form target="_blank" action="http://www.othersite.com/interactive" onsubmit="return validateSearchForm(this)" name="sidesearch" method="get">
Works in both FF and IE.