Re: [PHP] OT-Javascript Question
Jake McHenry wrote: I got everything working now. For some reason when I put it inside php, it wouldn't work with my variables with the numbers in front (1_Accounting_Unit) so I renamed all of them with the number at the end and they work fine. Jake The reason is here, notice the second paragraph: http://www.php.net/manual/en/language.variables.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT-Javascript Question
I got everything working now. For some reason when I put it inside php, it wouldn't work with my variables with the numbers in front (1_Accounting_Unit) so I renamed all of them with the number at the end and they work fine. Jake - Original Message - From: "Chuck Vose" <[EMAIL PROTECTED]> To: "Jake McHenry" <[EMAIL PROTECTED]> Sent: Thursday, November 06, 2003 3:30 PM Subject: Re: [PHP] OT-Javascript Question > You're fine to echo the whole thing, but remember that php happens > before the page is ever created (server side as opposed to client side) > whereas javascript happens after the page is finished loading on the > client computer. So the javascript can't run in the middle of a php > script because the php is being loaded on the server. > Chris has it right, you just have to plan on php inputting variable and > the like by embedding tags inside the javascript statements, > without the echo's. If you want to keep your echo's you may be having a > problem with ' and " s. Quotes unfortunately have meaning in both php > and javascript so you may have to pass the javascript quotes in with a \ > in front so the php's echo doesn't interpret them as an escape into > phpland. (by which I mean using \" and \' inside the echo's) > > Hope this helps you a little. > Love, > Chuck Vose > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT-Javascript Question
Will I have to change my entire page format? As I said, right now it's all being echo'd Jake - Original Message - From: "Chris Shiflett" <[EMAIL PROTECTED]> To: "Jake McHenry" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, November 06, 2003 12:16 PM Subject: Re: [PHP] OT-Javascript Question > --- Jake McHenry <[EMAIL PROTECTED]> wrote: > > > value="{$_SESSION['10_Accounting_Unit']}" > > onKeyUp="movefocus(10_Accounting_Unit,11_Accounting_Unit,1);"> > > This looks like you're trying to go in and out of PHP mode without using > , , etc. > > Try something like this: > > > > Hope that helps. > > Chris > > = > My Blog > http://shiflett.org/ > HTTP Developer's Handbook > http://httphandbook.org/ > RAMP Training Courses > http://www.nyphp.org/ramp > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT-Javascript Question
Yes, I'm not going in and out of php, the entire html output is php... echo << To: "Jake McHenry" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, November 06, 2003 12:16 PM Subject: Re: [PHP] OT-Javascript Question > --- Jake McHenry <[EMAIL PROTECTED]> wrote: > > > value="{$_SESSION['10_Accounting_Unit']}" > > onKeyUp="movefocus(10_Accounting_Unit,11_Accounting_Unit,1);"> > > This looks like you're trying to go in and out of PHP mode without using > , , etc. > > Try something like this: > > > > Hope that helps. > > Chris > > = > My Blog > http://shiflett.org/ > HTTP Developer's Handbook > http://httphandbook.org/ > RAMP Training Courses > http://www.nyphp.org/ramp > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT-Javascript Question
--- Jake McHenry <[EMAIL PROTECTED]> wrote: > value="{$_SESSION['10_Accounting_Unit']}" > onKeyUp="movefocus(10_Accounting_Unit,11_Accounting_Unit,1);"> This looks like you're trying to go in and out of PHP mode without using , , etc. Try something like this: Hope that helps. Chris = My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT-Javascript Question
Hi everyone, I know this is off topic, but I was hoping someone could explain this to me. It may be something with php, not sure though. I have this exact code on a regular html file and it works fine, copy paste to php file, and it doesn't work. *snip* and the movefocus function is basically justif 10_Accounting_Unit.length == 1 11_Accounting_Unit.focus; of course it's a function, and the variables are used.. etc.. but I was just wondering why this doesn't work on my php page. Thanks, Jake
Re: [PHP] OT - javascript question..
on 30/07/02 6:11 AM, Martin Clifford ([EMAIL PROTECTED]) wrote: > > echo "\n\n"; > > ?> > > Something similar will work fine. Wouldn't the $PHP_SELF be that of the popped-up window, not of the opener? Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT - javascript question..
Yes, this is way OT you can refer back to the original window with opener (or it may me window.opener) I used it once to change the location of the parent window with something like: show me something else I'm thinking opener.location.reload() or opener.location.reload(1) or opener.location.replace('my_url') might do the same job, but if you know what URL the script should refresh to (ie, load the same URL again), then the function above should work as is. Justin French on 30/07/02 6:00 AM, Kelly Meeks ([EMAIL PROTECTED]) wrote: > Sorry for the off topic post, but this is by far the most experienced list > I've found. > > I've got a php page that show all the .gif and .jpeg files in an directory via > a form based drop down menu. > > On the same page, I've also got a link that opens a new window, and allows the > user to upload an image to that same directory. > > Is there any way, when the upload window is closed, to force a reload of the > other page, so the dynamic pop-up reflects the recent upload? > > Thanks in advance, > > Kelly > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT - javascript question..
\n\n"; ?> Something similar will work fine. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ >>> Kelly Meeks <[EMAIL PROTECTED]> 07/29/02 04:00PM >>> Sorry for the off topic post, but this is by far the most experienced list I've found. I've got a php page that show all the .gif and .jpeg files in an directory via a form based drop down menu. On the same page, I've also got a link that opens a new window, and allows the user to upload an image to that same directory. Is there any way, when the upload window is closed, to force a reload of the other page, so the dynamic pop-up reflects the recent upload? Thanks in advance, Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT - javascript question..
Sorry for the off topic post, but this is by far the most experienced list I've found. I've got a php page that show all the .gif and .jpeg files in an directory via a form based drop down menu. On the same page, I've also got a link that opens a new window, and allows the user to upload an image to that same directory. Is there any way, when the upload window is closed, to force a reload of the other page, so the dynamic pop-up reflects the recent upload? Thanks in advance, Kelly