Grow your CSS skills. Land your dream job.

Grab data and display it in a form on the same page?

  • # March 31, 2009 at 12:52 am

    Alright, so lets say I have 4 divs that contain 4 different span tags. Inside these span tags there will be information that I want to put into a form. However, the information in the span tags only appears after the user begins and the ends the timer (i am using javascript/jquery to create timers to display the amount of time between when the start and stop buttons are pressed).

    After stop is pressed, the time is inserted into the respected span tag. Once every timer has been started and stopped, I want to be able to grab the four separate times and put them in a form that will show up later on (with the use of some jquery).

    Note that all of this is on the same page. I don’t want to submit anything until these timers have been used. I’m just wanted to fill in the form at this point.

    I feel like this might be easier than I think, but I cannot figure out how to do this. There has to be a way to set a php variable to the name attribute of a specific html tag. For example, if one of my span tags has the name "time1", can I do: $firstTime = param(‘time1′); or something of the like?

    Thank you and I hope I explained this okay.

    # March 31, 2009 at 11:26 am

    Figured out my problem :D

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".