patrocine Posted September 10, 2022 Share Posted September 10, 2022 I need when I redirect it to open in a new tab in the browser with _blank but I haven't found how to implement it in the code <script type="text/javascript"> var pagina = 'categories.php<? echo '?cPath=' . $categories['parent_id'] .'&pID=' . $products_id.'&action=new_product'; ?>'; var segundos = 0; function redireccion() { document.location.href=pagina; } setTimeout("redireccion()",segundos); </script> Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 10, 2022 Share Posted September 10, 2022 The code has a function to redirect so you shouldn't need to use javascript. How is the actual link coded in the page? patrocine 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
patrocine Posted September 10, 2022 Author Share Posted September 10, 2022 I sent the question to the forum again and I don't know how to delete it Quote Link to comment Share on other sites More sharing options...
patrocine Posted September 10, 2022 Author Share Posted September 10, 2022 https://github.com/patrocine/OsCommerce-2.3.1-Classic-Empresa-3.0-Beta/blob/main/admin/categories.php I put it there in line 1728, when I look for a product, if I can't find the product, I open a new tab, to be able to add the new product and be able to return to the same point by closing. that's my plan Quote Link to comment Share on other sites More sharing options...
patrocine Posted September 10, 2022 Author Share Posted September 10, 2022 This code to redirect me to a new tab is possible? tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $new_parent_id . '&pID=' . $products_id.'&action=new_product')); Quote Link to comment Share on other sites More sharing options...
patrocine Posted September 10, 2022 Author Share Posted September 10, 2022 I need it to open in a new tab so I can close it and return me to the order Quote Link to comment Share on other sites More sharing options...
patrocine Posted September 11, 2022 Author Share Posted September 11, 2022 I already got the code <script language=javascript> window.open('categories.php<? echo '?cPath=' . $categories['parent_id'] . '&action=new_product&ean='.$codigobarras; ?>', '_blank'); </script> If the product does not exist, it automatically opens a new tab for me, I register, close the tab and invoice and invoice the client at the time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.