473,799 Members | 3,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Show DHTML popup window in front of frames/enable disabled/read-only text box

6 New Member
Hi All,

I have some problem in innerHtml. I have the textbox in innerHtml, In the innerHtml textbox was read only. I want make it to enable. if user enter the text that text will be retrieved, so i want to be enable text box. Another one problem is the the innerhtml will be in like popup window. it will automatically closed.i want be whenever i click close button that time only it will close. Please help me.

here is the Code


[HTML]<html>

<body>
<script type="text/javascript">
function show_popup23()
{

var p=window.create Popup();
var pbody=p.documen t.body;
//pbody.style.fil ter="alpha(opac ity=100)" ;
pbody.style.fon tSize="10px";
pbody.style.ali gn="center";
pbody.style.fon tFamily="Verdan a, Arial, Helvetica, sans-serif";
pbody.document. body.innerHTML= oToolTip.innerH TML;
p.show(0,0,800, 500,document.bo dy);

}
</script>

<a onClick="show_p opup23()">Click Me</a>
<div id="oToolTip" style="display: none; ">
<div id="block" style=" vertical-align:middle; width:100%; height:100%; border:2px solid black; filter:progid:D XImageTransform .Microsoft.Grad ient(GradientTy pe=0, StartColorStr=# cdcdcd, EndColorStr=#FF FFFF); padding:0px">

<table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0" bordercolor="00 0000" align="center" class="txttype1 " >
<tr bgcolor="#9B9AB 7"><td colspan="4" height="1px"></td></tr>

<tr><td align="center" valign="middle" >
<table class="txttype1 " border="0" bordercolor="#0 00000" cellpadding="0" cellspacing="0" >
<tr>
<td bgcolor="#9B9AB 7" width="1px"></td>
<td height="22px" width="150px">< font size="1px" face="Verdana, Arial, Helvetica, sans-serif">Headeing </font></td>
<td align="right">< a onclick="pbody. hide()"><img src="images/close.gif"></a></td>
<td bgcolor="#9B9AB 7" width="1px"></td>
</tr>
<tr>
<td bgcolor="#9B9AB 7" width="1px"></td>
<td bgcolor="#fffff f" height="25px">< font size="1px" face="Verdana, Arial, Helvetica, sans-serif">Enter the Name</font></td>
<td bgcolor="#fffff f"><input type="text" class="textbox" name="name" value="sadas" /> </td>
<td bgcolor="#9B9AB 7" width="1px"></td></tr>
<tr>
<td bgcolor="#9B9AB 7" width="1px"></td>
<td bgcolor="#fffff f" colspan="2" align="center" height="40px">< input type="submit" value="Done" name="done" ><input type="reset" value="Clear" name="clear" > </td>
<td bgcolor="#9B9AB 7" width="1px"></td>
</tr>
<tr bgcolor="#9B9AB 7"><td colspan="4" height="1px"></td></tr>
</table>
</td></tr>
</table>
</div>
</div>
</body></html>[/HTML]
Jul 14 '08
12 8696
acoder
16,027 Recognized Expert Moderator MVP
For modal dialogs, you could use showModalDialog if you know that your clients use IE, Firefox 3 and the latest versions of Safari. Opera and Firefox2- don't support it.

For a more cross-browser solution, show the DHTML div from the frameset, i.e. using top to get to the parent. For a modal effect, use a transparent layer which doesn't allow the user to interact with the rest of the content until they close the popup div. To give you an idea, see this link.
Jul 15 '08 #11
hsriat
1,654 Recognized Expert Top Contributor
No yar. i tried but i will work in the that frame only. I want like this
In this div will appear in three frame (upper, Middle and Lower frame). I want to like this.

Thanks yar
Well Well, I see that div is not being created in the frameset, even if created for window.top.docu ment. And if created from within a frame, it takes references of that frame as position coordinates.

