View Single Post
Old May 18th, 2008, 10:19 PM   #1
Logical1
Programmer
 
Logical1's Avatar
 
Join Date: Apr 2008
Posts: 47
Rep Power: 0 Logical1 is on a distinguished road
Question Passing a variable to a pop up window

Hello guys
I am using a simple script to open a little window for userfirendly print version of some pages.
I need to pass an id number to it.
Altough I am using javascript for this I know nothing about this language.
Any idea as how to go about it?
I think you in advance.


Here is the code for the link and the java script for pop up:
I need to pass Id=123 to this link >>>
<a href="javascript:OSUGGEST('printfriendly.php)";>Print</a>---------------------------------------------------
<script LANGUAGE="JAVASCRIPT">
<!--
function OSUGGEST(url) {
var url = url +"?url=" + document.location
var NS = (document.layers) ? true : false;
var IE = (document.all) ? true : false;

if(NS) {
window.open(url,"","scrollbars=no,menubar=no,personalbar=no,width=500,height=500,screenX=220,screenY=0");
} else if(IE) {
window.open(url,"","scrollbars=no,menubar=no,personalbar=no,width=500,height=500,left=220,top=0");
}

}
//-->
</script>

---------------------------------------------------------------
__________________
^c^
Logical1 is offline   Reply With Quote