Hello;
I have added a couple more popup windows into my site and want to add one in
to popup the first times someone comes to the site to display specials.
I have gotten it working but I don't know how to make the PHP code that
points to a screen work in the popup module which is plain HTML.
Here is the PHP code for the help screen.
/*Add Help link*/
if(file_exists(APPLICATION_ROOT . "/modules/help/$SCREEN"))
{
print("<A HREF=\"".ScreenURL("help", FALSE, array('topic'=>$SCREEN))."\"
");
if((GENERATE_BROWSER_CONSTANTS) AND (BROWSER_JAVASCRIPTOK))
{
print("onClick=\"popuphelp(this.href); return false;\" ");
}
print("TARGET=\"help\">");
print(L_NAV_SIDE_HELP);
}
And here is what I have for the specials. How do I make the var
popup="http... look and find a screen in the screens directory?
<!--- Load Pop-up code for specials pop-up window --->
var onoff="off"
function openspecials(){
var popurl="http://iceprime/php/front_to_back/htdocs/specials.html"
winpops=window.open(popurl,"","width=400,height=338,scrollbars,resizable,")
}
function get_cookie(Name) {
file://This function is used only if you had selected popup to load ONCE per
session
file://You may remove this function if variable "onoff" above is set to
"off"
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadspecials(){
if (onoff=="on"){
if (get_cookie('alreadypopped')==''){
openspecials()
document.cookie="alreadypopped=yes"
}
}
else
openspecials()
}
loadspecials()
Thanks
Shawn
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Site: http://www.working-dogs.com/freetrade/
Problems?: [EMAIL PROTECTED]