Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

html code


  • Please log in to reply

#1
ruthye

ruthye

    Member

  • Member
  • PipPip
  • 48 posts
Hi :blink:
Im looking for a html code to close a window. I have try 4 (bellow) and they work in my front page preview in browser. they do open a window and I hit the buttom close and its ask you are trying to close this windows yes or no. great, but as soon as I upload to my site in geocities all the links open in the same page not in a new window, and the close buttom don't do anything only do is when you click to close it goes down and up like a play of clicking a box. this is happens from 5 days back , all the links I have in my site opened in a new window. now you click in a link and the page open in the same you have open. none of the close buttons work. is that could be that Im using a wrong code to open in a new window (this code)

<A HREF="java script:void(0)"
ONCLICK="window.open('http://www.geocities...=800,height=600')">
<img border="0" src="http://www.geocities...tionssmall.jpg" width="125" height="52"></a></div>

if is possible you can check in my site what I mean click in the first button guidelines and you will have a better idea.
http://www.geocities..._psp/index.html
thanks for reading my message. :whistling:
__________________________________________
this are the codes that I have try and they work in preview in browser but in the site don't work:

<CENTER>
<FORM>
<INPUT TYPE='BUTTON'VALUE='Close Window'onClick='window.close()'>
</FORM>
</CENTER>
________________
<CENTER>
<FORM>
<input type="button" VALUE="close here!" on Click="goNewWin()">
</form>
</center>
________________
<FORM METHOD="LINK" ACTION="close">
<INPUT TYPE="submit" VALUE="Clickable Button">
</FORM></CENTER><P>
____________________
<script LANGUAGE="javascript">
<!--
window.close ('page.html')
-->
</SCRIPT>
____________________
  • 0

Advertisements


#2
fructose

fructose

    Retired Staff

  • Retired Staff
  • 284 posts
You aren't telling the browser to use javascript for the button.

A search in Google for "close a window using javascript" turned up this example:

<form>
<input type=button value="Close Window" onClick="java script:window.close();">
</form>

Edited by fructose, 11 July 2006 - 08:54 AM.

  • 0

#3
ruthye

ruthye

    Member

  • Topic Starter
  • Member
  • PipPip
  • 48 posts
Hi
I'LL try that one, hope its work. so all I should do before were tell javascript to close. hummmm
thanks a lot :whistling:
Ruthye
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP