Clear an IFRAME

new BookmarkLockedFalling
metro
Full Member
***

metro Avatar

Posts: 207

Post by metro on Apr 22, 2017 19:36:48 GMT -5

I may have exhausted my limit of dumb question but I'll try one more
this code is a cut down version of my main program
I cannot understand why I cant get past the iframe.
if I rem out the two lines for the iframe the program will drop through to [capture] once the button is clicked
but leave the two line in and the program drops to a new login to Runbasic
any help appreciated
if Platform$="unix" then
slash$="/"
else
slash$="\"
end if

global data2save$
dim Opt$(1000)
Month$="May"
Year$="2017"
print "right click web page"
print "choose 'select all'"
print " right click again"
print "choose copy"
button #step1, "After Copy Press here", [capture]
print:print

url2find$="http://www.asx.com.au/asx/markets/optionPrices.do?by=underlyingCode&underlyingCode=xjo&expiryDate="+Month$+"+"+Year$+"&optionType=B"
html "<div id='IFR' ALIGN=RIGHT><IFRAME SRC="+url2find$+" WIDTH=80% HEIGHT=600 ></div>"


print

wait

[capture]
CLS
button #doStuff, "Paste data then press Button ", [savethefile]
textarea #t, "",200,60
#t setfocus()
wait

[savethefile]
data2save$ = #t contents$()
'call tableselect ' extract table info and create csv format for Sqlite
#t text("")
CLS

open DefaultDir$ + slash$+"public"+slash$+"test.txt" for output as #f
print #f, data2save$

close #f
wait
Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Last Edit: Apr 23, 2017 9:30:35 GMT -5 by meerkat
metro
Full Member
***

metro Avatar

Posts: 207

Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
Carl Gundel - admin
Administrator
*****

Carl Gundel - admin Avatar

Posts: 550

Post by Carl Gundel - admin on Apr 24, 2017 7:45:13 GMT -5

metro Avatar
Thanks again Dan,
I cannot believe I didn't find that myself.
I spent hours trying all sorts of ways around the problem
(more frustrating than loosing my shirt at the casino) ;)

Laurie

It would be really useful if Run BASIC could detect badly formed HTML, but it would be quite a feat.

-Carl
metro
Full Member
***

metro Avatar

Posts: 207

Post by metro on Apr 24, 2017 8:55:07 GMT -5

It would be really useful if Run BASIC could detect badly formed HTML, but it would be quite a feat.


I'm sure that would be quite a mission,
my challenge is to kick start my aging brain into absorbing what I read.

The post I took the original code from in my example had the error and you solved it for mackrackit back in 2008.

I'm finding Runbasic a challenge because of the infusion of html & JavaScript.

Is there a road map to success, that is should I be mastering html first and maybe some javaScript

The guidance and help I've got over the year here has be fantastic.
I actually do not spend enough time coding and thats the main problem.

special thanks to Dan for his patience

all the best



Last Edit: Apr 24, 2017 8:55:45 GMT -5 by metro
Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Apr 24, 2017 9:46:03 GMT -5


I'm finding Runbasic a challenge because of the infusion of html & JavaScript.


Having written some LARGE web applications, I found that you really don't need to know much JavaScript.
About the only JS you need is to fill, or clear fields. Now that RB supports real HTML you no longer need to write code to test for numeric, do date and calendar code, color selection, drag and drop and other functions. These are all done with HTML. Look at the programs I submitted in another post for making RB interactive and drag and drop code. If you give your html code a ID you can get to it with JS. You can clear sections or fields. Using hidden RB buttons you can make your fields push the hidden RB button to do stuff in you code . You can make it poke the button on entry of a field, change the field, or on each character you type, or when you leave the field. I use the character change to create drop downs when for example you start typing a last name. So the further you get into typing the last name the fewer names that show up in the drop down. When they see the name they actually want they select it from the drop down,

I use a HTML editor and create the form I want and display it on the browser. Once you like what you see, you can simply edit the HTML document and create the RB HTML statements. If the RB HTML code is giving you errors change the HTML statement to PRINT so you can see exactly what it is sending to the browser. If you still have problems, copy what is printed into a HTML editor and let it find the problem..

Just toooo much fun.
I'm now bare foot in the casinos..

Have a g'day
Dan.
metro
Full Member
***

metro Avatar

Posts: 207

Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate