...

View Full Version : Yes or no alert with the next code.



joonstar
03-12-2004, 12:58 AM
<script language="JavaScript" type="text/javascript">
if (confirm("will you go to next.html?"))
{
self.location = 'next.html?';
} else {
history.go(-1);
}
</script>

The above code will give "yes" or "no" alert.
If a user clicks "yes", it will go to next.html.
If the user clicks "no", it will go to the previous page.

Now It's turn to tell what I want.

I like to make a "yes" or "no" alert like the following.
If a user clicks "yes", the next code in the page will be read.
If the user clicks "no", it will go to the previous page without reading the next code in the page.


Can I do it?

joh6nn
03-12-2004, 01:49 AM
if (!confirm("will you go to next.html?"))
{
history.go(-1);
} else {
/* do whatever; */
}

stoodder
03-12-2004, 02:27 AM
okay so basically you want to inclu a page right? liek make it so it liek shows the code or soething of the page lik eby opening it,, well the onl possible way i wul dknow of is the by creatign an activeX file stream then opening the file that way but im unsure if thta would even work

the best i can offer is that you have the locotion go and have somehting like ?page=hello.php at the end of the addess(make sur eyou change the page to something with a php enabled address) and then have php include the page, like: <? include($page); ?>

and that shoudl work



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum