window.open always displays the address

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

I have the javascript function:

function openWindow(name, path, w, h){

OpenWindowX=window.open(
path,name,'scrollbars=1,resizable=1,width='+w+',height='+h);

}

and call it like this.

<a href="JavaScript:openWindow('abc','Images/ABC.jpg',763,571)" >qqq</a>

The top of the window contains a title that I can control.

But under that is and address box that doesn't make much sense to the
viewer. Why would he want to know where the image is stored.

I can't get rid of that.

Do you know how?

Or can I place some other text in there other than the address?

Thanks in advance
 
window.open('url to open','window name','attribute1,attribute2')

I think you need to set the location attribute to no



So. window.open(yourUrl, Title, 'location=no')
 
Mark Rae said:
That's correct, as Göran has explained.

Why not use an AJAX popup extender instead? Looks like you're opening a
new window, but you're not, so you have total control over it...

Why not indeed?

Well for starters I know so little about Ajax I don't know where to get
started. I looked on the Internet and do find examples but I'm not
orientated enough for them to help. That is, I need the big picture of how
AJAX fits in.

But quick questions I'd appreciate an answer to is:

If I use AJAX does that come with a lot of baggage of some kind or other?

For example, do all browsers support AJAX (I don't even know if the browser
needs to support it.)

How about ISP's. If they support ASP.NET is AJAX included?

Does the viewer need to have the AJAX framework on his/her computer?

Thanks for the reply
 
See answers inline
Well for starters I know so little about Ajax I don't know where to get
started. I looked on the Internet and do find examples but I'm not
orientated enough for them to help. That is, I need the big picture of how
AJAX fits in.

I would say it's about time to start learning... AJAX technology matured
enough
But quick questions I'd appreciate an answer to is:

If I use AJAX does that come with a lot of baggage of some kind or other?
may be yes may be no. All you need to do is to include Javascript library
which will be about 40-50K.


For example, do all browsers support AJAX (I don't even know if the
browser needs to support it.)
Nope, not all of them but majority. If you look at your site using IE 2.0 it
probably will not look good. But if you target IE 6, IE 7, FireFox then you
ok.
How about ISP's. If they support ASP.NET is AJAX included?

It's transparent for ISPs. They might not even know you using AJAX
technology.
Does the viewer need to have the AJAX framework on his/her computer?

Nope, It's all HTML/Javascript/HTTP based.

Here is the page with Microsoft AJAX control toolkit
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ModalPopup/ModalPopup.aspx
So you can see how it looks like.

PS: To show a popup you do not need AJAX per say. It's only called AJAX
control toolkit. But simply a big JavaScript library.
You actually might want to us another one. called JQuery. It seems to be
easier to use and has smaller size.

http://jquery.com/demo/thickbox/


George.
 
Mark Rae said:
There's a certain learning curve involved, but nothing like as steep as
with other ASP.NET-related technologies e.g. MVC, Silverlight etc...

However, once you're up to speed with AJAX, you'll wonder how you ever
managed without it and your users will love the fact that your web apps
don't keep doing postbacks all the time...


With ASP.NET 3.5, it's all built in...


Essentially, any browser which supports JavaScript supports AJAX - that's,
in fact, what the second letter of the acronym represents...


Effectively, they don't have to actively support it - it's just there...


No, though they do need to have JavaScript enabled...


Thanks for those answers.
 
Thanks, I'm going to look into it.


George said:
See answers inline


I would say it's about time to start learning... AJAX technology matured
enough

may be yes may be no. All you need to do is to include Javascript library
which will be about 40-50K.



Nope, not all of them but majority. If you look at your site using IE 2.0
it probably will not look good. But if you target IE 6, IE 7, FireFox then
you ok.


It's transparent for ISPs. They might not even know you using AJAX
technology.

Nope, It's all HTML/Javascript/HTTP based.

Here is the page with Microsoft AJAX control toolkit
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ModalPopup/ModalPopup.aspx
So you can see how it looks like.

PS: To show a popup you do not need AJAX per say. It's only called AJAX
control toolkit. But simply a big JavaScript library.
You actually might want to us another one. called JQuery. It seems to be
easier to use and has smaller size.

http://jquery.com/demo/thickbox/


George.
 
Back
Top