February 22, 200421 yr Before I did use the CDML tag below this one works. CDML: <a href="[FMP-LinkRecID: format=details.htm, layout=WEB]" target="_blank">order</a> Accept that I want a popupwindow which is 450px x 100px without scrollbars & in the center ect. Now you can see the JavaScript I use. The problem I have is that when the action is happend the wrong FM record is shown. (It is always the last record in FM) JavaScript using CDML tags: <script language='javascript'> var testWindow=null; function test(mypage,myname,w,h,pos,infocus){ if(pos=='random'){ LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100; TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;} if(pos=='center'){ LeftPosition=(screen.width)?(screen.width-w)/2:100; TopPosition=(screen.height)?(screen.height-h)/2:100;} else if((pos!='center' && pos!='random') || pos==null){LeftPosition=100;TopPosition=100;}settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no'; testWindow=window.open('',myname,settings); if(infocus=='front'){testWindow.focus();testWindow.location='[FMP-LinkRecID: format=details.htm, layout=WEB]';} } </script> <a href="javascript:test('[FMP-LinkRecID: format=details.htm, layout=WEB]','test','450','100','center','front');">Click Here</a> I hope some can help me! Greetings Jukkie
February 22, 200421 yr Try changing this: testWindow=window.open('',myname,settings); if(infocus=='front'){testWindow.focus();testWindow.location='[FMP-LinkRecID: format=details.htm, layout=WEB]';} } </script> to this: testWindow=window.open('',myname,settings); if(infocus=='front'){testWindow.focus();testWindow.location=mypage;} } </script> Good Luck. Garry
February 22, 200421 yr Author Thanks Garry it works!!! I don't understand why the location is mypage! Can you our somebody else tell my? Greetings Jukkie
February 24, 200421 yr The function called "test" is receiving the URL as a parameter: function test(mypage,myname,w,h,pos,infocus){ It is being sent from the <a>: <a href="javascript:test('[FMP-LinkRecID: format=details.htm, layout=WEB]','test','4 "mypage" is a now a variable containing the URL. All the best. Garry
Create an account or sign in to comment