It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Displaying fields from table in div when link is clicked?

Displaying fields from table in div when link is clicked?

Postby twilitegxa on Fri Sep 11, 2009 6:13 am

I want to make it to where, if the user clicks a character from the list, that it will display their stats in the div tag on the right. I want the div tag to be hidden until a user clicks one of the characters, and then when they click it, it then displays the stats. Right now, I don't have it initially hidden. How can I make it hidden until they click the character? How can I make a link that will display the stats when the user clicks the character? I need to base the results on which identity the user chooses. My page is being displayed with php.

I have the identities being displayed with php from my table, and I want the user to be able to click an identity and the stats to be displayed in the div tag. How can I do this? It will not let me post my page code because it's in php. :-(
twilitegxa
 
Posts: 7
Joined: Fri Sep 11, 2009 6:02 am

Re: Displaying fields from table in div when link is clicked?

Postby djtonic on Sat Sep 12, 2009 3:26 am

HI twilitegxa,
i'll try to help but the question is worded as if we already know what you are talking about. what character and what is "the list"

Please put it into context because i get the general idea of what you want to do but I don't understand the reason for it.

Also, why can't you post the code here?? just copy and paste into the body of your forum reply and I'll play around. You don't have to upload the actual file.


Tim
djtonic
50+ Club
 
Posts: 88
Joined: Tue Sep 08, 2009 12:38 am

Re: Displaying fields from table in div when link is clicked?

Postby twilitegxa on Sat Sep 12, 2009 4:57 am

For some reason it wouldn't work. It kept saying unable to post php. Here is a link to where I have uploaded the page. Hopefully you can view the source code from there:

http://webdesignsbyliz.com/smrpg/choose_character.php
twilitegxa
 
Posts: 7
Joined: Fri Sep 11, 2009 6:02 am

Re: Displaying fields from table in div when link is clicked?

Postby djtonic on Sat Sep 12, 2009 4:04 pm

ha...character that you play :) I was thinking character as in a letter or number! Makes much more sense to me now


i'll register and take a look a little later.

Tim.
djtonic
50+ Club
 
Posts: 88
Joined: Tue Sep 08, 2009 12:38 am

Re: Displaying fields from table in div when link is clicked?

Postby djtonic on Sat Sep 12, 2009 4:08 pm

need to fix the register/log in error first

timl
djtonic
50+ Club
 
Posts: 88
Joined: Tue Sep 08, 2009 12:38 am

Re: Displaying fields from table in div when link is clicked?

Postby twilitegxa on Sat Sep 12, 2009 6:14 pm

What is the error?
twilitegxa
 
Posts: 7
Joined: Fri Sep 11, 2009 6:02 am

Re: Displaying fields from table in div when link is clicked?

Postby twilitegxa on Sat Sep 12, 2009 7:15 pm

You can log in now. I think I have fixed the problem. I have also made a test log in with a character assigned to it:

username: test
password: testpass

And once logged in, go to the choose_character.php page.
twilitegxa
 
Posts: 7
Joined: Fri Sep 11, 2009 6:02 am

Re: Displaying fields from table in div when link is clicked?

Postby djtonic on Sun Sep 13, 2009 2:04 am

I don't see a character list to choose from...can you point me in the right direction. Also, a suggestion for when you ask a player to build a character you really should give options for people to choose from instead of having to make it all up..more dropdowns!

Since i am having trouble navigating your site feel free to email me the code in question.
I will send you a PM with my email.

Tim.
djtonic
50+ Club
 
Posts: 88
Joined: Tue Sep 08, 2009 12:38 am

Re: Displaying fields from table in div when link is clicked?

Postby twilitegxa on Sun Sep 13, 2009 4:20 am

What kinds of things should they not be able to make up and have to just choose from? The next part, which I am still working on, is where they can choose options from rather than making up their own stuff. I just can't get that part working right yet. :-( Well, part of it works, but part of it doesn't. I have the part where it inserts into the database working, but I need help with the JavaScript that subtracts the points that each attribute costs from the available points that the character has. I can't get it figured out. :-( But the profile before that part is where the player gets to customize, adding the more personal characteristics of their character. The attributes, which is the most important part, is the part of the character creation that I'm having the most trouble with. :-(
twilitegxa
 
Posts: 7
Joined: Fri Sep 11, 2009 6:02 am

Re: Displaying fields from table in div when link is clicked?

Postby djtonic on Sun Sep 13, 2009 11:30 am

twilitegxa....big project! Bravo on even starting it. BTW...I'll play sailor moon rpg when finished.



Tim.
djtonic
50+ Club
 
Posts: 88
Joined: Tue Sep 08, 2009 12:38 am

Next

Who is online

Users browsing this forum: No registered users and 5 guests