Jump to content

Basic HTML Pop-Up


5614

Recommended Posts

recently i went on a website which had a pop-up message saying:

 

"click yes to enter the website"

 

however the only option was to click 'ok' so obviously you couldnt enter the website,

 

possibly it was done by refreshing the page each time 'ok' was clicked,

but it wasnt just the same 'once off' pop up copy and pasted loads of times because i held down enter for a while, and the message just kept poping up, and there was no way it was copy and pasted THAT many times,

 

so what is the HTML code for this pop up which yuo cant get rid of?

Link to comment
Share on other sites

well, i take it you went to that link. (it does no damage, just annoys you).

 

but, you can either do what that site does and you have to fulfil the reqs of the code(clicking OK till it finishes it's message) or create a loop w/ in a loop, with nothing to break(terminate) the cycle.

Link to comment
Share on other sites

well, that link has an end to the loop, so eventually you'll get out of it. i did it a few times. and one time i was extremely bored, i actually read the entire thing this guy had there. lol, that took away 20 minutes of my life i'll never be able to recover. but also pressing and holding the Enter/Return button will get you out since it'll keep on clicking OK......

 

well for Java Script, you don't need any programs(i think), but for Java, you'll need to either download or buy one. although i haven't seen a free version of Java.

Link to comment
Share on other sites

It was a modal prompt, which is the most basic dialogue that JavaScript can trigger.

 

It was probably attached to an "onLoad", "onFocus" or "onMouseOver" event.

 

 

Note that java and javascript have nothing to do with each other, despite the names.

Link to comment
Share on other sites

Note that java and javascript have nothing to do with each other' date=' despite the names.[/quote']

 

hmm, wasn't aware of that.

but then that will explain why java needs a compiler and java script does not.

(i've never touched java and never will ;) )

Link to comment
Share on other sites

JavaScript is an interpreted language developed by Netscape. It started life as "LiveWire", then was renamed "LiveScript", and eventually became known as "JavaScript" after being passed to the ECMA.

 

Java is a compiled programming language that Sun Microsystems started developing in 1990.

Link to comment
Share on other sites

ok, so how would i make it!

 

If you want it for your website, then, a little word of warning. It is VERY annoying to some people on the net. Doing it may PERMANENTLY damage the number of viewers on your site. So, just watch out :)

Link to comment
Share on other sites

If you want to make your own pop-up prompt, this is the code:

 

<script language="JavaScript" type="text/javascript">
<!-- 
function myAlert() {
 alert("Your properly escaped message here")
}
// -->
</script>

^-- Goes before your closing HEAD tag.

 

 

 on[Event]="myAlert()"

^-- as an attribute of the HTML element you want to trigger the alert.

 

 

You can find the list of generic events here:

http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-htmlevents

 

You should only use an alert if you really really really have no alternative.

Link to comment
Share on other sites

Sayonara³: That will display one alert box, for an infinite loop of them you'd use this code.

 

<script language="JavaScript" type="text/javascript">
<!-- 
function myAlert() {
 var i = 1;
 while(i > 0) {
   alert("Your properly escaped message here");
 }
}
// -->
</script>

 

then to do it when the page loads, make your body tag look like this:

 

<body onload="myAlert();">

 

I haven't tested this code, but I can't see why it won't work.

Link to comment
Share on other sites

That would work (if you included code to reload the page after the prompt is cleared), but since the prompt is modal all you have to do for infinite pop-ups with my code is make the event "onFocus". It's less typing ;)

 

As soon as you clear the prompt, the trigger regains focus and voila! New prompt.

Link to comment
Share on other sites

one sec, i used to do basic html/java stuff, since you all seem to know what you are talking about, can someone just post the whole code which i can copy and paste, just make the message wtvr you want, i understand java better than i write it, i can edit it after... thnx

Link to comment
Share on other sites

Sayonara³: That will display one alert box' date=' for an infinite loop of them you'd use this code.

 

<script language="JavaScript" type="text/javascript">
<!-- 
function myAlert() {
 var i = 1;
 while(i > 0) {
   alert("Your properly escaped message here");
 }
}
// -->
</script>

 

then to do it when the page loads, make your body tag look like this:

 

<body onload="myAlert();">

 

I haven't tested this code, but I can't see why it won't work.[/quote']

 

thanks ive done this and it works, just a warning, i think the only way to shut the windows is to log off [network or windows itself] or shut down your computer! but thanks loads, good prank for friends, ill upload it to a website and tell you all the address, but dont go to it, coz u wont get out, i dont think anyway, maybe u could terminate the program! internet explorer

Link to comment
Share on other sites

read my above message for the script,

 

this has been hosted on:

not any more, the sites down

 

only go on this is you dont want to get out, actually, you can get out, but only by ending the process, in windows this is ctrl+alt+del

kinda off the subject, go onto

http://www.teamcti.com/pview/prcview.htm

this is a good reliable process viewer, and when you click 'kill task' unlike windows, it will terminate the program instantly wtvr program it is! even windows.exe!!!

 

go to:

 

http://www.teamcti.com/pview/prcview.htm

Link to comment
Share on other sites

  • 4 months later...

well yeah, because of

 

<body onload="myAlert();">

 

that part of course it will work (assuming the rest is set up fine) seemingly my site is no longer working, fear not, i will upload into school's shared area under the name "please read"!

Link to comment
Share on other sites

well yeah, because of

 

<body onload="myAlert();">

 

that part of course it will work (assuming the rest is set up fine) seemingly my site is no longer working, fear not, i will upload into school's shared area under the name "please read"!

Link to comment
Share on other sites

  • 2 months later...

how would i embed login password boxes into a popup particulary this code

<B>Group name or 
 username:</B> <INPUT size=10 name=user MAXSIZE="10"> 
 <P><B>Password:</B> <INPUT type=password size=10 name=pass MAXSIZE="10"> 
 <P><INPUT type=submit value=Submit> <INPUT type=reset value=Clear>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.