• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Netscape7.1 and window.createPopup()

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everybody,
In my application I have used window.createPopup(); method at client side in my application and Iam getting this error in Netsacpe7.1 and Mozilla that window.createPopup() is not a function.
Can anybody tell me what is the alternative way to use another method instead of window.createPopup() ,as I ahve tried on msdn also but Iam not able to find any other alternative .
Thanks in advance , do tell me if you have any idea.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That sounds like that is an IE only properpty.

You are going to proabably use layers or use a real pop up window.

Eric
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for responding ,well I am using window.createPopup(); and it works perfectly in IE but it gaves the same error in Netscape71. and Mozilla .

Well I write a simple code
<html>
<head>
<tittle>Test</title>
<Script language="JavaScript">
var win1= window.createPopup();// At this line it says the same error as I told u eralier



</script>
</head>
<body>
This is a testing page for the script
</body>
</html>

I exceute this simple code but Iam getting the same error" window.createPopup() is not afunction" as I was getting earlier in Netscape and Mozilla. So csn u tell me what is other way to solve this problem. Please help me.

Thanks
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
createPopup is an Internet Explorer specific method, and most likely available only in the later versions of IE only.

You CANNOT use it if your page will be viewed in Netscape, Mozilla, or any other browser except IE. you will need to write your own Javascript code that uses the Javascript standard window.open method to create a pop-up window.

Here is some helpful info. on it
http://www.jennifermadden.com/162/examples/window1.html

Eric has made available some very good resources at his site -
Eric's site


HTH

Sonny
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for responding and helping me, well whatever u have mentioned is correct and now Iam going through the link which u have given. So I will try and will tell u whether it has been solved or not.
Thanks for responding and helping me.
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,
I tried the window.open() is not the right solution and the error still persits in Netscape7.1 and same in mozilla ,now please tell me what is teh other way.
Thanks
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Code?
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
var oPopup = window.createPopup();

function popupSetStylePath(stl)
{

oPopup.document.createStyleSheet(stl);
}

// kontextove menu reagujici na prave tlacitko mysi
function popupContext(sMenu, w,h)
{ window.document.write("This is a value of SMenu:"+sMenu);
var oPopupBody = oPopup.document.body;

oPopupBody.innerHTML = document.all[sMenu].innerHTML;
oPopup.show(event.clientX, event.clientY, w, h, document.body);
document.body.onmouseup = popupClose;
}

// zavreni popup menu
function popupClose()
{ window.document.write("The popup window has been closed");
document.body.onmouseup = null;
oPopup.hide();
}
This is acode
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The code is IE only, you should look into using layers to create the same effect.
 
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jasmine,
Just curious... why do you find the open method not suitable for what you are trying to do? You should be able to just use the open method and write whatever you want to it. Does this not work in NS7?

Rob
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have not tested that, but it should give you an idea.
If you put the following code into your page BEFORE this popup code, I expect your code to work in NS without any changes

 
Sonny Gill
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont get it, what's wrong with using window.open() ? I would say that's the simplest possible solution, esp. if you dont know a lot about Javascript
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everybody ,
Thanks for helping me well I will try all the ideas given by u now and will tell u whether its works or not.
Well see the problem is with window.createPopup() which is not supported by the Netscape7.1 and Mozilla , so thats why i asked for another way.
Well thanks for helping me and now iam going to use all the suggestions suggested by all of you.
Thanks alot.
I will get back to you soon.
Thanks
 
Rob Hunter
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm with you on that one Sonny. I just got used to using open and normally just use that.
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is very nice object. You can look at ot here:
Popup Object
Ofcourse, if you dont intent to be completly cross-browser and fine with 98% of users that use IE.
I used it for example for context menu on multi frame page - everything else was just not working and I did not like how window.open() looked in that case.
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody,
I tried to implement ur ideas but nothing is working ,
If you have any ideas or suggestions then do tell me.
Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic