473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Close the webpage on clicking decline option

3
i want to have a normal hyperlink, its for the terms of service, a i accept, and i decline.

the i decline like i want it to have the onClick="closeIt()" in order for when someone clicks the i decline, its obvoiusly closes the webpage.

I've tried to add it into normal code and i managed to get it to work, but it showed as a text area at first, i want it to show just as "I DECLINE"


i dont want to have the code on the page, if possiable i would like to have it something like...
Expand|Select|Wrap|Line Numbers
  1. <script type="text javascript" src="js/custom/1.js"></script>
but with the hyperlink properties within it.

Any help?

thanks...

EDIT: also sorry, if i have posted it in the wrong area.. i got confused on where to post this..
Aug 17 '07 #1
6 1610
epots9
1,351 Expert 1GB
please post your code.

thank you
Aug 17 '07 #2
pbmods
5,821 Expert 4TB
Heya, Dynash. Welcome to TSDN!

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

I'm going to go ahead and move this thread to the JavaScript forum, where our resident Experts will be better able to help you out.
Aug 17 '07 #3
Dynash
3
okay thanks :)

Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript">
  2. <!--
  3.  
  4. function closeIt() {
  5.   close();
  6. }
  7.  
  8. // -->
  9. </script>
Aug 18 '07 #4
acoder
16,027 Expert Mod 8TB
I've changed the thread title to describe the problem a little bit better.

Post your HTML code too. How do you call this function?

In your original post, you've missed out a forward slash between "text" and "javascript".
Aug 18 '07 #5
Dynash
3
its okay, thanks anyway, i got it
[HTML]
<a href="javascript:window.close()">I Decline</a>[/HTML]
Aug 19 '07 #6
pbmods
5,821 Expert 4TB
Heya, Dynash.

Thanks for posting your solution. Please remember to use CODE tags.

Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime :)
Aug 20 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Glodenox | last post by:
I'd love to get rid of the following nasty problem: Once you've 'entered' an applet by clicking on the applet, you can no longer scroll the webpage untill you 'exit' the applet again by clicking...
22
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the...
10
by: coosa | last post by:
How do i close a current connection to a database using t-sql? I fail some time to drop the database getting messages that it's currently in use. Using the wizard to delete the database, i could...
5
by: freelancex | last post by:
Hi, Im new to this forum, and new to scripting in general. Im an ICT Technician for a high school and i am designing a Form in visual basic 2005. The intended purpose of the Form, is to prevent...
7
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed...
1
by: john_c | last post by:
What is the most efficient way to get the size of an external webpage? Also, will this include images, JS files, etc?
5
by: jimmy | last post by:
Hi all, I want to capture the event when the browser's close button is clicked in an html page. I tried using the event.ClientX and event.ClientY property in the body unload event, and this...
0
by: Davilean | last post by:
Hi, I have got a combobox which directs to another page on select and when the submit button is clicked. I am trying to change it into a dynamic combobox which redirects you to another page on...
5
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.