Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop up that displays determined data

Status
Not open for further replies.

multichild

Programmer
Jan 28, 2006
76
GB
What I am needing is a pop up that has one function that captures the details of a link to populate the pop up.

So the function holds the details of the height and width etc, but does not contain the details of what the pop up contains. That information is passed to it via a <a href> link, such as details of where to find the images to display within the folder structure.

Cheers

Lee

Accend Web Solutions

 
Hi,

In honesty, not much. I have looked through t'internt, and could find what I wanted ,so i came here first to see if anybody had anything, or could suggest something.

Lee

Accend Web Solutions

 
Maybe you can pass the parameters in the query string and populate the popup in the onLoad function.

Cheers,
Dian
 
Im going to be honest and say, that I dont have much to fo with java script usuually, only really using what i find on the web...

Could you explain that a bit further, with maybe an example

cheers



Accend Web Solutions

 
assuming you're using PHP or some other server-side code, you could do something like this with javascript:

Code:
function doPopup(url) {
    window.open(url, 'w', '');
    return false;
}

Code:
<a href="page.php?directory=dir1" onclick="return doPopup(this.href);">Click to show images from Directory 1</a>

then, of course, you'd need to parse the query string in PHP to determine the directory you're using, and go from there.



*cLFlaVA
----------------------------
[tt]( <P> <B>)13 * (<P> <.</B>)[/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Seems to work a treat, but i dont seem to be able to control the width and height.

Im sorry, I know you have made it clear where those parameters go, but Im not to clever with j script.

cheers

Lee

Accend Web Solutions

 
modify the function:

Code:
function doPopup(url) {
    var iWidth = 200;
    var iHeight = 400;
    window.open(url, "w", "width=" + iWidth + ",height=" + iHeight);
    return false;
}

For more popup window characteristics, see this link.



*cLFlaVA
----------------------------
[tt]( <P> <B>)13 * (<P> <.</B>)[/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top