ProcessingJS and HTML web page issue - html

Hello so I was trying to include a sketch in my html page using the two lines below, but it didn't work:
<script src="processing-1.4.1.min.js"></script>
<canvas data-processing-sources="hello-web.pde"></canvas>
Of course I made sure to put all the files in the same directory. I already did some sketches that are working fine in Processing software downloaded from processing.org. So I basically followed the instructions here: http://processingjs.org/ and created a hello-web.pde file that contains the setup and draw functions. I keep hearing about web server but I don't really knowwhat to do? any suggestions please.

Processingjs doesn't work in chrome. Chrome has disabled some features which it requires. Try with Firefox!
If that's not the case, it could be something in ur pde file.

ProcessingJS on Chrome works fine for me.
First thing you need to do is:
create a local server using
Mamp
Set your root path.
run your HTML page like so:
localhost:myPort/myHMTLPage.html
(eg. localhost:8000/index.html)

Related

my project works with live server extension only

I have a live server extension in my VC and it works well, the problem is when I try to open my page without using the extension it shows up the page without any CSS colors or images or anything, I want to see my project with all CSS codes I wrote without using live server, thank you
Have your tried copying the full path of the file then entering it in the browser?
If that still doesn't work, try refresh the page when updating your html/css/js file.
Sharing your code will help us more to Debug it.
Instead, I suggest you,
Just recheck your internet connection if you're using any CDN or any API like Bootstrap, Tailwind CSS.
Check your links if referred to any external CSS or js.

Application for editing and rending HTML side by side?

Is there an application that can edit and render and web page side-by-side similar to http://rendera.herokuapp.com/ , but can working "offline" (i.e. can be working even without internet connection).
I tried googling for WYSIWYG HTML editor, but I couldn't come with something similar to http://rendera.herokuapp.com/
I found Brackets (http://brackets.io/) somewhat similar to I'm looking for. I managed to find the similar question (different keywords) in StackOverflow (Is there an HTML/CSS/JS editor that immediately shows changes?), so somebody can mark this as duplicate
On windows just point your built-in IIS server to your working directory
When you edit your html , just refresh the web page
Use Python to serve up your web page from the directory your working in
python -m SimpleHTTPServer
When you edit your html, just refresh the web page
If using angularjs you can use
ng serve
This will load your website normally on localhost:4200 , any change to your code will force a reload of your website
Simply have your browser on one side and your editor on the other.

CSS - why my browsers can't reflect any changes made on the server?

I was working on some CSS code and then suddenly the server stopped reflecting any changed made on the server. At first I thought it was a caching problem but I disabled caching on my browser and even tried using different browsers but still it's using the old version of my CSS file.
If I download my CSS file from the server and open in the text editor, it shows all the changes I made to the code but they don't reflect on my website at all. The site is using old version of the CSS file that doesn't even exist anymore on the server.
What on Earth is happening with my server? Can it be a router caching problem?
I can't answer this but try to add in your html, where you include the css this: ?v1.
Example: src="resources/yourDir/style.css?v1"
This will force everything to download the new css.
You can add after the ? everything you want. Like a timestamp, just a number or words. Whatever you like.

CSS changes are not reflected in Joomla website

I have a site built around Joomla, It was working fine from the time it was built. But from few days back the css changes in any of the css files are not reflecting in the site. I am able to see all the other UI changes except CSS. I have cleared he cache and checked from different ISP but no result. Can anyone suggest me how to resolve this.
Thanks in advance.
I think you are using a Template which uses LESS instead of CSS. If so, see if there are any folder inside "/public_html/templates/your_template/less/" exists or not.
If it exists then you have to create (if it is already not there) a css file named "custom.css"
inside "/public_html/templates/your_template/css/" folder and write your CSS code inside this file.
Joomla will pickup this "custom.css" file at last and your changes will be reflected.
Sorry for late reply but I found the answer. It is due to enabling CloudFlare in my hosting account. When I reached to my Hosting support they disabled the CloudFlare and everything started working fine and I am able to see all the CSS changes.

Can we run simple html file on our machine by turning off IIS server?

This is a very basic question but wanted to confirm that if we have a simple html file which we want to run on browser, Do we need to turn on IIS server or simple html file does not need any server and browser takes care of it?
Thank you
HP
Not sure what you mean by "run", but you can load any HTML file locally by opening it in the browser.
All javascript and HTML will work as expected, no serverside code will though.
If your links are relative links, they will also work as expected.