|
I need a source of any simple game that is written with HTML as the front end and JAVA as the back end....
|
|
|
|
|
Please do not repost.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I need a game source code design with HTML as the front end and JAVA as the back end.....
|
|
|
|
|
Please search the Internet using google or some other search engine. No one is going to just hand you an entire game.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I guess you want to say 2 types...
|
|
|
|
|
Think again
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
|
Search in CodePlex or GitHub.
You will get a lot of stuffs of your need with proper documentation (almost).
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
|
So, I have this ajax that I'm writing to get the commit log from a private repo, and I'm planning to use my access token. So I thought, cool, I'll first use an authorized endpoint to get the token so I don't have to hardcode it into ajax.
Then I thought, well, wait, what's to stop someone from using the browser's developer tools to simply set a breakpoint and inspect the return value? Someone that is authorized, of course. I suppose that's a small layer of protection, but the question remains, how do I stop even someone authorized from seeing the access token when debugging the javascript?
Is that possible?
Marc
|
|
|
|
|
Your Access Token would be encrypted, right?
|
|
|
|
|
CodeReady wrote: Your Access Token would be encrypted, right?
No, because the access token has to be passed on to GitHub, not my own server.
Marc
|
|
|
|
|
Then I guess you can't do much about it and if you are getting token from the different server then its the server responsibility to encode it. One should not be worry about it cos generation and validation of the token will happen in github server.
|
|
|
|
|
I found many solution for this from my searches. But none worked. I have a page that is HTML, and one would think that JavaScript to do this would be simple and universally available. But, alas, that is not the case. Does anyone have a solution for this that works?
Bobby
|
|
|
|
|
BobbyStrain wrote: Does anyone have a solution for this that works? There are tons of examples online so if something isn't working for you then yours must be different somehow. I suggest posting the code you have so people can look at it.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
There's 2 approaches you can take
window.scrollTo(0,0);
DOM_ELEMENT.scrollIntoView(false);
Here's a little example
<html>
<body onload='createAnnoyingStuff()' onscroll='preventScroll()' style='text-align:center'/>
<script>
function createAnnoyingStuff(){
for(var i=0;i<100;i++){
document.body.appendChild(document.createTextNode('Pete and Repeat were on a boat. Pete fell out, who was left?'));
document.body.appendChild(document.createElement('br'));
}
document.body.appendChild(document.createTextNode('The End'));
}
function preventScroll(){
window.scrollTo(0,0);
}
</script>
</html>
There's no way to get to "The End" which is at the bottom of the body
Does this help at all?
|
|
|
|
|
Simeon,
Thank you for responding. I should have been more specific in my question. What I want to do is to maintain scroll position on post-back. But, strangely enough, my pages are now maintaining position on post-back. When I first had the problem several years ago, I added an AJAX update panel to solve the issue. When I recently updated one of the pages, it didn't maintain position even though it still has an update panel. Everything seems to be working fine now on all my pages, those with the update panel and those without it. So I have moved on to my next challenge. My site on GoDaddy won't run with .NET 4, even though it is compiled by VS 2010 to target .NET 4. But, this compilation still runs under 3.5.
And, I have another question for JavaScript to resolve some other issues. Maybe you will take a look at that subject, too.
Thanks for your help. I'll file your response so I can readily retrieve it.
Bobby
|
|
|
|
|
Hi,
I am trying to create a program in HTML using JavaScript. In which i want to take input from user in number and want to print the stars "*" against that number.
Kindly help and reply me with the accurate code.
Thanks
My Code is:
function PrintStars() {
var x = 0;
var y = 10;
for(x=0;x<10;x++)
{
for(y=0;y<=x;y=y+1)
{
document.getElementById("TableArea").innerHTML="<br>" + document.getElementById("etext").value;
document.write = "*";
}
}
}
;
Enter a Number:
|
|
|
|
|
<body>
Enter a Number: <input id="etext" type="text" placeholder="Enter a number here"/>
<input type="button" Value="Print" onclick="PrintStars();" />
<label id="lbl">
</body>
function PrintStars() {
var starcount = document.getElementById("etext").value;
var sx="";
for(x=0;x<starcount;x++)
{
sx +="*";
}
alert(sx);
}
|
|
|
|
|
Thank very much Sumanth. One more little thing i want to ask plz let me know how we can print stars in innerHTML instead of using alert(sx).
as i used document.write(sx).innerHTML;
but this line is replacing input box an button. why is it so?
And Please suggest me some stuff to read for understanding these kind of things as you know i am new to JS.
Again Thank you very much for helping me in this way.
|
|
|
|
|
Hi,
I suggest you to learn some basics of HTML and javascript and DOM; for starters i would say http://www.w3schools.com/ is a good place.
and regarding "document.write" your whole web page will be treated as document so you are replacing your whole html with the result with "write".instead you can add a div to your page
and in the function replace alert with
document.getElementById("result").innerHTML = sx;
But again all this is pretty basic stuff , which you can easily get on web. So its better to search on web and try yourself before posting such small questions on code project.
Happy Coding!!
|
|
|
|
|
Thank you very much for helping dear Sumanth Madireddy.
Now i will try my level best to learn basic stuff form w3school.
Thanks a lot again.
If you don't mind dear can i get your email, because the way you made me understand is quite good and easy for me.
If convenient?
|
|
|
|
|
Hi
I have a menu, and i want when i click on one of item, that item be opened and i can show the sub menu when i click on sub items, and it cloesd if i change the top menu
plz help
more thanks
|
|
|
|
|
How can we help?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have C# code dynamically adding a textbox named txtDodic to a data table in the code behind and setting it to a Width of txtDodic.Width = (10 * 4); as so:
tc = BaseControl.CreateTableCell(tr, null, "ColDodic", null);
txtDodic = BaseControl.CreateTextBox(tc.Controls, prefix + "txtDodic", "", "ASPTextBox", "TextBoxDodic");
txtDodic.Attributes.Add("onkeypress", "ValidateDodicInput();");
txtDodic.Width = (10 * 4);
I want to change the Width of the textbox txtDodic to a width of txtDodic.Width = (10 * 16) in a JavaScript function as so:
document.getElementById('" + txtDodic.ClientID + "').Width = (10 * 15);
The problem is that when the JavaScript function is called the width does not change. Please help.
Thanks,
Steve
|
|
|
|