Jump to content

The javascript Challenge - !Do you have what it takes to become Ultimate Scripter

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
17 replies to this topic

#1
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
Hi & welcome to the JavaScript Challenge . This is not a contest , we don't give you money, freebies :cursing: for giving solutions.

:rules:Rules for solving the Twisters:

1.No CODe stripping. [ we have google by our side ! ]

2.Post what ever you think will provide the solution

3.Javascript hacks allowed

4.Post the whole code with the HTML and all the tags,not even leaving anything between <HTML> &</HTML>.

5.KISS [ Keep it small Stupid ]

6.Rules will change when conditions arise!

Winner will be announced everyday, if possible we [myself & is there any Photoshop Whizkids over here? will provide the winner a Cool USerbar for using with the forum ]

Js Challenge 1 : April 13th

Info:Attached File  &#105;&#110;&#102;&#111;&#95;&#98;&#117;&#116;&#116;&#111;&#110;&#46;.png   3.63K   92 downloads
1.Folder named "img" contains 2 images named "Up.png" and "Down.png"

2.We have a
<img>
tag , and a
<input >
tag with
type = "Button"
.

What needs to be done:
1.Well i want to change the image by using the button.You are allowed to use any event of the button but you have to well comment the code so that everyone has to understand the code.

Attached File  &#100;&#105;&#99;&#101;&#46;.png   1.69K   92 downloadsLet the Game begin !

Resources you may refer:

https://developer.mo...cript_1.5_Guide

http://www.w3schools.../js/default.asp

Edited by gokuajmes, 13 April 2010 - 06:41 PM.


#2
toxifyshadow

toxifyshadow

    Programmer

  • Members
  • PipPipPipPip
  • 125 posts
I'm up for it!
Sorry btw, I don't use input, I use button.
ANSWER:

<img src="down.png" /><button type=onmouseover="up.png" /></button>

IF I CAN SUBMIT 2:

<button type="button"><img src="down.png" /></button>

do I seriously need to comment these? They are very simple.
Posted Image

#3
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
Rule number 4 ::rules:
<html>
<head></head>
<body>
<img src="down.png" /><button onmouseover="up.png" />ClickMe</button>
</body>
</html>

also please read the Info .The images are under the folder named "img"
:rolleyes: The code does not work !!

#4
toxifyshadow

toxifyshadow

    Programmer

  • Members
  • PipPipPipPip
  • 125 posts
Would it be ok to use a different lanuage, other than just html or js?
Posted Image

#5
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
It's a Javascript Challenge !! you still have 12 hours to go , i am sure you can come out with a code that works like charm.

#6
toxifyshadow

toxifyshadow

    Programmer

  • Members
  • PipPipPipPip
  • 125 posts
Actually I came up with a new one using js+html dom I'm going to edit this message to post code:
Now I will comment, edit 2

Edited and commented, please test and tell me if it works!

<html><head></head><body><img src="img/down.png"

myimg.img.onmouseover.src="img/up.png"

myimg.img.onmouseout.src="img/down"

>

<!-- Onmouseover is used so when a user puts their mouse over the image a new image appears. Then you add the onmouseout so when your mouse leaves the image an old image appears. --!>

</body></html>

Sorry, I forgot the html etc... tags.
Posted Image

#7
toxifyshadow

toxifyshadow

    Programmer

  • Members
  • PipPipPipPip
  • 125 posts
Sorry to double post but,
How many wins/day do we need until we win the actual contest?


I'm going to pm you a good idea for tommarows contest
Posted Image

#8
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
I am sorry but , the solution that you gave was not a perfect one.Did the script work on any browser !as to my knowledge the below codes work .

<html><head></head><body><img src="img/down.png"
onmouseover="this.src='img/up.png'"
onmouseout="this.src='img/down.png'"
>
<!-- Onmouseover is used so when a user puts their mouse over the image a new image appears. Then you add the onmouseout so when your mouse leaves the image an old 

image appears. --!>
</body></html>
also

<html><head></head><title>MyScript</title>
<body><img src="img/up.png" name="img1"/><br/>
<input type="button" id="btn" value="clickMe" onClick="document.img1.src='img/down.png'"/>
</body>
</html>
yes as you are the only poster for the solution here is your userbbar ,add this to your userbar animation in your signature .Will make some more
good ones in the near future
Attached File  &#117;&#115;&#101;&#114;&#98;&#97;&#114;&#49;&#46;.png   8.69K   70 downloads
Attached File  &#99;&#111;&#100;&#101;&#99;&#97;&#108;&#108;&#46;.png   4.73K   69 downloads

#9
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
Script Challenge 2 :
April 14th

What needs to be done?
Display a message box on button click .You thought it would be so easy hah ... i want the message displayed in the message box to be entered by the user.The choice on how it's done is yours.

#10
toxifyshadow

toxifyshadow

    Programmer

  • Members
  • PipPipPipPip
  • 125 posts
Ok,
First can you post the url of the image? I use a wii and you can't veiw img urls or anything.

AND
answer for 4/14/2010:

<html><head></head>

<body>

<script type="text/javascript">

function shw()

{

alert(mtxt)

}

</script>

<form>

<input type="text" name="mtxt">

<input type="submit" value="submit" onclick="shw()">

</form></body></html>


Sorry for posting so late, I was busy fixing my friends computer.
And, did my answer for yesterday's work?
Posted Image

#11
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts

toxifyshadow said:

Sorry to double post but,
How many wins/day do we need until we win the actual contest?

I select a winner everyday ! please note the rules ,

gokuajmes said:

This is not a contest , we don't give you money, freebies :cursing: for giving solutions.


#12
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts

toxifyshadow said:

Ok,
First can you post the url of the image? .

i put no restrictions on the image you use ! you could even take your wallpaper & rename it to up.png add it to the script.

& yes you had answered the challenge1. Your answer for the Challenge2 is also perfect.^^ let me wait until some other contestants are posting their own script !!
Do you need another userbar if you win this Challenge2 ?