Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi,
Here i am facing the problem of HTML javascript....Can you plz help me out on this,..... I have created one HTML file


C#
function show_popup()
{
var p=window.createPopup()
var pbody=p.document.body
//pbody.style.width:250px; pbody.style.height:130px;
        //pbody.style.background:url(C:/Users/ravi/Desktop/a.png);
pbody.style.backgroundColor="lime"
pbody.style.border="black"
pbody.innerHTML=ravi;

p.show(40,40,200,50,document.body)

}


Create pop-up





I am getting pop-up outside the browser ...up to the mark its ok....but it border should be in Call out pop-up style. Moreover the pop up should come out from the browser..plz help me :)
Posted
Updated 1-Feb-11 17:44pm
v3

border takes three parameters: type, color, and size

pbody.style.border = "solid black 1px";
 
Share this answer
 
First of all, i would not recommend using the window.createPopup() at all. It is a IE specific thingie and would not work in any other browser.

You should use a div to do this instead.

Next, you seem to have declared pbody, but where has it been used. NOWHERE!
 
Share this answer
 
Comments
fjdiewornncalwe 1-Feb-11 10:15am    
I agree with using the div. Note on pbody. It is declared and used to clean up the syntax of the method. It is done correctly as pbody references the p.Document.Body object, so it is initialized and used properly. Cheers.
ravikiran_k 1-Feb-11 23:41pm    
<a href="#" id="ravi" type="text" önmouseover="show_popup()">Create pop-up!</a>
this is the border for that.....moreover the tool tip should be come out from the browser....plz help me on this ...!!!!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900