Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Creating Pop-Up Windows from New Page


dandelion

Recommended Posts

Hi,

 

I would like to create popup windows from my new Aromatherapy Recipes Page. The idea is that this new page is a <UL> list of recipes that when clicked on opens a cute little recipe card - a print this page button would be great too!

 

I know how to do this in javascript in html but I'm such a newbie I can't do it here!

 

My Webpage

 

I really appreciate all your help and feedback THANKS!

 

Ruth

Link to comment
Share on other sites

As you have a new Recipes page I am assuming that this is a static page. In which case go to the page at the root level and insert your javascript code in the head section there, and then in the page of the same name at the includes/languages/english/ level include the code that opens the pop-up when clicked.

 

Vger

Link to comment
Share on other sites

Hi,

 

I would like to create popup windows from my new Aromatherapy Recipes Page.  The idea is that this new page is a <UL> list of recipes that when clicked on opens a cute little recipe card - a print this page button would be great too!

 

I know how to do this in javascript in html but I'm such a newbie I can't do it here!

 

My Webpage

 

I really appreciate all your help and feedback  THANKS!

 

Ruth

You could try something like this.

<a href= \"/catalog/images/cute-little-recipe-card.html\" target=\"_blank\"><B><u>Click here for a list of our recipes</u></B></a>

( WARNING )

I think I know what Im talking about.

BACK UP BACK UP BACK UP BACK UP

Link to comment
Share on other sites

As you have a new Recipes page I am assuming that this is a static page.  In which case go to the page at the root level and insert your javascript code in the head section there, and then in the page of the same name at the includes/languages/english/ level include the code that opens the pop-up when clicked.

 

Vger

I can't get it to work????

 

I put this code in the head of the catalog/recipes.php page

<script language="JavaScript">
<!--
function open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
 toolbar_str = toolbar ? 'yes' : 'no';
 menubar_str = menubar ? 'yes' : 'no';
 statusbar_str = statusbar ? 'yes' : 'no';
 scrollbar_str = scrollbar ? 'yes' : 'no';
 resizable_str = resizable ? 'yes' : 'no';
 window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

// -->
</script>

 

And then in the includes/languages/english/recipes.php I put this link

 

<ul>
 <li><a href="javascript:open_window('win1', 'catalog/recipes/recipe1.htm', 100, 100, 500, 720, 0, 0, 0, 1, 0);">Relaxing Bath</a></li>

 

It works in an html page. But I get the error

Parse error: parse error, unexpected T_STRING in /var/www/html/catalog/includes/languages/english/recipes.php on line 19

this is the line where the Relaxing Bath li code is.

 

Any help would be great!

 

Thanks

 

Ruth

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...