Phhheeww.. giving away trade secrets?
Try adding a new button, called "preview", with the following code;
Code:
<script>
function doopenwindow {
var urlpage = 'http://www.site.com/cgi-bin/page.cgi?page=preview';
var args = parseQueryString ();
var showit;
for (var arg in args) {
showit = showit + '&' + arg + '=' + args[arg] + ';'
}
open(urlpage + showit, '_blank', '')
}
function parseQueryString (str) {
str = str ? str : location.search;
var query = str.charAt(0) == '?' ? str.substring(1) : str;
var args = new Object();
if (query) {
var fields = query.split('&');
for (var f = 0; f < fields.length; f++) {
var field = fields[f].split('=');
args[unescape(field[0].replace(/\+/g, ' '))] =
unescape(field[1].replace(/\+/g, ' '));
}
}
return args;
}
</script>
<input type="button" name="Preview" value="Preview" onclick="doopenwindow()" />
That should open a new window, and then open page.cgi?page=preview, with all the variables passed through.
Hope that helps.
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my
Amazon Wish List GLinks ULTRA Package | GLinks ULTRA Package PRO Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin |
Pre-Made Template Sets |
FREE GLinks Plugins!