So here, if possible you can create it from the middle frame. Do you consider it as an option?
For a more cross-browser solution, show the DHTML div from the frameset, i.e. using top to get to the parent. For a modal effect, use a transparent layer which doesn't allow the user to interact with the rest of the content until they close the popup div. To give you an idea, see this link.
[html]<html>
<head>
<script type="text/javascript">
window.onload = function () {
var bt = document.getEle mentsByTagName( 'button')[0];
bt.onclick = function () {
var p = window.top.docu ment.createElem ent('div');
//p.className = 'popup_div';
//p.id = 'popup_div';
p.innerHTML = 'Name:<br /><input type="text" name="name" /><br />Surname:<br /><input type="text" name="surname"> ';
//p.style.left = (parseInt(scree n.availWidth) - 400) /2 + 'px';
//p.style.display = 'block';
try {
window.top.docu ment.getElement ById('top_frame set').appendChi ld(p); //not working
//alert(window.to p.document.getE lementById('top _frameset').id) //working
}
catch (e) {alert(e);}
//not showing any error
//neither is firebug showing any
//but the web development tool bar's CSS error icon is turning red
//Error console says nothing.
}
}
</script>
</head>
<body>
<div>
<h1>Page 3</h1>
<button>Show PopUp</button>
</div>
</body>
</html>[/html]This is the code of one of the three frames but isn't working.

PS: I think the title should be changed.
Jul 15 '08 #12
acoder
16,027 Recognized Expert Moderator MVP
I have changed the title.

I hadn't tested the concept of using a DHTML div popup in a frameset (I don't like frames anyway), it was an idea. I would avoid frames and either use iframes or load the external content in divs dynamically using DHTML or Ajax.
Jul 16 '08 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

4
10287
by: KS | last post by:
Is it possible to write a javascript that makes a popup window when someone click on buttons/href on my page and close itself when the new page is about to get loaded? I want to prevent the user from clicking anything else on my page while the request is getting a new page. The popup window must lock the focus. I use frames i can not just disable all the buttons an href in different frames.
4
5791
by: gallery | last post by:
My client is asking that once a viewer visits his website, the onLoad popup window not show up again. What's the best way to do this? Thanks, Marje
17
2516
by: Applebrownbetty | last post by:
Hi, I'd like to append/amend the following code from the Dreamweaver extension "Open Picture Window Fever" for the ability to center the PopUp window: By default, it allows the window to be offset on the left and top, but does not include a centering option. I'm thinking it would include something like (screen.width-imageWidth)/2; somewhere but not sure how do go about doing this.
10
3347
by: Thad | last post by:
Any javascript I could try on this? I've got a popup window on my site with the browser chrome removed. Another site's gone ahead and done a popup to my same .html page. The visitor to that site doesn't realize it unless he looks at the opener page's source code. I'm wondering if there's a javascript solution for this? I've tried using the window.opener.location.replace with the href being my absolute URL, and triggered by an onUnload...
26
6827
by: Raffi | last post by:
Hi, We have a database application that runs in a popup Internet Explorer application window. The reason for this is to isolate the casual user from the address bar and the typical IE navigation buttons. The application has a browser test page that displays an error message when a popup blocker is found and opens a popup page stating the test was successfull if there is no popup blocker.
9
4727
by: Jimmy Junatas | last post by:
When we open a window (using client-side jscript ie. window.open("/Site/Popup.aspx?...",...)) from Page1.aspx, the called page Popup.aspx does not have access to the Session variables present in Page1.aspx. The IIS Log shows (listed below) shows that the ASP.NET_SessionId cookie is not present in Popup.aspx. The thing is that this mechanism works for 99% of our users. There is this one user that is consistently having this problem. ...
4
1308
by: Sam Learner | last post by:
Hi Everyone, I'd like to create my own Internet Popup windows Stopping program. Is there any code I could you to monitor when IE or Netscape opens a Windows from a clicked Link? how about managed class, is there any? Please help. SJ
7
3677
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses pageA.html 2. User clicks on menu link to open popup.html 3. pageA.html checks if popup.html is already open. It is not, open
2
2154
by: KC | last post by:
Hi, Every JavaScript executive context has a top-level window and we can use window.open() to open another window ... Does this related to Windows created by click on "File"->"New Window" or "File" -"New Tab" in browser's menu bar ? I think window created by "File"->"New Window" and "File"->"New Tab" are independent to each other from JavaScript's point of view. Is this correct ?
0
9546
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
10491
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...
1
10247
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
10031
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
9079
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
6809
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
5467
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...
1
4146
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
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.