can a variable be used with this script?

new BookmarkLockedFalling
Psycho
Full Member
***

Psycho Avatar

Posts: 196

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
Last Edit: Mar 26, 2009 18:30:17 GMT -5 by Psycho
Janet
Global Moderator
*****

Janet Avatar

Posts: 276

[br]
Psycho
Full Member
***

Psycho Avatar

Posts: 196

StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Psycho
Full Member
***

Psycho Avatar

Posts: 196