JS overlay without direct access to html - javascript

I am attempting to add a javascript overlay onload, without direct access to the html. I'm only able to upload .js and .css files.
How would I go about doing this, I've searched all over, but as I am no expert at this I'm seeking a simple solution which will allow me to maybe call html and insert it into an overlay, by using javascript only.
I am unsure of the coding of the .js file to contain all of the overlay code and html code combined.
I've been looking at document.getElementById and document.write to do this, am I correct in trying to do it this way?
Any suggestions?

There is no way you can add an overlay to an existing html file without importing the new JS and CSS files in the html file. How ever, if there are other JS files used or imported to the HTML file, edit it and add your code in the JS file. It'll run since the JS file is already imported in the HTML.

Related

panel has to be double-clicked if using external JS, but single click if script inside HTML body, don't understand

Here is the code - https://www.w3schools.com/howto/howto_js_accordion.asp.
I can setup just fine in a single HTML file, but I want to move the JS code to an external file.
I make the JS code in the external file a function and an "onclick" attribute, it has to be double-clicked as an external file, don't know how to fix this? Thanks.

Which js file is running on which element of a page

I have downloaded a responsive bootstrap website template. It has a lot more extra content and js files that i don't need for my website. I want to remove it along with .js file being used for that content. Is there any plugin or way to find out which js file is being used on which content so that i could make changes accordingly ??
Thanks,
Any help is appreciated...
Have you looked at this question.
I believe you should be able to find out something that should help you in the answer to that question
find unused images, css rules, js script blocks

Drop-down Redirect - Submit

i am using wordpress and i would like to create a drop down menu with select options and i found this thread which i think is exactly what i need Deactivate the 'Submit' button for the selected value in dropdown menu to be honest i don't know how to set up these elements html,js,css in order to achieve the result.I am a begginer and i would appreciate any kind of instructions.
Thank you for you time!
For instructions in HTML, CSS and JS go to the W3Schools website. I learned almost all that I know from there. If you need specific help THEN come asking here.
Let me assume that you are going to implement this in your WordPress themes index.php file. So, copy and paste the HTML code in to the html tag wherever you want to display the drop down box. Also copy and paste the javascript in to the script tag inside the head tag of the page. You can also paste the javascript code to a new file created inside the js folder inside the themes folder and call it from the head tag in index.php file. If you have any CSS you can either place it directly in the style tag inside head tag of index.php file or create a file in the css folder,copy the css code to it and call the CSS file from the head tag of index.php file.

AxWebBrowser in VB.net how to work with java script?

i have a vb.net GUIform that will display an AxWebBrowser to show a html table which have some interactive controls that required javascript to work.
I already prepared the javascript with the valid functions.
Example:
Inside AxWebBrowser have a button, when i pressed the button, it will display the current time inside the AxWebBrowswer.
Is that possible to do this? and how? Just place the .js file in the same place and set the src equals to the .js file path? but it seems not work.
And after several tried, i found maybe JScriptCodeProvider can do this. but i no idea how to point the src to the jscript running in memory.
Please help
The easiest way to do this is to include the javascript with the html via a <script> tag, paste the entire script inline rather than using src="..." if you need to.

How to know which JS script manipulated certain elements of the DOM using Firebug

I am inspecting a website, which has tons of JS files loaded from several servers along with jQuery. Number of js files is really big. Some are within the regular scripts tags. Others are loaded dynamically via ajax.
I am interested in certain elements of the DOM which are manipulated because of some js file. I see the dynamic loaded elements in firebug. I needed to know exactly which JS script creates/updates them.
I searched the js files for the classes and the IDs of the elements,so I can have some clue about which js file affects them, but I found nothing.
Is there any direct way using Firebug to know exactly which JS file manipulates certain DOM elements?
Thanks in advance.
Not in a direct way.
Use EventBug addon
Then search by the function signature in your script panel to drill down to the js file
Hope this helps!
You should be able to go to Script tab in firebug, then look at the toolbar right below the script tab you can select all the javascript files included on the page.
If you have an idea which file it is coming from then select that file and then look through the code and set break points on functions you think the event is coming from by clicking on the respective line number, then refresh the page and perform the event that calls the javascript.
You might have to put in a few before you narrow it down, but the break points will make it alot easier to tell which functions are being called for which events.

Categories