Domain Empire

[Resolved] Question need help fast plz!

Spaceship Spaceship
Watch
Impact
0
Question need help fast plz!

I am running into serious problems w/ something i want to do w/ links. What i want to do and have seen in some websites is when a link is clicked a new window pops up resized and located somewhere other than in the center. how is this done. I have an example page but at the moment its under construction so i cant post it at the moment. does anyone know what i mean and can anyone help. if so email me or IM me. faster than readin a post
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
This may work for you:

First create a litlle function:

<script language="JavaScript">
function popUP() {
myWin = window.open("/page.html", "","toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=no,left=60,top=60,width=600,height=400")
}
</script>

Then call it by the name of the function like this:

<a href="javascript:popUP();">Click Here To Open A New Window</a>

This part should all go on one line:
myWin = window.open("/page.html", "","toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=no,left=60,top=60,width=600,height=400")

You can change the left and top numbers to adjust the window to pop up in different locations.
 
0
•••
Thnx but...

I still dont understand. Is there any way you can clarify this example a bit more for someone who really does not fully understand javascript. And i use dreamweaver if that helps any...
 
0
•••
In your html page where you're calling the pop up from add this code anywhere in the body section:


<script language="JavaScript">
function popUP() {
myWin = window.open("/page.html", ""," toolbar=no,location=no,directories=no,menubar=no,s
crollbars=no,resizable=no,left=60,top=60,width=600
,height=400")
}
</script>


You would need to change this part:
(/"page.html"

to the actual url of the page you want in the pop up window.

Then where ever you want the link to appear that is clicked to open the popup window add this:

<a href="javascript:popUP();">Click Here To Open A New Window</a>
 
0
•••
Here I uploaded a text file that you can look at to get a better example. You can save it as a .html file to your computer to see it in action. :)
 
0
•••
Thnx again im startin to...

Understand but how can i add more links on the page that do the same thing?
 
0
•••
You can add another function with another name. Then call the new popup with the new name.

For example you could name it popUP2

function popUP2() {

Then call it with popUP2 in your link.

<a href="javascript:popUP2();">Click Here To Open A New Window</a>

There's other ways to do it also without creating a new function for each different pop up. I'll see if I can find something and post it.
 
0
•••
thanx a bunch...

ill keep checking in for any new info for now this should be enpugh thanx alot for the help tho
 
0
•••
Well you can try something like this for each link:

<a href="#" onclick="window.open('page2popup.htm','WindowName','toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=no,left=60,top=60,width=600,height=400');return false">link</a>

Then you wouldn't have to create all them functions for each link.
There's alot of different ways of doing it, but maybe that will work for you.
 
0
•••
ugh!

for some reason when i input the code and preview it it doesnt work. What could i be doing wrong?

-And on your previous post the "#" icon, do i replace it w/ something other than that or leave it be? Sorry to be bugging so much but im no good w/ java script nor HTML all too well.
 
0
•••
I Uploaded another file you can take a look at and try it out.

You would leave the # just like it is.

:beer:
 
0
•••
I would normally just use target="_blank" but i think that would center it.
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back