Is there any way to change the script in page so i can make a button go to a specific page? Like, using inspect element? I want the open a page and add a script in the button of this page, so it can go to the url i add.
only if you have created that target tab. then you can send a message with anything and use eval in document in target tab
Related
I'm trying to open web url what is hidden in elements, but if i click on button what in on web page, it shows up in the elements.
So want to use javascript, when i click on button, then javascript find that url and open it in another window.
I want to use tampermonkey, the userscript manager to run that script.
Iam new to coding, except wrong code.
I already tried some commands like this: document.getElementById("vjs_tech")
it shows up like <video *there are some random* and src="https://and some random words"></video>
and i tried use method window.open("src").
document.getElementById("vjs_tech");
window.open("src");
I excepted that will open the link from src but it only opened same window again.
You have to take the value of src attribute from the element.
var videoURL = document.getElementById('vjs_tech').src;
window.open(videoURL);
I have the tab-based page with a first tab open when the page is loaded.
The problem is that I want to create a link to open and scroll to some of the other tabs.
Here is the Tab code:
<li>ADVANTAGES</li>
It works when you add #something at the end of the URL, but the problem is that you can not trigger the tab opening from button or link on the same page.
Example: If you want to lead someone from the page to open tab different than first.
The Question is: Is there a way to trigger and open another tab different than the first one
In the website I am building I have a link to another webpage set with a target of _blank to open in a new tab.
If I click the link and then switch back to the 1st page and click the link again it opens a 3rd tab.
Is there any way to get the browser to just switch back to the already open tab for the 2nd webpage?
You can use target="secondPage", this create a named window/tab and every links that a user click that has this target will be opened in this page.
Other than this, I don't think it's possible nor a good thing. You should not tell the user how to manage his tabs/windows.
Presently I have a button which will open a popup and it also pass some parameters(like id,name) in the same page.But now i want to open a welcome page(href link) and there it should the popup page with that id and name what i have passed.My onclick event is a javascript code which will open a popup.I have used something like this
This can be done in several ways. One simple way is:-
Redirect the user to your welcome page when onclick is fired.
At the same time of redirection, pass the information u want to show in the popup as get parameters to the welcome page.
Once the welcome page is loaded, check whether the particular get variables are set. If they are set, show a popup window in that page with the information passed via GET.
My requirement is that I have a few hyperlinks on a webpage and when the user clicks on these hyperlinks I should redirect the user to an asp.net web page(Default.aspx) in a different website.
For the 1st time when the user clicks on one of the hyperlinks it will launch a new browser window with the Default.aspx loaded and then if the user clicks on some other hyperlink I want to redirect the user to the existing browser window(in which deafult.aspx is already loaded)with the content related to this particular hyperlink loaded,instead of launching a new browser window/tab.
But I am not sure of how to achieve this.I wonder if I can add some js to the asp.net Default.aspx page to achieve this.
Please could someone put me in the right direction?
Thanks
It sounds like the target property of the <a> tag will serve your purposes. Try:
Link 1
Link 2
Any clicks on the link subsequent to the first one should not result in additional windows.