php-windows Digest 11 Feb 2001 20:31:19 -0000 Issue 440 Topics (messages 5504 through 5506): PHP 'include' function 5504 by: John Morrison 5505 by: Alain Samoun cash in with your own online casino 5506 by: molkr5n55fs6.hotmail.com Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
Hi. I have just discovered server side scripting and am trying to get to grips with it using PHP4 with Xitami on Windows Me. Straight away, on my first project, it looks as though I have found a problem I am not going to solve without help. I have an HTML form with an Option Select drop down list which displays choices of which JPEG file to load into an <IMG> picturebox. After selecting an option, clicking a button runs a Javascript function which displays the image, changing the previous picture. So far so good, but here is the problem. I also wish to display a caption and descriptive paragraph or two in an adjacent scrollable <TEXTAREA>. I thought a good way would be to have a text file for each picture on the server and display the appropriate one as required. But, so far, I have not managed to find any file operation capabilities in Javascript. My next thought was to use the PHP "include" function, or some other file reading technique, but I have not found a satisfactory way to pass the filename to PHP. A Javascript variable naturally cannot be passed to a PHP function so I had Javascript copy the file pathname to the TextArea with the hope of getting my include function to pick it up from there. But I have not succeeded. PHP does not like the dots in "$captionpath = Document.FormName.TextAreaName.Value;" and simply removes them. So I abandoned this and tried doing it completely outside of Javascript. I have tried everything I can think of including a rigmarole which involved the self-submit method <FORM METHOD="POST" ACTION="<?php print('$php_self'); ?>">. Without going into detail, I did manage to display the caption but I had other problems which made this avenue seem unproductive, so I did not persue it. For example, instead of just a clean change of the IMG and TextArea contents the whole page was reloaded from the server and repositioned at "Top of Page". Apart from the slowness of this, it looked massively clumsy. Am I missing the obvious?? Regards John Morrison
Why do you need javascript? Scenario: 1 User selects jpeg image in list 2 User press submit button 3 Server receives selection and download jpeg with its text in html Would that work for you? Alain On Sun, Feb 11, 2001 at 02:19:38PM +0000, John Morrison wrote: > Hi. > > I have just discovered server side scripting and am trying > to get to grips with it using PHP4 with Xitami on Windows > Me. Straight away, on my first project, it looks as though > I have found a problem I am not going to solve without > help. > > I have an HTML form with an Option Select drop down list > which displays choices of which JPEG file to load into an > <IMG> picturebox. After selecting an option, clicking a > button runs a Javascript function which displays the image, > changing the previous picture. So far so good, but here is > the problem. I also wish to display a caption and > descriptive paragraph or two in an adjacent scrollable > <TEXTAREA>. > > I thought a good way would be to have a text file for each > picture on the server and display the appropriate one as > required. But, so far, I have not managed to find any file > operation capabilities in Javascript. > > My next thought was to use the PHP "include" function, or > some other file reading technique, but I have not found a > satisfactory way to pass the filename to PHP. A Javascript > variable naturally cannot be passed to a PHP function so I > had Javascript copy the file pathname to the TextArea with > the hope of getting my include function to pick it up from > there. But I have not succeeded. PHP does not like the > dots in "$captionpath = > Document.FormName.TextAreaName.Value;" and simply removes > them. > > So I abandoned this and tried doing it completely outside > of Javascript. I have tried everything I can think of > including a rigmarole which involved the self-submit method > <FORM METHOD="POST" ACTION="<?php print('$php_self'); ?>">. > Without going into detail, I did manage to display the > caption but I had other problems which made this avenue > seem unproductive, so I did not persue it. For example, > instead of just a clean change of the IMG and TextArea > contents the whole page was reloaded from the server and > repositioned at "Top of Page". Apart from the slowness of > this, it looked massively clumsy. > > Am I missing the obvious?? > > Regards > John Morrison > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
Fortunes are being made online everyday! Now is your chance to become involved with one of the most explosive Internet industries...Internet Gaming! But wait there is much more...LIVE Webcast Lotto and Bingo, International Sports Betting, and Virtual Stock Trading. We are PLAYING GAMES, HAVING FUN AND MAKING MONEY! How are we making money? We do it with the most RED HOT compensation plan ever seen in the industry...our NO-FLUSH Binary with incredible matching bonuses.Anyone can do this! You could be earning everytime someone you introduce plays a game. This is a Worldwide opportunity and it is EXPLOSIVE! Check it out at: http://frdrt.pokeadot.com To be removed send an email to: [EMAIL PROTECTED]