Code: Select all
URL$ = "index.html?var=6"
BROWSER "n" URL URL$ AT 0,0 SIZE SCREEN_WIDTH(), SCREEN_HEIGHT()
Code: Select all
PRINT "URL: " & BROWSER_TEXT$("n", document.baseURI)
What can I do!?
Code: Select all
URL$ = "index.html?var=6"
BROWSER "n" URL URL$ AT 0,0 SIZE SCREEN_WIDTH(), SCREEN_HEIGHT()
Code: Select all
PRINT "URL: " & BROWSER_TEXT$("n", document.baseURI)
Code: Select all
URL$ = "http://kibernetik.pro/forum/viewtopic.php?f=26&t=1971" /* this forum */
BROWSER "n" URL URL$ AT 0,0 SIZE SCREEN_WIDTH(), SCREEN_HEIGHT()
Code: Select all
URL1$ = "test.html?var=6"
BROWSER 1 URL URL1$ AT 0,500 SIZE SCREEN_WIDTH(), 100
URL2$ = "http://kibernetik.pro/forum/viewtopic.php?f=26&t=1974"
BROWSER 2 URL URL2$ AT 0,650 SIZE SCREEN_WIDTH(), 100
PRINT "URL1$:"
PRINT url1$
PRINT
PRINT "Browser 1 URL:"
PRINT "" & BROWSER_TEXT$("1", "document.baseURI")
PRINT
PRINT
PRINT "URL2$: "
PRINT url2$
PRINT
PRINT "Browser 2 URL:"
PRINT BROWSER_TEXT$("2", "document.baseURI")
Code: Select all
' CGIScript.sb - This program will execute your PERL CGI Script and produce
' a detailed error report. Useful in catching major issues
' with your script and/or network.
' NOTE: Program will also work on PHP, as it will also return a response and
' status code that this program will interpret.
'
' A file accompanies this program with all the details from the RFC2616
' document to display all the status code syntax messages.
'
' *** /DATA/HTTPErrorDescription.file ***
' *** DO NOT MODIFY THAT FILE AT ALL - PROGRAM INDEXES INTO THIS FILE ***
'
OPTION BASE 1
' Sample variables to hold parameters to pass to CGI Script
PC$="passcode123"
FL$="/DATA/VM-SARA_20061010.txt"
' URL goes into U$. Below shows how to pass params with quotes.
' Replace "yourserver.com" with the name of the server your script resides
REM U$ ="http://www.yourserver.com/cgi-bin/uplink.pl?a="&CHR$(34)&FL$&CHR$(34)
REM U$="http://www.yourserver.com/cgi-bin/weather.cgi"
U$="http://www.ebay.com/itm/Apple-IMac-27-inch-Desktop-DCPN241KFQPG-Late-2013/152608345572?_trksid=p2047675.c100009.m1982&_trkparms=aid%3D888007%26algo%3DDISC.MBE%26ao%3D1%26asc%3D45041%26meid%3D1322a27812c344dba91444acbe840aa2%26pid%3D100009%26rk%3D1%26rkt%3D2%26sd%3D263046127574"
A$=""
H$(1) = "content-type:text/html"
H$(2) = "content-length:"&LEN(A$)
PRINT "CGI Script Execute/Debug"!PRINT!PRINT
PRINT "URL to execute: ";U$
' Execute CGI Script and Check for Error Responses
HTTP U$ HEADER H$ POST A$
E$=HTTP_ERROR$
R$=HTTP_RESPONSE$()
S$=HTTP_STATUS()
PRINT
PRINT " HTTP Error: ";E$
PRINT " HTTP Status: ";S$
'*** PRINT "HTTP Response: ";R$
' IF HTTP_STATUS is not 200, execute Error Reporting
IF VAL(S$) > 200 THEN
HTTP_ERROR(S$)
PRINT
PRINT
PRINT!PRINT MSG$
PRINT!PRINT
I=1
DO
PRINT ERR_SYNTAX$(I)
I=I+1
UNTIL ERR_SYNTAX$(I) = ""
GOTO endprog
ELSE
IF S$="0" OR S$="" THEN
PRINT
PRINT
PRINT!PRINT "Your script was not parsed due to an unidentified error."
PRINT "Please check your CGI Script as this error is either a parsing"
PRINT "or header error."
GOTO endprog
ENDIF
ENDIF
PRINT!PRINT "Program ended normally"
endprog:
STOP
DEF HTTP_ERROR(S$)
'------------------------------------------------------------------------
' Retrieve message and URL to search for error message.
' If Status=200, then set message to OK - Normal End of Process
' Otherwise, build the error message to show code, message, document URL
' and section to search for resolution.
'
URL$="http://www.ietf.org/rfc/rfc2616.txt"
ERR_DESC$="/DATA/HTTPErrorDescription.txt"
Tempstr$=""
S=S$
SC=40
ES=42
.MSG$=""
DIM IX(5)!IX(1)=1!IX(2)=3!IX(3)=10!IX(4)=17!IX(5)=35
DIM ERR_S$(SC),ERR_L$(SC),ERR_M$(SC), E_Section$(ES),E_Start(ES),E_End(ES)
DIM .ERR_SYNTAX$(100)
FOR I=1 TO SC
READ ERR_S$(I),ERR_L$(I),ERR_M$(I)
NEXT I
FOR I=1 TO ES
READ E_Section$(I),E_Start(I),E_End(I)
NEXT I
' Find the Error Message
S1=VAL(LEFT$(S$,1))
S=IX(S1)
FOR I=S TO SC
IF ERR_S$(I)=S$ THEN
IF S$="200" THEN
.MSG$="OK: "&S$&" – Normal End of Process"
I=SC
ELSE
.MSG$="ERROR: "&S$&" – "&ERR_M$(I)&" – Description below from "&ERR_L$(I)&" in "&URL$
ERR_Section$=ERR_L$(I)
I=SC
ENDIF
ENDIF
NEXT I
Section$=RIGHT$(ERR_Section$,7)
IF LEFT$(Section$,1) = " " THEN Section$=RIGHT$(Section$,6)
SLen=LEN(Section$)
FOR I=1 TO ES
E_Section$(I)=LEFT$(E_Section$(I),SLen)
IF Section$=E_Section$(I) THEN
Start_Line=E_Start(I)!End_Line=E_End(I)
FOR X=1 TO Start_Line
FILE ERR_DESC$ READLINE Tempstr$
NEXT X
IF X-1=Start_Line THEN
.ERR_SYNTAX$(1)=Tempstr$
Z=1
Start_Line=Start_Line+1
FOR Y=Start_Line TO End_Line
Z=Z+1
FILE ERR_DESC$ READLINE Tempstr$
.ERR_SYNTAX$(Z)=Tempstr$
NEXT Y
ENDIF
ENDIF
NEXT I
'---------------------------------------------------------------------------
' ERROR MESSAGE DATA
DATA "100","Section 10.1.1","CONTINUE"
DATA "101","Section 10.1.2","Switching Protocols"
DATA "200","Section 10.2.1","OK"
DATA "201","Section 10.2.2","Created"
DATA "202","Section 10.2.3","Accepted"
DATA "203","Section 10.2.4","Non-Authoritative Information"
DATA "204","Section 10.2.5","No Content"
DATA "205","Section 10.2.6","RESET Content"
DATA "206","Section 10.2.7","Partial Content"
DATA "300","Section 10.3.1","Multiple Choices"
DATA "301","Section 10.3.2","Moved Permanently"
DATA "302","Section 10.3.3","Found"
DATA "303","Section 10.3.4","See Other"
DATA "304","Section 10.3.5","NOT Modified"
DATA "305","Section 10.3.6","Use Proxy"
DATA "307","Section 10.3.8","Temporary Redirect"
DATA "400","Section 10.4.1","Bad Request"
DATA "401","Section 10.4.2","Unauthorized"
DATA "402","Section 10.4.3","Payment Required"
DATA "403","Section 10.4.4","Forbidden"
DATA "404","Section 10.4.5","NOT Found"
DATA "405","Section 10.4.6","Method NOT Allowed"
DATA "406","Section 10.4.7","NOT Acceptable"
DATA "407","Section 10.4.8","Proxy Authentication Required"
DATA "408","Section 10.4.9","Request TIME-out"
DATA "409","Section 10.4.10","Conflict"
DATA "410","Section 10.4.11","Gone"
DATA "411","Section 10.4.12","Length Required"
DATA "412","Section 10.4.13","Precondition Failed"
DATA "413","Section 10.4.14","Request Entity Too Large"
DATA "414","Section 10.4.15","Request-URI Too Large"
DATA "415","Section 10.4.16","Unsupported Media Type"
DATA "416","Section 10.4.17","Requested range NOT satisfiable"
DATA "417","Section 10.4.18","Expectation Failed"
DATA "500","Section 10.5.1","Internal Server Error"
DATA "501","Section 10.5.2","NOT Implemented"
DATA "502","Section 10.5.3","Bad Gateway"
DATA "503","Section 10.5.4","Service Unavailable"
DATA "504","Section 10.5.5","Gateway TIME-out"
DATA "505","Section 10.5.6","HTTP Version NOT supported"
' 43 DATA Entries – Section #,START LINE #, END LINE # (Index File)
DATA "10.1.1",1,10
DATA "10.1.2",11,24
DATA "10.2.1",25,39
DATA "10.2.2",40,56
DATA "10.2.3",57,72
DATA "10.2.4",73,82
DATA "10.2.5",83,99
DATA "10.2.6",100,107
DATA "10.2.7",108,147
DATA "10.3.1",148,168
DATA "10.3.2",169,190
DATA "10.3.3",191,215
DATA "10.3.4",216,234
DATA "10.3.5",235,271
DATA "10.3.6",272,281
DATA "10.3.7",282,285
DATA "10.3.8",286,305
DATA "10.4.1",306,310
DATA "10.4.2",311,325
DATA "10.4.3",326,328
DATA "10.4.4",329,337
DATA "10.4.5",338,347
DATA "10.4.6",348,353
DATA "10.4.7",354,377
DATA "10.4.8",378,387
DATA "10.4.9",388,392
DATA "10.4.10",393,411
DATA "10.4.11",412,430
DATA "10.4.12",431,436
DATA "10.4.13",437,443
DATA "10.4.14",444,453
DATA "10.4.15",454,464
DATA "10.4.16",465,469
DATA "10.4.17",470,484
DATA "10.4.18",485,490
DATA "10.5.1",491,494
DATA "10.5.2",495,500
DATA "10.5.3",501,505
DATA "10.5.4",506,517
DATA "10.5.5",518,526
DATA "10.5.6",527,535
DATA "10.9.9",999,999
ENDDEF
Maybe we have HTML experts here who can comment.the_wesley_watkins wrote: ↑Mon Sep 18, 2017 4:45 pmRegardless, I guess my question is just how can I load a local HTML file into a browser and include variables in the URL?
When my application starts, I need to pass a url variable to the url because I have some local client side javascript that uses the variable.
Code: Select all
BROWSER "n" URL "index.html?coins=24" AT 0,0 SIZE 500,500
Code: Select all
BROWSER_TEXT("n", "document.baseURI")