I have one maybe stupid question but my googling skill were not up to the task.
I have some html page that I opet at my work that is php generated. On it 80% of the text is not needed for me so I "made" a javascript code that filters/hides all text I am not interested in. It works just fine but for this to work I must SAVE html document on my computer and insert that javascript code into it so it can make text invisible.
Now I am thinking of improving this because every time I reload web page on my company's server I need to save it on computer and insert javascript code.
Please point me into the direction that can help me do this. Is there any way to run that javascript code over already opened page in FireFox or some other browsers?
Html page that I am changing is mostly tables and I am hiding rows that I do not need, but there aro around 500 rows and I only need 15 or 20.
Thank for all your effort!
One way would be to use a 'bookmarklet'. Those are small javascript snippets, which you can insert into your bookmark bar and then execute by clicking on them.
Drag me to bookmarks for alert
For Example, drag the link in this fiddle into your bookmark bar and it will alert 1 on click.
http://jsfiddle.net/5aAPN/2/
Use CSS instead. If you have a white background make the text white. You can also give visibility: hidden a try.
Related
For my final project for a course I want to make some kind of minimalistic, meditation/relaxation website but I'm struggling with coding the JS functions. I'll try to explain the steps for what I want to do:
The page starts out with a white background.
Text fades in. (i.e. "Welcome")
When a key is pressed or the screen is tapped on mobile, the previous text fades out and another text fades in, but still on the same page.
Another text later, with options below for the background. When an option is clicked, the background changes and again, the text fades out.
Same as #4, but with background music.
Then there are 3 routes to go to (so different pages), the codes for those are simple so I don't need a lot of help, but how do I make them so that the background image and the sound that the user has chosen, carries on?
Is this completely doable with only JavaScript?
Should I incorporate Flask in my program (i.e. HTML layout/template?)
I'm really lost :( Does anyone know which functions I could use? Help will be appreciated!
Yes you could achieve this result by using only javascript
You can send the user's selected background and music through query parameters and access them with url in your javascript of other pages.
Im currently working with the contentbuilder.js script to prepare a simple page to allow content editing.
Whilst I love this particular script, I havent been able to find a way to keep the toolbar visible at all times. The readme file doesnt give out too much information, but im wondering if anyone has worked with this before and managed to keep the toolbar visible at all times, but when the text isnt in focus, make the buttons disabled.
thanks in advance
hey I used the following on my page to make it show up as long as the builder had focus
$("#<%=contentarea.ClientID%>").mousedown(function(event) {
jQuery("#rte-toolbar").stop(true, true).fadeIn(200);
});
I am trying to write an automation tool for a browser game that takes some data from the web page, in this case the data appears to be added using JS after the page has loaded, I assume this is where my issue is.
I'm trying to grab the text that the JS adds and save it to a variable, but when I try and find it using the WebBrowser component's DOM controls, it cannot find the text I need. The text IS there, you can see it on the browser window and the source should easily be found as I can see it when using Chrome's dev console/inspect element tool, when I target it using the DOM controls, VS makes it clear that it can't find it. I am 100% certain I was targeting it right and that I'm not pointing it in the wrong direction.
Is there a way for the WebBrowser to refresh/re-read the source without refreshing the page?
Otherwise, how would you go about working around this?
Cheers,
Tom.
One work around that springs to mind when puling text from something is to use MS Office document imaging. If the text always appears in a specific location on a page it should just be a question of taking a print screen of where the text appears and then running it thought to OCR. The advantage of this is it's pretty future proof, the game makes could change the method by which they display the text but as long as it's displayed you should be able to print screen it. :)
I am attempting to have a link load an article from my domain in to an iframe. I understand that it is usually easy to link using:
Google
But when it comes to Iframes I am having difficulty formatting the code correctly so that it will display inside the iframe.
This leads in to my next question. If this is easily remedied then is it possible to also execute code that will fill in the URL of an anchor in the same mouse click.
Finally, in that same mouseclick would you be able to execute code similar to:
$('#abc').click(function() {
$('#xyz').load('content.html');
});
In order to populate a sidebar with information from a second link?
Thank you for taking the time to read over this. I am sorry if it is truly elementary, but this is my first bona fide webpage, and my limited knowledge is really delaying the execution of my ideas.
Special thanks to wdm for allowing me to progress to this stage of questioning by answering my earlier concerns.
To target your iframe, change to:
Google
for the 2nd part, the above thing can be reused instead of using jQuery.
I just need a little advice on what may be the best method for handling my situation.
I'm in need of placing three buttons in the sidebar of the website I maintain. The website is massive and hard to handle. Currently, it's all HTML files (there are over 10,000 of them believe it or not). We're transitioning to a database website so I don't want to make any sweeping changes that are site-wide, as they may just be scrapped in our re-design process in coming months.
However, these buttons are for an application process. When you click on them, an alert box will need to pop up to give you a bit of information and they either allow you to cancel the action or proceed. The buttons are currently located in the left nav which is included on every page of the website.
Would it be possible to accomplish this using JS or jQuery? I'd be unable to easily add scripts into the tags on all of the applicable pages, but I'd like to avoid the browser driven "http://www...Says: blah blah" message if possible. Any insight is greatly appreciated! Thank you!
Check out the jQueryUI dialog examples, particularly the modal boxes, although you will have to add the script to every page.