|
Post by Psycho on Mar 26, 2009 18:29:40 GMT -5
A while back someone gave me the following script as I wanted to open a program in a new window: html "<script language='javascript'> <!-- window.open('http://www.runbasic.com','new',''); //--></script>" Is there a way to include a variable for the address? For example: if webAdd$="http://www.runbasic.com", how can I place the webAdd$ variable in place of the hardcoded address? I've stabbed at some variations using semi-colons and double quotes but if there's a combination that works, I haven't figured out the correct one. Here's one of my failed examples: html "<script language='javascript'> <!-- window.open('";webAdd$;"','new',''); //--></script>" Thanks for any help, John "Psycho" Siejkowski
|
|
|
Post by Janet on Mar 26, 2009 19:40:54 GMT -5
This works for me
webAdd$ = "http://www.runbasic.com" html "<script language='javascript'>window.open('";webAdd$;"','new','')</script>" Wait
The RB page takes focus back, though. I think if you open a new window, you'll probably want that url in the forefront.
|
|
|
Post by Psycho on Mar 26, 2009 20:40:57 GMT -5
Thank you Janet. That did it Must have had something to do with the other characters John "Psycho" Siejkowski
|
|
|
Post by StefanPendl on Mar 27, 2009 2:30:59 GMT -5
Must have had something to do with the other characters <!-- and --> are the begin and end tags of a comment in HTML, Jscript and XML, so the window.open() function was never reached.
|
|
|
Post by Psycho on Mar 27, 2009 6:11:19 GMT -5
Aaahhhh....no wonder. So many languages to learn and so little time to do it Thanks Stefan.
|
|