|
Post by mackrackit on Feb 3, 2008 9:32:12 GMT -5
Hi, When I have an IFRAME in a page with a link and the link is clicked, RB takes me back to the login page. How do I fix it? Thank you.
[START] cls print "HI" print " " link #m, "DO SOMETHING", [do] print " " html "<IFRAME SRC=""http://libertybasic.com/"" WIDTH=600 HEIGHT=400 ALIGN=CENTER>" wait goto [START]
[do] 'do something goto [START]
|
|
|
Post by mikeukmid on Feb 3, 2008 10:40:33 GMT -5
Looks like a bug. Also if you rearrange the position of the link, to be below the iframe, the link disappears. (both MSIE and FF2)
[START] cls print "HI "+dm$ print " " html "<div id=""IFR"" ALIGN=""CENTER""><IFRAME SRC=""http://libertybasic.com/"" WIDTH=""600"" HEIGHT=""400"" ></div>" print print div lnks link #m, "DO SOMETHING", [do] end div wait goto [START]
[do] 'do something dm$="Do more!" goto [START]
|
|
|
Post by carlgundel on Feb 3, 2008 13:29:32 GMT -5
Do you need a closing tag for the IFRAME?
-Carl
|
|
|
Post by mikeukmid on Feb 3, 2008 13:40:01 GMT -5
Obvious isn't it! That's why you're Dr Spock and we try and write programs Sorry and thanks. Mike.
|
|
|
Post by mackrackit on Feb 3, 2008 16:35:55 GMT -5
How embarrassing Who would of thought of a closing tag? Thank you Dr, Spock
|
|
metro
Full Member
Posts: 180
|
Post by metro on Apr 21, 2017 3:01:47 GMT -5
Hi, is there a way of using a variable for the url for example...
url2find$="http://libertybasic.com/"
[START] cls print "HI "+dm$ print " " html "<div id=""IFR"" ALIGN=""CENTER""><IFRAME SRC= url2find$ WIDTH=""600"" HEIGHT=""400"" ></div>" print print div lnks link #m, "DO SOMETHING", [do] end div wait goto [START]
[do] 'do something dm$="Do more!" goto [START]
|
|
|
Post by Carl Gundel - admin on Apr 21, 2017 13:29:35 GMT -5
How about ...
url2find$="http://libertybasic.com/" html "<div id=""IFR"" ALIGN=""CENTER""><IFRAME SRC="""+url2find$+""" WIDTH=""600"" HEIGHT=""400"" ></div>"
|
|
metro
Full Member
Posts: 180
|
Post by metro on Apr 21, 2017 15:06:11 GMT -5
Thanks Carl, Can you explain why 3 double quotes I did try 2 and other combos Before posting
Laurie
|
|
|
Post by Carl Gundel - admin on Apr 21, 2017 15:36:39 GMT -5
Thanks Carl, Can you explain why 3 double quotes I did try 2 and other combos Before posting Laurie Yeah, three double-quotes looks funny. You will only see that at the beginning or ending of a string literal. When you construct a string literal doubling up on double-quotes inside in between the beginning and ending of the string literal makes one double quote, so: "this expression ""has"" a word surrounded by quotes" and """this expression is completely surrounded by quotes""" In the second example, the first double-quote is the beginning of the string. After that, each pair of double-quotes makes for one double-quote in the string, When you get to the end of the string there is a pair of double-quotes which becomes one double-quote in the string, and then the third double quote defines the end of the string. Imagine that the compiler sees it more like this: " ""this expression is completely surrounded by quotes"" " In the case of your url2find$ question, it may look like my suggested solution below is just one string and that the triple double-quotes are in the middle of the string. "<div id=""IFR"" ALIGN=""CENTER""><IFRAME SRC="""+url2find$+""" WIDTH=""600"" HEIGHT=""400"" ></div>" But, you actually have three things that are concatenated using the + operator: "<div id=""IFR"" ALIGN=""CENTER""><IFRAME SRC=""" + url2find$ + """ WIDTH=""600"" HEIGHT=""400"" ></div>" Notice that the use of three double-quotes together is used at the end of the first line, and at the beginning of the last line. You cannot define a string literal with three (or any odd number grouping) in the middle of a string literal. But, you can do four, or six, or eight, etc. Like so: print "Here are four """""""" quotation marks." Try adding or removing one of these quotation-marks in the middle of the string and you will get a compile error. Now I've said too much. ;-) -Carl
|
|
metro
Full Member
Posts: 180
|
Post by metro on Apr 21, 2017 16:01:59 GMT -5
Great, thanks for taking the time In the context of the last few months not really
|
|
|
Post by kokenge on Apr 22, 2017 10:14:30 GMT -5
Since HTML can use single quotes or double quotes, I always use the single qoutes. Just looks a lot better. And stuff like align and width and height don't need quotes , I write it as follows:url2find$="http://libertybasic.com/" html "<div id='IFR' ALIGN=CENTER><IFRAME SRC="+url2find$+" WIDTH=600 HEIGHT=400 ></div>"e HTH . Have a g'day. BTY I'm in las vegas for the weekend.. and broke.. Help!
|
|
|
Post by Carl Gundel - admin on Apr 22, 2017 16:56:50 GMT -5
Since HTML can use single quotes or double quotes, I always use the single qoutes. Just looks a lot better. And stuff like align and width and height don't need quotes , I write it as follows: url2find$="http://libertybasic.com/" html "<div id='IFR' ALIGN=CENTER><IFRAME SRC="+url2find$+" WIDTH=600 HEIGHT=400 ></div>"e HTH . Have a g'day. BTY I'm in las vegas for the weekend.. and broke.. Help! Great tip. Thanks Dan. -Carl
|
|