Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is this possible?

Status
Not open for further replies.

james0816

Programmer
Jan 9, 2003
295
US
Is it possible to have a floating box/layer (what ever it is called) be positioned at a certain spot on the screen based on content in a cell?

i know that sounds a little confusing so let me provide an example.

I have two floating boxes/layers (whatever)

I also have a table set up for dynamic content. So depending on what is displayed in say the first cell of the table...I want to move the box related to it to a certain spot on the screen. The second record....will move the second floating box to a different area.

Does any of that make sense? Let me know if more information is required.

thx
 
You are talking about client side scripting issues. The PHP forum cannot be of much help here unless you have a PHP related question. I suggest the Javascript forum.
 
I have no idea really...all i can tell you is that I am creating a web page using PHP .... no javascripts.
 
PHP code is evaluated on the server. Once th apge is sent off to the client it is out of reach for PHP. The server has finished.

However, you can create PHP code that spits out the required CSS markup to position the <div>...</div> tags according to the content of the cells - but mind that this is mere generation of character data sent to the browser.

Please give more detail what the page is displaying and in what context the positioning is happening.
 
ok...on my page in the upper left hand corner i have my table. this table is linked to my database containing member information. to keep this simple, i'll just say that the table has one column and two rows. row two will contain a city.

also on the page, i have a map displayed with stars over each city where a member is located. if i click on one of the stars, that will of course tell me what record(s) to display in the table.

however....what i also want to be able to do is to have another star (red star in a floating box) move to the position overtop the green one.

so each time a green star is clicked, the member infomation gets displayed and a red star will move to that location.

i know the problem is that by using php content, the page gets reloaded with the new data. that is why i was inquiring about it that way. unless of course you can lend a rookie some advice on maybe an easier way?

does that help?

thx
 
Yes, that helps.
Client side scripting seems to be the solution you should pursue. That could be Javascript, however, reading about your scenario even an interactive Flash solution would come to mind.
You can easily feed data into a flash movie, using PHP. That's how the coordinates, the appropriate map image would be fed to the Flash movie. Action script then can do the client side events for you.
A 'pure' PHP solution would require reload - as you said - and the mouse click coordinates would also have to be reported.
I would go with Flash.
 
hmmmm....i think you have lost me on the movie piece. i'm not all familiar with flash other than i know you use it to record "movies" for web pages...no clue as to putting data in it. Is there someplace you can recommend to get information on this?
 
Movie" was really one of the dummest terms they could have come up with - but they did. It is misleading, has really nothing to do with the common understanding of a movie.
I would call it an interactive control that has states (frames) and responds to user input and programmatic actions.
Even that sounds complicated, but I recommend that you just google for Flash tutorials or ask in the Flash forum where to go to find the best ones.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top