• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[Rebol School] REBOL School

afsanehsamim
23-Nov-2012
[1519]
i want show in neat table
BrianH
23-Nov-2012
[1520]
show
 in this case means formatting your own HTML.
afsanehsamim
23-Nov-2012
[1521x3]
in GUI result should not be like blobks, correct?
you mean i should put my gui sfter print
?
Ladislav
23-Nov-2012
[1524]
then you may need some formatting like:

print "<table>"
foreach row result [print "tr" foreach cell row [print "td" ...

, i.e. print out a HTML table specification
afsanehsamim
23-Nov-2012
[1525]
okkkk
Ladislav
23-Nov-2012
[1526]
err., I meant print "<tr>" in there or print "<td>, etc...
afsanehsamim
23-Nov-2012
[1527x3]
plz tell me how can i use if condition ?
i could get results on web page but there is a problem...in each 
row of table i can see both values(correct and user value )...i want 
use if condition which shows only  the correct result
plzzzzz help
Ladislav
23-Nov-2012
[1530x4]
Example:

    print either a < 0 ["a is small"] ["a is big"]
does that help?
or just

    if a < 0 [print "a is small"]
(otherwise nothing is printed)
afsanehsamim
23-Nov-2012
[1534x2]
i need if condition for situation which two values are same
let me try
Ladislav
23-Nov-2012
[1536]
you mean like this?

    if a =  0 [print "a is zero"]
afsanehsamim
23-Nov-2012
[1537x3]
in my situation what should i write insted of 0?
this is my code:insert db["select data.oneone,data1.oneone from data 
LEFT JOIN data1 ON data.oneone=data1.oneone"]
results: copy db 
if ...
after if what should i write?
Ladislav
23-Nov-2012
[1540]
You have to tell what are you comparing with what.
afsanehsamim
23-Nov-2012
[1541]
i am comparing values of two tables
Ladislav
23-Nov-2012
[1542]
Yes, but you obtained your RESULT. Now, you are processing the RESULT 
block, I assume?
afsanehsamim
23-Nov-2012
[1543x3]
i want to say if they are same print otherwise alert to user
yes
correct
Ladislav
23-Nov-2012
[1546x3]
So, you are doing something like:

foreach record results [
    if first record = second record [...]
]
Is that it?
correcting myself:

foreach record results [
    if (first record) = (second record) [...]
]
afsanehsamim
23-Nov-2012
[1549]
yes ,your right ... :) now if i want send meesage to user that value 
is correct or no ...should i use alert?
Ladislav
23-Nov-2012
[1550x2]
This is more likely the code you might use:

foreach record results [

    either (first record) = (second record) [print ["they are equal:" 
    first record]] [print ["Alert!"]]
]
ALERT is not meant for CGI, it is a GUI function.
afsanehsamim
23-Nov-2012
[1552x5]
yes
what are you suggesting in GUI?
sorry
CGI
?
Ladislav
23-Nov-2012
[1557x2]
So, no, if you are creating a CGI script, don't use ALERT
For CGI? I do not know, how about some blinking text, or red text, 
or, I do not know what people use...
afsanehsamim
23-Nov-2012
[1559]
okay...anyway tnx a lot for helping me.
Endo
11-Dec-2012
[1560]
I execute the following line and capture the HTTP packets using Capsa 
(or wireshark) I don't see any header information in the packets 
sent:
read/custom http://moldibi.com[header "X-hello:1"]


but when I run curl with same parameters, I can see the extra header 
information,
curl http://moldibi.com-H "X-hello:1"


does it mean I cannot add extra header information using REBOL or 
am I doing something wrong? (I'm using R2/View)
GrahamC
11-Dec-2012
[1561x4]
Use the 'header directive :)
oh .. you are!
http://www.compkarori.co.nz:8000/Protocols/Http

 read URL [ header [ Cookie: "authtoken=anotherfoo" ]]
Header expects a block
Endo
11-Dec-2012
[1565]
in default HTTP protocol or your version?
GrahamC
11-Dec-2012
[1566]
default http
Endo
11-Dec-2012
[1567x2]
oh yes!!! now I can see when trace/net on.
Thanks a lot!! Tomorrow I'll try with salesforce, I hope this is 
the only problem.