I have two pages 'index.php' and 'fonts.html'
here is the javascript code that I have used in index.php:
<script language=javascript>
var cp = new ColorPicker();
var fp = new FontPicker('window');
function pickFont(font) {
document.getElementById('fimg').src='http://example.com/im/font/' + font + '.png';
document.getElementById('fid').value=font;
}
if (document.getElementById('fid').value) {
pickfont(document.getElementById('fid').value);
}
</script>
The values should be submitted from "fonts.html" which has the code.
<html>
<body>
<p>
<form method=get action="/fonts.html" style="display:inline">
<input type=submit name=cat value="Favorites">
</form>
<div id="Favorites">
<A HREF="#" onClick="window.opener.pickFont('Times-Roman'); return false;"
STYLE="text-decoration:none;">
<img alt="Times-Roman " style="border: outset 1pt" border=1 vspace=1
hspace=1 src="http://www.example.com/im/font/Times-Roman.png">
</a>
<A HREF="#" onClick="window.opener.pickFont('ariel'); return false;"
STYLE="text-decoration:none;">
<img alt="ariel " style="border: outset 1pt" border=1 vspace=1
hspace=1 src="http://www.example.com/im/font/font/ariel.png">
</a>
</div>
</p>
</body>
The above code works fine with the "onClick function".. but I need to use onClick function in such a way after submitting the value, 'fonts.html' should close by itself or else 'it should redirect the page from 'fonts.html' to the page where it has submitted the value.Is there a way to fix it???
your response is appreciated..