metro
Full Member
Posts: 180
|
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
|
|
|
Post by meerkat on Apr 23, 2017 9:30:02 GMT -5
Try to close the <iframe> and see if that works
html "<div id='IFR' ALIGN=RIGHT><IFRAME SRC='"+url2find$+"' WIDTH=80% HEIGHT=600 ></IFRAME></div>"
|
|
metro
Full Member
Posts: 180
|
Post by metro on Apr 23, 2017 18:11:02 GMT -5
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
|
|
|
Post by Carl Gundel - admin on Apr 24, 2017 7:45:13 GMT -5
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
Posts: 180
|
Post by metro on Apr 24, 2017 8:55:07 GMT -5
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
|
|
|
Post by meerkat on Apr 24, 2017 9:46:03 GMT -5
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
Posts: 180
|
Post by metro on Apr 24, 2017 9:56:29 GMT -5
Thanks Dan, I've set myself a challenge to pick apart that interactive code you've posted some cool stuff there All the best
|
|