473,788 Members | 2,810 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 #1
12 8694
hsriat
1,654 Recognized Expert Top Contributor
What is createPopup? Either you need to define this function, or you would need to use window.open instead. And same goes for show.

And you can't refer to oToolTip like this. You need to add this statement to your code:
Expand|Select|Wrap|Line Numbers
  1. var oToolTip = document.getElementById('oToolTip');
Jul 14 '08 #2
acoder
16,027 Recognized Expert Moderator MVP
I would add that the alternative to createPopup() would be a DHTML popup window. Although those suggestions may not answer your question directly, they will help you out in the long run. You're coding only for one browser using proprietary code which will not work in any other browser. Get out of that habit as soon as possible as the other browsers are taking a larger share of the market year in year out.

Re. your question: I can't see the text box as being read-only in your code.

PS. please use code tags when posting code.
Jul 14 '08 #3
Rahaman sharif
6 New Member
What is createPopup? Either you need to define this function, or you would need to use window.open instead. And same goes for show.

And you can't refer to oToolTip like this. You need to add this statement to your code:
Expand|Select|Wrap|Line Numbers
  1. var oToolTip = document.getElementById('oToolTip');

Hi i dont want to window.open because it will display close,min and disable max button on title bar i dont want to like that. i have morethen 8 frame in a page so i want top of the frame(over the frame). i used like that, in the case the problem is if i click outside the popup it automatically closed.i want to whenever i click the close button that time only it closed. please help me.

Did you know div tag over the frame. it is possible. If u know means tell me how to do that.

Thanks
Jul 15 '08 #4
hsriat
1,654 Recognized Expert Top Contributor
Hi i dont want to window.open because it will display close,min and disable max button on title bar i dont want to like that. i have morethen 8 frame in a page so i want top of the frame(over the frame). i used like that, in the case the problem is if i click outside the popup it automatically closed.i want to whenever i click the close button that time only it closed. please help me.

Did you know div tag over the frame. it is possible. If u know means tell me how to do that.

Thanks
Then use a DHTML popup script like lightbox or thickbox. Just google for either of them and see what you get.
Jul 15 '08 #5
Rahaman sharif
6 New Member
Then use a DHTML popup script like lightbox or thickbox. Just google for either of them and see what you get.
No yar. I cant use gray box, light box and thick box. In this window have 2 fields only. so i want simple. if you know the div tag over the frame. please tell me how to do that. that is very help full for me.

Thanks yar.
Jul 15 '08 #6
hsriat
1,654 Recognized Expert Top Contributor
No yar. I cant use gray box, light box and thick box. In this window have 2 fields only. so i want simple. if you know the div tag over the frame. please tell me how to do that. that is very help full for me.

Thanks yar.
Then you create a popup div. The CSS that is required for a popup div are as follows:
Expand|Select|Wrap|Line Numbers
  1. #popup_div {
  2.     position: fixed; /* (or absolute) */
  3.     left: 0px;
  4.     top: 200px;
  5.     height: 200px;
  6.     width: 400px;
  7.     display: none;
  8.     z-index: 200;
  9.     background-color: #fff;
  10. }
And make you popUp() function like:
Expand|Select|Wrap|Line Numbers
  1. function popUp(txt) {
  2.     var popup = document.getElementById('popup_div');
  3.     popup.innerHTML = txt;
  4.     popup.style.left = (parseInt(screen.availWidth) - 400) /2 + 'px';
  5.     popup.style.display = 'block';
  6. }
Jul 15 '08 #7
Rahaman sharif
6 New Member
Then you create a popup div. The CSS that is required for a popup div are as follows:
Expand|Select|Wrap|Line Numbers
  1. #popup_div {
  2.     position: fixed; /* (or absolute) */
  3.     left: 0px;
  4.     top: 200px;
  5.     height: 200px;
  6.     width: 400px;
  7.     display: none;
  8.     z-index: 200;
  9.     background-color: #fff;
  10. }
And make you popUp() function like:
Expand|Select|Wrap|Line Numbers
  1. function popUp(txt) {
  2.     var popup = document.getElementById('popup_div');
  3.     popup.innerHTML = txt;
  4.     popup.style.left = (parseInt(screen.availWidth) - 400) /2 + 'px';
  5.     popup.style.display = 'block';
  6. }
Thanks hsriat for your effort but i think u miss understood my query , let me explain my query !! i have an application running in 8 frames, what i require is on click of a button in say frame3 i need a div tag to be windowed like modal dialog box so that the user can enter some inputs , i can't use a modal dialog box. so if you could tell me how is it possible to show a div over all frames in the center of I.E it would be great !! many a thanks again for your replys
Jul 15 '08 #8
hsriat
1,654 Recognized Expert Top Contributor
Didn't the above code work?
Jul 15 '08 #9
Rahaman sharif
6 New Member
Didn't the above code work?
No yar. i tried but i will work in the that frame only. I want like this

Expand|Select|Wrap|Line Numbers
  1.  ----------------------------------------
  2.  |                                             |
  3.  |           Upper frame                |
  4.  |                                             |
  5.  |           -------------------               |
  6.  |          |      DIV          |             |
  7.  ---------     Middle frame   -----------|
  8.  |         |                       |             |
  9.  |         --------------------                 |
  10.  |                                              |
  11.  |          Lower frame                  |
  12.  |                                             |
  13.  ----------------------------------------------
  14.  
In this div will appear in three frame (upper, Middle and Lower frame). I want to like this.

Thanks yar
Jul 15 '08 #10

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

Similar topics

4
10285
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
5790
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
2514
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
3345
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
1307
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
3675
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
2153
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
9498
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
10364
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
10172
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
10110
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
8993
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...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
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();...
1
4069
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
3670
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.