Need script for opening 2 pages at once

hi all :smiley:
i’m new to mikrotik and it’s scripts

i just want to open 2 pages when a user request any page
1st page : default requested page by the user
2nd page : a specific page chosen by me to show him some instructions and notifications

any solutions or ideas
I would be very grateful

no one knows any solutions for this ! :confused:

This isn’t nearly as easy as you think it is.

  • most browsers block pop ups, so opening up a second page is not going to work with the majority of users. Their browser will simply block the pop up, assuming it is spam or advertising
  • how are you going to keep track of what users you’ve shown your notification page? When is a user eligible to see another notification?
  • how are you going to keep track of whether the user saw the notification? All kinds of programs use HTTP - virus scanners download signature updates via HTTP, for example. How do you know that a user saw the notification in a browser, and it wasn’t just the antivirus trying to get an update and discarding your notification page?

Your best bet is going to be a Hotspot on which users don’t have to provide credentials (either trial users, or hardcoded credentials). Solutions for that are on the wiki. It isn’t quite what you asked for, though.

Also, this has nothing at all to do with scripts. Scripts are small programs that run within RouterOS. They cannot possibly ever influence a user’s browser.

ok thanks first
i saw a simple html script that can open 2 pages or more at once so i thought it
may be run on mikrotik in such away

any way i will redirect them to a page that have code to open the 2 pages at once
when the user clicks on alink

this is the code of the html page :

a href='my page' onclick="window.open('$(link-redirect)','newwin');">click me</a>

i used the variable ‘$(link-redirect)’ defined in hotspot system to reach the original webpage . :smiley: