HTML Help

Go Back   HTML Help Central > Site Building Central > Javascript / DHTML

Javascript / DHTML This is the place to ask questions about JavaScript and DHTML.

Register Now for FREE!
Join HTML Help Central. To sign up for your FREE account INSTANTLY fill out the form below!

Username: Password: Confirm Password: E-Mail: Confirm E-Mail:
 
Image Verification
Please enter the six letters or digits that appear in the image opposite.

  I agree to forum rules 

» Online Users: 44
2 members and 42 guests
hijk383 , lolfunnyz
» HHC Sponsors
Closed Thread
 
Thread Tools Display Modes
  #1  
Old 12-13-2000, 05:26 PM
NetNomad
Guest
 
Posts: n/a
Angry Confirmation option problem

I can't get the confirm thing to work. When I click OK, the page gets displayed, like I wanted it to. If I click Cancel, the same thing happens. I want people, upon clicking the link to the subpage I put the code on, to see the message and be able to back out if they click cancel. There must be another part to the code that makes OK different from Cancel. What is it??
  #2  
Old 01-11-2001, 06:55 PM
Smileygirl4
Guest
 
Posts: n/a
Smile

Hey Dude. I have problems of my own, but this is one, I can handle. Aight kool. Go to the site below, and scroll down, to where you see Java Scirpts. Click the link. (It is on the left side of the screen, in blue letters) Once you are there, scroll down to "Java Scripts with Cancel Option". If the user chooses cancel, they do not enter your site. If they choose ok, they do. Is that what you want? Well if it is, go to the below site:
http://www.funky-chickens.com/java2.shtml

Hope that workz for ya. MwaZ
  #3  
Old 01-12-2001, 04:57 PM
NetNomad
Guest
 
Posts: n/a
Red face

Didn't work. I've been to Funky Chickens and that's where I originally got the code. The window pops up as soon as the page does, but both buttons allow the page to be displayed. I want Cancel to return to my home page.

See, I have an Anti-Pokemon site. Most of my site is fine for everyone, but a portion of it isn't intended for the fans. Nothing objectionable or anything, but some of them have short tempers.

Since HTML is off, I think, this is my code:

<SCRIPT language="JavaScript">confirm("This portion of my Anti-Pokemon site is mainly for Pokemon Haters. If you are a Pokemon Fan, I suggest you leave. Continue?")</SCRIPT>

This code is at the start of the body text of the sub-page. Both buttons will continue displaying the page.
  #4  
Old 01-12-2001, 08:47 PM
Smileygirl4
Guest
 
Posts: n/a
Cool

I know why the code didn't work. If you read CAREFULLY at the top of funky chickens, it says "Do not include commas or semi colons, that will mess the code up!" In your response in quotations you included a comma! I think thats the problem. If not, then I have no clue. In your previous statement a comma was included. Just make sure that you take it out on your site. If it isn't there, sorry I couldn't help ya. MWAZ.
  #5  
Old 01-12-2001, 10:30 PM
NetNomad
Guest
 
Posts: n/a
Unhappy

I took out the comma. Nothing. Does it say anything about apostrophies? Because I had one there. Otherwise, it's OK. I put in an alert message instead that said to push the back button. Those always worked for me.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Powered by vBadvanced CMPS v3.2.0
All times are GMT -4. The time now is 03:15 AM.