Help with html popup

Joined
Jun 14, 2018
Messages
111
Reaction score
1
i have this code which i got from quackit

HTML:
<input id="go" type="button" value="Tune In" onclick="window.open('boogie.vside-radio.com:8406/…, width=400, left=100, top=100, color: #04AA6D; resizable=no, scrollbars=yes, toolbar=yes, menubar=no, location=no, directories=no, status=yes');">

i would like to edit the box some more, so how can i add css to this?
 
Joined
Jul 4, 2023
Messages
589
Reaction score
78
Your window.open usage is not correct. The window.open function expects a specific format for its arguments. The correct syntax looks like this:
JavaScript:
window.open(URL, windowName, windowFeatures);

In your code, there are two main issues:
1. Missing protocol in the URL:
boogie.vside-radio.com:8406/... should start with either http:// or https://, like this:
Code:
http://boogie.vside-radio.com:8406/
https://boogie.vside-radio.com:8406/
2. Not valid URL:
At the end there shouldn't be ... in the URL. Those three dots (...) look like a placeholder or shortcut and are not a valid part of the link. You need to enter a specific path to the resource, e.g. an audio stream.
Code:
http://boogie.vside-radio.com:8406/stream
https://boogie.vside-radio.com:8406/stream
3. Invalid windowFeatures format:
The features string should be a comma-separated list without semicolons or CSS styles. The color property is not valid in window.open.

Version after corrections:
HTML:
<input id="go" type="button" value="Tune In"
  onclick="window.open(
           'http://boogie.vside-radio.com:8406/stream',
           'radioWindow',
           'width=400,height=300,left=100,top=100,resizable=no,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes');
           ">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,260
Messages
2,571,038
Members
48,768
Latest member
first4landlord

Latest Threads

Top