Jump to content

array prob


loveamit

Recommended Posts

And just how is this an "array prob"?

 

At least you have improved your writing since your last post with this subject name.  Don't have a clue what you are doing though.  One hint - usually people come to the forums with code (as you did before) and a problem rather than simply posing some situation you want to have written for you.

 

As a general rule people who simply beg for help and say please please please do not get any better help than those who write intelligent posts that provide code, concise error/problem descriptions and requests for understanding. 

 

From what little I can imagine re: your brief post, you seem to want to produce an html div for each record you get from your php code's query and that you want that div produced by javascript.  This would imply that you are doing an ajax request so that the results can  be handled by the JS code that made the request.  For a person who seems to be in the early stages of a web development career(?) you are attempting to do some very complex programming as a starting point.  Perhaps you might consider just making this a php only task and simplify your project.

Edited by ginerjm
Link to comment
Share on other sites

"I am interested to learn how to write the necessary HTML and javascript that, when I click on a <div> containing data from a record of a recordset, that <div> will be visible."

 

Commonly referred to as a "tabbed" display, one would:

* Loop through the recordset.

* Each iteration will build a <div id="id#"> block with id# being a reference to the record, such as $record['id'] and,

* Each iteration add a tab (using css) to build up a series of tabs.

 

That will result in a row of tabs followed by a series of <div> blocks of code, each with a unique id.

 

In javascript, you will initially set all divs to have a visibility attribute of hidden, then make visible the first div. The javascript will be triggered on a click event from a tab, which will make visible the resective div.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.