Asked
— Edited
Hey guys.
Little project I want to look into.
As I mentioned in this thread, I want to make a webpage/custom web server layout and run the ez-b through this.
I have html background, so designing the webpage should be no problem, but I know little of getting ARC stuff into that page. I tried setting up the http server but it wouldn't work.
So, who's up for helping me try this?
1.Camera not working.
2. script trigger buttons not triggering
3. Help me clean it up! It is freaking messy!
Instructions:
1.Download folder. Unzip it(extract items out)
2. open the MTR.ezb project file and start the http server. Start camera too.
3. Open the index.html file in the downloaded file. Set your camera url in the camera java script(labeled)(same as ip as the main server)
4.Configure anything else in the script that is mentioned
5. Java/html people help me try and figure out the listed problems.
Betabugrelease.zip
Yes I know it says BETA^
Thanks for any help I receive!
Tech
Code:
URLs were checked, there fine. its gotta be the code!
Code for script 1-9(identical jquery):
Code:
Code:
eg.
Code:
It's not working because the quotation mark in front of Script Manager is ending the string, and you're ending up with invalid Javascript.
Press F12 in your browser and you'll see the Javascript console. You can see errors there.
Also, if you use an editor with syntax highlighting like Visual Studio, Sublime Text, Notepad++, etc... you will see small mistakes like this.
I don't think putting information that needs to have quotation marks and spaces in the URL is a very good idea. You should see if you are able to post things to the page instead of putting it in the URL.
If you really need to do it like this... try running the URL through encodeURIComponent() first, and use single-quotes around the URL in $.get().
Code:
Here's the camera code, which, if tweaked and reengineered, I think we can get it to do what we want it to do.
We'll need to takeout the reload interval, and change the address to what we need.
for the html, i'm not sure. This script gets the url of the camera, so I wander if it could work for the scripts(it uses fragments of the address with variables).
Code:
HTML(maybe change to a button):
Code:
For the previous problem, does it work if you use encodeURIComponent(), eg.
Code:
and have you checked for errors in the javascript console?
It just requests an image every so often. Loading it into the page. I'm not sure how it will help you - you're just trying to trigger a script to load, right?
What I gave you should work I believe. There may be other problems stopping it from working. It would be best to check the console for errors.
The camera code is what I found and modified from another forum. The generic url is:
"http://localhost:8080/CameraImage.jpg?c=Camera"
Now, is jquery java script? Because the I could make a separate java file so the html isn't as cluttered.
Thanks!
Tech