473,769 Members | 2,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating popup using DOM and *no* html src


Hi all,

I have a web app with a popup window for entering data. I don't want
to access the web every time this window is opened, as most of the app
is AJAX. But I can't figure out how to open a new window and build it
with DOM rather than having to provide a src. Even a blank.html as src
takes time to fetch.

How can I create a popup and dynamically add DOM content without any
html at all?

Aug 10 '05
24 3264
Matt Kruse wrote :
Gérard Talbot wrote:
You're right. It does not open a pure, virgin "about:blan k" document.

Ummm, that _was_ the point, you know :)

Updating via dynamically DOM-inserting an "about:blan k" can not be
done because of cross-domain security restrictions...

That's not true either. You can popup an about:blank window and change it.


In which browser and browser version can you do that? about:blank is an
unique domain name... With stricter security controls nowadays in
browsers, I doubt this can remain forever...

Gérard
--
remove blah to email me
Aug 14 '05 #21
ASM
Gérard Talbot wrote:
Csaba Gabor wrote :

btn.innerHTML = "Dialog <u>b</u>utton"

Validation error here too: unescaped /


Unescaped forward slashes in a script will trigger validation errors by
the validator. That's what I meant.


Not only by the validator
most of browsers don't eat that food ( </blah> )

try :
btn.innerHTML = "Dialog <u>b<\/u>utton";
or
btn.innerHTML = "Dialog <u>b<"+"/u>utton";
--
Stephane Moriaux et son [moins] vieux Mac
Aug 14 '05 #22
ASM wrote:
Gérard Talbot wrote:
Csaba Gabor wrote :

> btn.innerHTML = "Dialog <u>b</u>utton"

Validation error here too: unescaped /
Unescaped forward slashes in a script will trigger validation errors by
the validator. That's what I meant.


Not only by the validator
most of browsers don't eat that food ( </blah> )


Firefox and IE do ("eat that food"). Can you name two that don't.
try :
btn.innerHTML = "Dialog <u>b<\/u>utton";
or
btn.innerHTML = "Dialog <u>b<"+"/u>utton";


Indeed, what browser is so bad as to not realize that it's only the
<script> tag that must be closed here? But it is prudent to escape
"</script>" when appearing in a javascript string because an unescaped
"</script>" will be interpreted as closing the opening <script...>
element.

Oops, in my script above, it should be </head> that follows </title>

Gérard, I assume your question was rhetorical - after all, did you see
any <a> elements in my code?

Csaba

Aug 15 '05 #23
Csaba Gabor wrote :
ASM wrote:
Gérard Talbot wrote:


Gérard, I assume your question was rhetorical - after all, did you see
any <a> elements in my code?


Sorry about that. I misread your post.

Cheers,

Gérard
--
remove blah to email me
Aug 16 '05 #24
> what purpose does clicking the errant alert box serve?

The line "window.open("j avascript:'<htm l><head><title> " +
"Test</title><head><bo dy>should be a button here </body>'");
Opens a new window in another thread, the original thread continues but
you cannot be sure that window is ready. The alert gives the other
thread time to open the window and continue.

Aug 22 '05 #25

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

Similar topics

5
3974
by: Obantec Support | last post by:
Hi i leached some code and strung together a popup i need for a page with 5 help buttons. Now i could use 5 scripts and pre-load the values but i would rather get a better understanding of how to pass some extra values to 1 script. 1. <SCRIPT LANGUAGE="Javascript"><!-- function popUp(url) {
38
5089
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script language="javascript"> <!-- window.open("256fx/index.htm", "", "height=400, width=600"); //-->
12
12432
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank, 'height=200,width=400,status=no,toolbar=no, menubar=no,location=no resizable=no scrollable=no'); but I can't seem to invoke the client side script from within a Server Side Form. I know I can use the context with to Response.redirect or Server.transfer to return a
2
1716
by: Logger | last post by:
Help! I’m trying to get popups to work in asp.net. I’m Using the following javascript code in a sub, but I can’t get the PopupWindow to work. At first I thought the routine wasn’t working but it is. It looks like it’s the window.open that’s not working. I have site popup allowed turned on, if I replace window.open with alert it works, if I put the code in the html code it works. Any suggestions? Dim PopupScript As String...
15
18744
by: | last post by:
So many websites can get around my Googlebar's popup blockers. Even Opera 8 can not stop those popups. I looked into the codes, and I can find nothing showing me how it is done. Can anyone help me find what how it is done? First go to http://www.sitepoint.com/forums/showthread.php?t=184025&page=1&pp=25 Click on Last ? on the page
15
2836
by: David Thielen | last post by:
Hi; My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a subdirectory to display as part of the created page. However, the bitmap will not display due to a security violation. Everything is the default settings I believe. IIS is running under Local System. In IIS the DefaultAppPool is running under Network Service. Annonymous access uses the account IUSR_JASMINE (machine name is Jasmine).
1
5284
by: XP | last post by:
Hello Everyone, I was stuck with this really frustrating problem for sometime. Let me explain what I am trying to achieve: There is a form and an inner iframe. The form's target is set to the iframe so that when the form is submitted, the page does not get reloaded/changed ( as the iframe would be the one getting refreshed. The Iframe is set to have 0 width and height to make it look invisible ). I have a copied the html source ( at...
2
3267
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully validated my HTML and CSS code. 1. When I clear cache and refresh my webpage, it takes 3 tries before the popup window displays - I click on the button once, a white window the size of my webpage displays. I close it and click on the button again (for...
11
5321
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. How do I submit that form1 from the javascript from my current window? Thanks.
0
9424
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,...
0
10223
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10051
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10000
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
8879
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
6675
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
5310
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
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2815
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.