473,888 Members | 1,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1765
"Hal Halloway" <Ha******@nospa m.net> skrev i meddelandet
news:0o4Ld.2767 $zb.2094@trnddc 07...
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="yourPageH ere.htm" onclick="return confirm('Are you sure?');">Go
somewhere</a>

Or you could have an "intermedia te" 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.locati on.href = "yourPageHere.h tm";
}
else if(document.ref errer != ""){
document.write( "<a href=\"" + document.referr er + "\">Back</a>");
}
</script>

document.referr er 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******@nospa m.net> skrev i meddelandet
news:0o4Ld.2767 $zb.2094@trnddc 07...
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="yourPageH ere.htm" onclick="return confirm('Are you sure?');">Go
somewhere</a>


Thank you!!!!

Or you could have an "intermedia te" 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.locati on.href = "yourPageHere.h tm";
}
else if(document.ref errer != ""){
document.write( "<a href=\"" + document.referr er + "\">Back</a>");
}
</script>

document.referr er 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
66911
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 are the other approaches. please advise. thanks!!
3
2895
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 save the data and close the dialog when the page is valid. I have read a little about using Iframes to post back to, but was wondering if this would work for what I am trying to do? Also, does anyone have a code sample of this (postback from modal...
0
1458
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 Binding window of the DataBindings dialog. I then found this site (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxurfDataBindingsDialogBox.asp) which says: The tree view displays these objects: the Page object; any...
10
2764
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 preview DIV) 2. when users close the dialog, the application receives the URL to the selected graphic. 3. the modal dialog lets the users upload a new graphic if the dialog does not present them with one they are already happy with. 4. upon uploading...
2
2427
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 click the button, the page check and show the modal dialog page while the parent page still runing, so could someone tell me how to show the modal dialog page after the parent page is finish run.
4
7507
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 checkchekboxes and click the Delete button. That will show a confirmation dialog message with the items they choose to delete.
11
5310
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 / dangerous? How can I force shutdown code within the dialog's Form.FormClosed event run? Zytan
3
3890
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 pages, and we don't want to load all that content until it's requested. So, what we want to do is place an IFRAME inside an UpdatePanel and, in the onclick event for the linkbutton or button control, set the SRC so that the content is loaded on...
0
9800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10880
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10434
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9593
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7144
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5812
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6012
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4638
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3246
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.