473,324 Members | 2,541 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,324 software developers and data experts.

dialog box to show rest of an htm page

Newbie looking for the way have a dialog box and when a user goes to
this page they see *nothing*, Except for a dialog box pop, the box says:
"are you sure?" Yes/No. If user clicks yes they see the rest of the page
- (just some simple html). Else no, they might see a message that says
"go back".

I need the simplest briefest example - Thanks
Jul 23 '05 #1
2 1737
"Hal Halloway" <Ha******@nospam.net> skrev i meddelandet
news:0o4Ld.2767$zb.2094@trnddc07...
Newbie looking for the way have a dialog box and when a user goes to
this page they see *nothing*, Except for a dialog box pop, the box says:
"are you sure?" Yes/No. If user clicks yes they see the rest of the page
- (just some simple html). Else no, they might see a message that says
"go back".

I need the simplest briefest example - Thanks


Perhaps it would be user-friendlier to put the confirm() dialog in the
originating page? If user confirms, he goes to the new page. If user doesn't
confirm, he stays put:

<a href="yourPageHere.htm" onclick="return confirm('Are you sure?');">Go
somewhere</a>

Or you could have an "intermediate" page that shows the confirm() dialog and
forwards to the real page. The <body> might look something like this:

<script type="text/javascript">

if(confirm("Are you sure?")){
document.location.href = "yourPageHere.htm";
}
else if(document.referrer != ""){
document.write("<a href=\"" + document.referrer + "\">Back</a>");
}
</script>

document.referrer is supposed to be available when a page was reached by
clicking a link. (The text of the confirm() dialog buttons can't be changed
and may be a localized version of "OK" and "Cancel".)

--
Joakim Braun
Jul 23 '05 #2
Joakim Braun wrote:
"Hal Halloway" <Ha******@nospam.net> skrev i meddelandet
news:0o4Ld.2767$zb.2094@trnddc07...
Newbie looking for the way have a dialog box and when a user goes to
this page they see *nothing*, Except for a dialog box pop, the box says:
"are you sure?" Yes/No. If user clicks yes they see the rest of the page
- (just some simple html). Else no, they might see a message that says
"go back".

I need the simplest briefest example - Thanks

Perhaps it would be user-friendlier to put the confirm() dialog in the
originating page? If user confirms, he goes to the new page. If user doesn't
confirm, he stays put:

<a href="yourPageHere.htm" onclick="return confirm('Are you sure?');">Go
somewhere</a>


Thank you!!!!

Or you could have an "intermediate" page that shows the confirm() dialog and
forwards to the real page. The <body> might look something like this:

<script type="text/javascript">

if(confirm("Are you sure?")){
document.location.href = "yourPageHere.htm";
}
else if(document.referrer != ""){
document.write("<a href=\"" + document.referrer + "\">Back</a>");
}
</script>

document.referrer is supposed to be available when a page was reached by
clicking a link. (The text of the confirm() dialog buttons can't be changed
and may be a localized version of "OK" and "Cancel".)

--
Joakim Braun

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: strutsng | last post by:
<input type="file"> only allows the user to browse for files. How about "browse for folder" dialog? Can html/javascript do that? I couldn't find any syntax for that. If not, please advise what...
3
by: Earl Teigrob | last post by:
Can a Modal Dialog Box do forms ASP.NET forms validation from within the Modal Box? I want to pop up a dialog box to the user and have it do its own post backs with validation checking and then...
0
by: Ian | last post by:
I have sub-classed the Page class in order to provide some base properties and methods that every page on my site will need access to. I would like to have these things show up in the Simple...
10
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a...
2
by: des | last post by:
Hi, I would like to create a modal dlalog page for displaying some error message. I just want to know, is there anyway to pop out the modal dialog page in the vb.net code? Because each time i...
4
by: mamun | last post by:
Hi All, I have the following situation and am looking for answer in C#. I have a datagrid and putting checkbox next to each record. In the header I have a Delete button. I want users to...
11
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok /...
3
by: Mike Hofer | last post by:
Okay, here's the situation: we want to be able to display ASPX pages in an UpdatePanel. The reasons for this are performance related. The site in development uses *lots* of modal popups from some...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.