Well, I thought you need to define the javascript functions in the HEAD of the HTML page, and as the HEAD and the start of BODY is done in some other php program which includes the one in question, it is not possible to make a function. On your suggestion I tried to put the javascript function in the BODy, right before the A HREF I am having problems with, but that does not work either. thanks, Prachi. R'twick Niceorgaw <[EMAIL PROTECTED]> wrote: why not create a javascript function through php like
echo ""; echo "function openwindow () {"; echo "window.open (\"addfossilpage.php?me=$folder_id\",\"width=430\",\"height=450\");"; echo "}"; echo " "; echo 'Open New Window'; ----- Original Message ----- From: "prachi shroff" To: "R'twick Niceorgaw" Cc: "php php" Sent: Wednesday, June 05, 2002 10:00 AM Subject: Re: [PHP-WIN] newbie problem with quotes > > Thank You for your prompt reply. Well, I have already tried these two options but somehow they dont work. When I click on the hyperlink created by this line, the link just says > javascript:window.open( > Why would that happen? It is ok with the first quote, but it ignores everything after the second one. > thanks, > Prachi. > > R'twick Niceorgaw wrote: echo " href=\"javascript:window.open(\"addfossilpage.php?me=$folder_id\",\"width=43 > 0\",\"height=450\" )\">"; > > OR > > echo ' . " ?,?width='430","height=450"' )?>'; > > > > ----- Original Message ----- > From: "prachi shroff" > > To: "php php" > > Sent: Wednesday, June 05, 2002 9:38 AM > Subject: [PHP-WIN] newbie problem with quotes > > > > > > Hi! > > > > I am a newcomer to the list and am also new to working with PHP. My > question might seem really silly to you, but I would really appreaciate any > help. > > > > I am trying to fit the following line of HTML in the PHP echo or print > statements, because this is somewhere in the middle of a larger php program. > I cannot separate the javascript thing into a different javascript function > and call the function because the TITLE and BODY of this HTML page start in > another php program and declaring a javascript function there does not help, > as the call here does not recognize that function. > > > > The problem with putting the following line in the echo statement is the > quotes. Because there are a lot of instances of quotes which I need PHP to > ignore. Putting slashes manually or using addslashes does not help. Could > anyone please explain the working of single (') and double (") quotes in PHP > or suggest a solution to my problem? > > > > href="javascript:window.open("addfossilpage.php?me=$folder_id","width=430"," > height=450" > > )"> > > > > So, I want the line to be like: > > > > echo '","width=430","height=450" > > )">' > > > > and ask PHP to recognize only the single quotes. And $folder_id is a PHP > variable. > > > > thanks, > > > > Prachi. > > > > > > > > --------------------------------- > > Do You Yahoo!? > > Sign-up for Video Highlights of 2002 FIFA World Cup > > > > > --------------------------------- > Do You Yahoo!? > Sign-up for Video Highlights of 2002 FIFA World Cup --------------------------------- Do You Yahoo!? Sign-up for Video Highlights of 2002 FIFA World Cup