PDA

View Full Version : i want to add link to close the small window and change my page



mostafa megahed
05-30-2009, 03:22 PM
i'm using a link in my page:


<script>function gallery2() {props=window.open('gallery/Water-Color-Gallery.html', 'poppage', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width=850, height=650, left = 70, top = 30');}</script>
<li><a href="javascript:gallery2();">Water Color Gallery</a></li>

it's open a new window with specific sizes.

i want to add a link in this window (that with specific sizes) to do that:
1- close the window.
with...
2- change my page to another page like (go google.com or anything i want)

Nile
05-31-2009, 05:04 AM
You're gonna have to edit gallery/Water-Color-Gallery.html to get those affects, i don't know of a way to do it in the parent window, sorry. To change the location of a page, you can do this:


<script type="text/javascript">
function locateTo(location){
window.location = location;
}
</script>
<a href="javascript:void(0);" onclick="locateTo('http://www.google.com');">Google</a>


Which would be pointless because you can use links for that.