href question

I want to have a link open in a new window. This is what I've currently got:

<a href="#" onClick="MM_openBrWindow('http://www.domain.com/file.html','Name','status=yes,scrollbars=yes,width=600,height=400')">

The problem is that "#" reloads the page and displays it at the top, a bit annoying if this link is further down the page, and visitors need to re-scroll down to find this section. Is there any way to get around this?

Also, Is it possible to have the pop-up window centered on the clients' page, regardless of screen resolution?
mpaertAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LakioCommented:
<a href="#" onClick="MM_openBrWindow('http://www.domain.com/file.html','Name','status=yes,scrollbars=yes,width=600,height=400'); return false">
0
mpaertAuthor Commented:
Thanks Lakio. Any ideas about positionling the pop-up centrally?
0
mpaertAuthor Commented:
Slight change of plan, I'm using this for the description of an eBay auction, and, as it seems, eBay won't let me have a pop-up window. So far, the only thing I've been able to do is to open a link in a new window.

See http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=9704972035# - In the "VPS Value" section you can see "Upgrade Options". Under that header, you have two "[Details]" links. These links are supposed to display a new window with information. As I'm not able to have those, has anybody got any good suggestions on how or which HTML to use so that visitors can press the [Details] link and get informtaion on those upgrades...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

LakioCommented:
you can have a layer with all the info or just open in a new window
0
mpaertAuthor Commented:
THanks, but I wasn't able to have a layer displaid at all on ebay, they're very careful with which code can be used on their site.... I guess then it's just a link in a new window....
0
mpaertAuthor Commented:
This is maybe the wrong forum, but maybe CSS can solve this???
0
ZylochCommented:
I took a quick look at the Ebay standards and you may be able to work with the layers.

Just have something like this:

href="#" onclick="document.getElementById('det1').style.display=(document.getElementById('det1').style.display=='none')?'':'none'; return false;">

and then have

<div id="det1" style="border:1px;display:none;">
Your Details
</div>

for each detail, changing det1 in both the Javascript and id
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LakioCommented:
well, all you can do with css is show text on mouseover, but really if its not your page then just open a new window

(you can open a window(1) and then with it open a popup(2) then closes (1) but I really think that a bad idea)
0
ZylochCommented:
I'd echo what Lakio said; with SP2, it's not even a guarantee the new window will open -_-
0
LakioCommented:
if Zyloch thing works use it, or just open a normal window
0
mpaertAuthor Commented:
Zyloch, you're a genius.

See http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=9704972035 and find the "Layer Test Link"

Could I have many "links" that point to the same layer, would I in this case just keep the same ID?
0
mpaertAuthor Commented:
Sorry, another question. Do you know if it is possible to source the contents of a layer from another file without using iframes etc? I have 13 pages, all using the same layer contents. If I need to change one, I have to do it on all 13 manually... a bit of a pain...
0
ZylochCommented:
I'm afraid I know no easy way of doing so. Anything possible with Javascript (namely with xmlhttp) would most likely meet with a permission denied error since you cannot cross-site script.

However, you can have another link point to the content by using the same id in the Javascript.
0
LakioCommented:
lol, I like the open a new page thing :)
0
ZylochCommented:
It depends on how you use it :D There's certainly nothing wrong with the new page, and you can even make it look nice, perhaps by centering the information and providing a close button :)
0
mpaertAuthor Commented:
Thanks guys, the page looks much better now, with no navigation out of it for viewing the [Details] part. Any more suggestions how to present it better?
0
mpaertAuthor Commented:
umm, I must have been writing whilst you submitted your message.

Can the text "Close" appear after one has clicked "Details"?
0
ZylochCommented:
Ah, I see. Sure, just have this:

onclick="var d=document.getElementById('det1');if (d.style.display=='none'){d.style.display='';this.innerHTML='Close';}else{d.style.display='none';this.innerHTML='Details';} return false;"

As always, change 'det1' to what is needed.
0
mpaertAuthor Commented:
Done. Thanks so much.
0
LakioCommented:
mpaert its looking good :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.