/    Sign up×
Community /Pin to ProfileBookmark

NHL 10 Player Creator

I’m not sure if this is the place for this or not… if not please disregard.

First off here is what I have to work with: [url]http://nhl10.atspace.com[/url]

That is a player creator for NHL 10 from EA Sports. What I would like to be able to do is link builds that I have created to other people or have some way to save and display my build to other users.

I am very new to Javascript so i’m not even sure if its possible. The best case scenario would be the ability to simply link a build using a URL that contained the build info (like many similar player creators are now). Optionally the abillity to have a “Save” button and even have it save as a new page would suffice as well.

I have been told that fragment identifiers might do what I’m after but am unsure on how to implement them into the existing code.

I am the host of the atspace site linked above and I’m not the original coder but do have permission from him to modify it.

Anywho if this is the wrong place for this kind of help please direct me to a better suited forum

Thanks!

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@WoodroweBonesauthorApr 27.2010 — I'm guessing this would require alot of effort?

If someone could even point me in the right direction to even say have a URL I can input that will change even one value I can maybe take it from there?
Copy linkTweet thisAlerts:
@SpinnerApr 28.2010 — Do you have server-side access where this page is hosted?

Can you then store the data in a database, or is there a point in trying to keep this javascript-only?

What you are asking is no small task, and would involve a lot of serialising, parsing, and of course updating all the values if a query comes in with data to be displayed....

The good news is that all the TDs holding the actual data have unique IDs, so it is certainly possible to fetch the data. There seems to be some functionality in the included js-files, so you wouldn't have to start entirely from scratch either, but hehe, there is much to do here.

You won't be able to pull this off without learning a good deal about javascript, specially arrays and DOM-nodes. So get cracking on some JS-tutorials out there, and return to the problem at hand in a week?

Not the answer you were hoping for, I bet. ?
Copy linkTweet thisAlerts:
@WoodroweBonesauthorApr 28.2010 — Yeah it wasnt the answer I was hoping to hear but it was the answer I was expecting to hear :p

I was hoping that because they all had unique ID's I could use fragment identifiers to append them to the URL to populate the data (or something similar) but I dont think they work that way.

I do have server side access but if its that much work im not sure I'll put in the effort

Thanks for the response though!
Copy linkTweet thisAlerts:
@WoodroweBonesauthorApr 28.2010 — Ok I've been thinking about this and like you said all of the elements have unique IDs. Lets start simple.

Currently when you go to the site it by default selects the "Dangler" player type. Is there a way that I can make it start with a different player type using a fragment identifier? Something like http://nhl10.atspace.com/?type=Sniper

Do I only need to modify the following code:

<label for="type">Build:</label><select id="type" onchange="change_build();">

<option name="dangler" selected="selected">Dangler</option>

<option name="playmaker">Playmaker</option>

<option name="sniper">Sniper</option>

<option name="pfwd">Power Forward</option>

<option name="offd">Offensive D</option>

<option name="defd">Defensive D</option>

<option name="grider">Grinder</option>

<option name="tgo">Tough Guy (O)</option>

<option name="tgd">Tough Guy (D)</option>

</select>


Or do I need to modify the javascript itself? If so I'm guessing some sort of Function that runs "OnLoad" that grabs the string from the URL?
Copy linkTweet thisAlerts:
@SpinnerApr 29.2010 — I have just written a little article about how to pick up variables from the query-string.

I wrote it just for you, so I hope it can be of help.

Here you are:

http://christian.lassem.com/js/parsing-the-query-string-with-javascript/

It's 02:00 after midnight here now, so I am going to call it a night. But I might have some time tomorrow afternoon.
Copy linkTweet thisAlerts:
@WoodroweBonesauthorApr 29.2010 — That is an awesome article and will be VERY helpful!

Thank you very much it is much appreciated and now that I've got the ammo I'll probably work away until I get it... I love a challenge ?

Thanks again!
×

Success!

Help @WoodroweBones spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,
)...