PDA

Click to See Complete Forum and Search --> : help


cocoa
Dec 12th, 2003, 05:03 AM
I would like to thank you in advance for your help in this matter:

#1: I have no clue about php. However, I want to learn it, because it seems like it’s the way to go now days. I’m not sure, but hell I’m willing to give it a try. Okay, if you follow this link, it’s goes to amazon.com. http://www.amazon.com/exec/obidos/ASIN/1861002963/thebesite/102-3350295-5142529 . I’m not sure which books to get to learn how to do php for web design or mysql Can you please assist in this matter?


#2: Now on to my problem. If you go to http://www.urspot.net (which is my web site), and then click on Shopping cart. Go down to the bottom where the information box is. In that box I would like to but another link (or what ever you want to call it). I’m currently following their example on how to add another link, however, it’s going to end up in a php page. Anyway, once I get the link, and the user clicks on it, I would like for a popup window to come up, say 50 x 60. Once they read everything, they will have to fill out an form (from FormMail.cgi). Once they fill out the form, a thank you page will replace the form page. Once they read the thank you page, then I would like either a button on the bottom that says “close window” or have the user click the “x” to close the window, but not leave the shopping cart.


Dan J. Regalia

kows
Dec 12th, 2003, 10:39 AM
You can't make popup windows in PHP, you'll need to do it in JavaScript.

You really aren't good at explaining what you want.. all you say you want is a popup window that is 50*60px that has some kind of reading crap and a formmail script in it..

anyway; if you don't yet know HTML, i think you should stop trying to learn PHP and learn it first.

to create a link to open a new window using javascript (actually stolen off of your front page):

<!-- THIS GOES INTO YOUR <HEAD> TAGS -->
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
// End -->
</script>

<!-- THIS GOES TO WHEREVER YOUR LINK IS GOING TO BE -->
<a href="link" onClick="NewWindow(this.href,'name','500','500','yes');return false;">This is a link</a><br>

The javascript function "NewWindow" is explained below:
NewWindow(URL, NAME, W, H, SCROLL);

URL - This is the URL of the page you are opening in the new window.

NAME - This is the name of the window you will opening. It will show as something like "Name - Microsoft Internet Explorer" (if you are using IE, of course)

W and H - W is the width of the new window you are opening. H is the height of the new window you are opening.

SCROLL - This is whether or not you want scrollbars enabled within the window. The two acceptable options are "yes" or "no", and I also think there is an "auto" option that will disable the scrollbar unless there is something to scroll.

You can execute the function inside of an onClick event like this:

//this will open www.complex-sys.com in a 1024*768 window that has no scrollbars
<input onClick="NewWindow('http://www.complex-sys.com', 'Complex Systems', 1024, 768, 'no');">