-->
Page 1 of 2

Java need some help if possible <SOLVED>

PostPosted: Wed Dec 30, 2015 11:43 pm
by forlotto
Anyone know Java well enough to help me ?

What I am trying to do is prompt for an IP... and use as a variable.

Figured it out updated code below.
Code: Select all
</script>
<script language="JavaScript"> IP = prompt("Please enter IP of Device", "");
document.write("<p></p>Page is now custom for " + IP + ", Enjoy.");
</script>


Thanks to all that attempted to help or even looked at my posting ;)

Re: Java need some help if possible

PostPosted: Thu Dec 31, 2015 12:11 am
by Mmiscool
if this is a file that will be uploaded to the esp you can use relative urls to get to different pages.

So if the page is hosted on the esp and you want to get to another page on the same esp you could use the flowing as the url for your hyper link.

"../../../pageurl"

Re: Java need some help if possible

PostPosted: Thu Dec 31, 2015 12:24 am
by forlotto
I would upload it to the esp but... The way I have it setup it crashes after a few different page loads...

The html buffer gets filled or something I can run the page locally however as a page and it does not I can jam the buttons as fast as the mouse can click them and I cannot create a reset instance. Thus this is the preference for doing it this way zero crashes.

Yes I use cls as well problem being I think there is too much going on for the little guy to handle possibly too many connections IDK but either way I need it to be a local page.

I also have a preference to the prompt so I can just enter my local IP whenever I wish.

So prompt and have IP dynamically inserted into the spots that say +IP+ ....

It should be possible I'm just not a java master so something is likely just wrong with my syntax I've tried quite a few ways but I'm sure there is quite a few ways to try that I am likely missing as well.

Any other suggestions Mike or anyone who is a JAVA JEDI out there? lol

Thanks!

Re: Java need some help if possible

PostPosted: Thu Dec 31, 2015 12:31 am
by Mmiscool
You can upload an actual html file to the esp using the file manager. It is served directly out of flash and should avoid those pesky memory issues.