gillweb Posted March 19, 2003 Share Posted March 19, 2003 I need to add a link to my "information box" but it is a NON-OSC link... My site is http://www.bargainbones.com/shop and I want to add a link to http://ww.bargainbones.com/links which is not within OSC. How can this be done? <? Hello There! ?> Link to comment Share on other sites More sharing options...
gillweb Posted March 19, 2003 Author Share Posted March 19, 2003 sorry add a W to the WWW :oops: <? Hello There! ?> Link to comment Share on other sites More sharing options...
Guest Posted March 19, 2003 Share Posted March 19, 2003 I use a javascript to pop open a new window for things like that - you can add the following line into the list of links in the information.php box file: "<A href="java script:NewWindow(' http://ww.bargainbones.com/links','Links',...gt;<br>" . in my footer.php file I have the actual java script: <?php /* $Id: footer.php,v 1.25 2002/10/29 22:51:48 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2001 osCommerce Released under the GNU General Public License */ require(DIR_WS_INCLUDES . 'counter.php'); ?> <head> <SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'> <!-- var win=null; function NewWindow(mypage,myname,w,h,pos,infocus){ if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;} if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;} else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20} settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resiz able=no";win=window.open(mypage,myname,settings); win.focus();} // --> </script> </head> .....rest of footer.php......... Link to comment Share on other sites More sharing options...
capsulas Posted April 8, 2003 Share Posted April 8, 2003 Hello from Mexico City ! I added the following code in information.php "<a href="java script:NewWindow('http://www.oanda.com/convert/classic?user=in4energy〈=es','oanda','200','200','custom','front');">Convertidor de Monedas</a><br>" . But, it doesn?t work, the front page show a "error on page" at botton line. Why it doesn?t work? Thank for your advice. Link to comment Share on other sites More sharing options...
Guest Posted April 8, 2003 Share Posted April 8, 2003 it would help to know what the error msg is :wink: Link to comment Share on other sites More sharing options...
capsulas Posted April 8, 2003 Share Posted April 8, 2003 thanks, let me show you 1. Link was added ok, and show it in botton line the java sript code 2. Clicking the link, diplay a message error: "error on page" 3. Clicking the warning, display: "error expectet", code=0 What is the trouble? Link to comment Share on other sites More sharing options...
capsulas Posted April 9, 2003 Share Posted April 9, 2003 Anybody knows what it means objetc expected? This warning message is show up when I using a javascript code. Link to comment Share on other sites More sharing options...
prosto Posted April 10, 2003 Share Posted April 10, 2003 I think that means you did not paste javascript into header of the page... Take a closer look at the provided code. I would not do it in the footer.php though. Header.php would be my choice. Link to comment Share on other sites More sharing options...
capsulas Posted April 10, 2003 Share Posted April 10, 2003 You?re right, :oops: Thank you, It?s working now :lol: Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2003 Share Posted April 18, 2003 I tried this and I am getting this error: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/dappasco/public_html/includes/boxes/information.php on line 26 What have I done wrong here? Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2003 Share Posted April 18, 2003 Never mind I fixed it. Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2003 Share Posted April 18, 2003 lots of patience and a sense of humor helps 8) Link to comment Share on other sites More sharing options...
toolcrazy Posted April 18, 2003 Share Posted April 18, 2003 Hey, Jeff, Out of curiosity, Why are you suggesting Java Script to create the link, Why not just enter a standard link? Thanks in advance for the info, Steve ------------------------- Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2003 Share Posted April 18, 2003 you mean using javascript instead of using html <a href= with target="_blank"? because if you use html, the popup window will come up as the same size as the last window you viewed where as with javascript you can set the size of the popup window and not cover up your main window Link to comment Share on other sites More sharing options...
toolcrazy Posted April 18, 2003 Share Posted April 18, 2003 you mean using javascript instead of using html <a href= with target="_blank"? because if you use html, the popup window will come up as the same size as the last window you viewed where as with javascript you can set the size of the popup window and not cover up your main window Oh Ok, I see. It does make sense. If the customer insists in leaving your site at least keep your own in their face. You could also open a framed window with your logo at the top. Steve ------------------------- Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2003 Share Posted April 18, 2003 exactly - thats what we do and use for pop up windows for the faq and online howto manuals, etc. we popup a smaller sized window with our logo and information, it doesnt cover up the main store window and so they never lose us.... hopefully :wink: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.