Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

cheyenne and RSP

 [1/11] from: fergus4::bellatlantic::net at: 13-Jan-2007 14:11


I've been using Cheyenne to host a small website from home. It's great! Simple set up, no configuration for RSP, fast CGI already set up. My question is on RSP. I've got some simple functions working but some of the more complicated stuff I do not know where to look for info on. The RSP document I found is minimal. I'm trying to get a web form to fill with info from a database based on the name selected from a droplist. Sort of a phone book application with a drop list to pick the name. I do not know how to "read the selected name and insert thme into the form without exiting the page to CGI a new page. Is it possible. I've seen similar things done in Java Script. -alan

 [2/11] from: compkarori:g:mail at: 13-Jan-2007 21:54


Alan You have the Rebol interpreter available between the <% .. %> so all you need to do is establish the database connection,grab the data into a variable, and then print it to the screen. The html stuff gets interspersed with the actual data you are printing. I haven't used the encapped version of Cheyenne, but in the source code one you can open the database connection, and then use that globally so you don't have to keep opening and closing database connections. On 1/14/07, Alan <fergus4-bellatlantic.net> wrote:
> I've been using Cheyenne to host a small website from home. It's great! > Simple set up, no configuration for RSP, fast CGI already set up.
<<quoted lines omitted: 11>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.synapsedirect.com Synapse-EMR - innovative electronic medical records system

 [3/11] from: charles:jwavro at: 13-Jan-2007 15:11


I don't know if RSP is different than other CGI languages, but the typical way to do this is with javascript. Use the select box's onChange event to populate the fields with the data that you write to your HTML with RSP. If you view the source of this page ( http://jwavro.com/services.php ) , you will see the hoods array is generated by a scripting language, and then just embedded in the page, and uses the onChange event to trigger onRegionChange , which populates the fields. Charlie Alan wrote:

 [4/11] from: pwawood::gmail::com at: 14-Jan-2007 8:45


Alan If the database is on the "server", as I'm guessing, you can avoid using a new page to access a CGI by using JavaScript and the XMLHttpRequest function built-in to the browser. (This is the core of the so called Ajax). Basically, you can use JavaScript to get the data from a CGI and then fill the web form without leaving the page. If you're not familiar with Ajax, there is a tutorial at http://www.w3schools.com/ajax/default.asp Regards Peter On Sunday, January 14, 2007, at 03:11 am, Alan wrote:

 [5/11] from: fergus4:bellatlantic at: 13-Jan-2007 22:35


I thought the point of Rebol server pages (RSP) was to avoid the need to use other tools like java script. I know rebol and I do not want to lewarn java script if I can avoid it. Or do I have the wrong idea about the uses of rsp. can RSP access these XMLHttpRequest functions the Java script does? -Alan

 [6/11] from: compkarori::gmail at: 14-Jan-2007 6:00


Alan, Ignore those guys ... they're still hung over from New Year! They're talking about client side scripting, but RSP is server side scripting to create dynamic html. If you didn't read my response, then it's in the rebol.org archive. I built a server application using Cheyenne that dynamically populates the mailbox names etc using Firebird and ODBC. On 1/14/07, Alan <fergus4-bellatlantic.net> wrote:
> I thought the point of Rebol server pages (RSP) was to avoid the need to use > other tools like java script. I know rebol and I do not want to lewarn java
<<quoted lines omitted: 61>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.synapsedirect.com Synapse-EMR - innovative electronic medical records system

 [7/11] from: fergus4:bellatlantic at: 13-Jan-2007 22:43


I like being able to open the db connection globally. That will help with some ideas down the road. Regarding RSP, I've been able to use it with success its only when I try to do certain tings that I can not figue how to impliment it. I see Java Scripts access data from a page and use it. For example, access the contents of an input field and act accordingly. Part of my problem is I've only built the most basic of web pages. My only use of javascript was cut and paste stuff so I do not really know how it works in a web page. -Alan

 [8/11] from: compkarori:gm:ail at: 14-Jan-2007 6:00


There's a big difference between Javascript and RSP. RSP is like PHP and other languages that dynamically build pages. Javascript modifies an existing page in some functionality. So, they are complementary. You don't need to learn Javascript in order to leverage RSP. You could conceivably use RSP to generate Javascript for your web pages. On 1/14/07, Alan <fergus4-bellatlantic.net> wrote:
> I like being able to open the db connection globally. That will help with > some ideas down the road.
<<quoted lines omitted: 66>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.synapsedirect.com Synapse-EMR - innovative electronic medical records system

 [9/11] from: fergus4:bellatlantic at: 13-Jan-2007 23:04


I appreciate your help and patience! Thanks. I just do not see how I can read the result of a HTML selection menu using RSP. Can I slip rebol code into the "onchange" html function to trigger and RSP function?

 [10/11] from: compkarori:gma:il at: 14-Jan-2007 6:00


Ooops ... looks like I was the one confused! I just re-read your post. What you could do is use RSP to generate the page, *and* the javascript necessary for the selection to trigger filling the choices available based upon some menu selection. You have a combination of both server and client side scripting here. On 1/14/07, Alan <fergus4-bellatlantic.net> wrote:
> I appreciate your help and patience! Thanks. > I just do not see how I can read the result of a HTML selection menu using
<<quoted lines omitted: 113>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.synapsedirect.com Synapse-EMR - innovative electronic medical records system

 [11/11] from: fergus4::bellatlantic::net at: 13-Jan-2007 23:29


I think I discovered one of my problems... I was sending data through CGI to a rebol "CGI" script called "script".r or script .cgi and the RSP stuff was of course not working because the suffix was not ".rsp". I did not think to use another .rsp page as the destination of the cgi output. I was hungup on the idea of a script getting the data. I see how to do it as you describe I just thought there was a way to do all the work on the same .rsp page.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted