473,322 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

update/requery db

Hello,

I have setup a table with 1 row and 2 columns.In the 1st, I have a
iframe that displays tons thumbnails of images. In the next I have an
image (enlarged). When the user selects a thumbnail it displays the
enlarged image in the 2nd column. This work quite nicely.

Where I need some help is with the fact that each image has an entry
(description in a database table). How can I display the entry when
the image is updated. The image gets updated using javascript but the
page itself is php (as is the rest of the site). I do not want to
reload the page everytime (long and waste of badnwidth).

Thank you for your guidance,

Daniel

Oct 24 '07 #1
4 1570

"Daniel" <d_********@hotmail.comwrote in message
news:11*********************@q3g2000prf.googlegrou ps.com...
Hello,

I have setup a table with 1 row and 2 columns.In the 1st, I have a
iframe that displays tons thumbnails of images. In the next I have an
image (enlarged). When the user selects a thumbnail it displays the
enlarged image in the 2nd column. This work quite nicely.

Where I need some help is with the fact that each image has an entry
(description in a database table). How can I display the entry when
the image is updated. The image gets updated using javascript but the
page itself is php (as is the rest of the site). I do not want to
reload the page everytime (long and waste of badnwidth).

Thank you for your guidance,

Daniel
One way is to have an array of the info built with an entry for each of the
thumbnails. In the second column have the info for that array entry appear
along with the enlarged image.
Oct 24 '07 #2
Shelly,

I had this in the back of my head, but do not know how to approach
it. How can you build an array in memory an change the text
accordingly. Any chance you could give an example?!

Thank you,

Daniel
On Oct 24, 12:53 pm, "Shelly" <sheldonlg.n...@asap-consult.comwrote:
"Daniel" <d_pinea...@hotmail.comwrote in message

news:11*********************@q3g2000prf.googlegrou ps.com...


Hello,
I have setup a table with 1 row and 2 columns.In the 1st, I have a
iframe that displays tons thumbnails of images. In the next I have an
image (enlarged). When the user selects a thumbnail it displays the
enlarged image in the 2nd column. This work quite nicely.
Where I need some help is with the fact that each image has an entry
(description in a database table). How can I display the entry when
the image is updated. The image gets updated using javascript but the
page itself is php (as is the rest of the site). I do not want to
reload the page everytime (long and waste of badnwidth).
Thank you for your guidance,
Daniel

One way is to have an array of the info built with an entry for each of the
thumbnails. In the second column have the info for that array entry appear
along with the enlarged image.- Hide quoted text -

- Show quoted text -

Oct 24 '07 #3

"Daniel" <d_********@hotmail.comwrote in message
news:11**********************@q3g2000prf.googlegro ups.com...
Shelly,

I had this in the back of my head, but do not know how to approach
it. How can you build an array in memory an change the text
accordingly. Any chance you could give an example?!

Thank you,

Daniel
Show us your code for that page. It would make things easier for people to
help. Specifically, exactly what code are you using to refresh the enlarged
image area?

In **general**, one way to build the array (put in your appropiate error
checking, of course) is:

$res = $mysql_query("the_query_string", the_db_handle);
$numElementInArray = mysql_num_rows($res);
$theArray = array();
for ($i=0; $i<$numElementInArray; $i++) {
$row = mysql_fetch_array($res);
$theArray[$i] = $row['identifier'];
}

Then in the appropriate field in the html area you might have something
like:
<p><?php echo $theArray[$i]; ?></p>

where, of course, $i corresponds to the index of the particular thumbnail
selected (its value).

More or less, this is the kind of thing you would be doing.

Oct 24 '07 #4
I found a method, maybe not the best, but it is functional. I simply
generate the page while adding a 2nd variable to the onclick event for
each image where I place the description. Then mod the onclick event
to populate the innerHtml for the element.

Only issue is the 2nd variable can be up to 255 chrs. If you have
another method, I am all ears!

Thank you,

Oct 24 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JJMM | last post by:
Hi, I have a form (form1) with a large number of subforms inside it (around 20 subforms), There is the possibility of filtering the data using a pop-up form that create/change a query (all the...
4
by: Norm | last post by:
Hi All, When a table is linked to a form, Access normally updates the entire table when that record is closed. The fields don't get get updated in the table as they become changed. I've got...
4
by: N. Graves | last post by:
Hello... thank you for your time. I have a form that has a List box of equipotent records and a sub form that will show the data of the equipment select from the list box. Is it possible to...
3
by: Colleyville Alan | last post by:
I have a incremental search box that has been working fine for a couple of months but is now acting up. This search box is from the cd that comes with Getz's book, so I did not write it and have...
4
by: deko | last post by:
I'm a little nervous about slamming my database with a dozen Update queries in a loop that all modify RecordSources of open forms. Will the use of DoEvents and/or a Sleep function ameliorate any...
6
by: Dugo | last post by:
I'm trying to use a "keypad" form (with command buttons for numbers 0 thru 9) I developed to allow users to first click a textbox on one form, then click a number on the keypad and have the value...
6
by: Mark | last post by:
Hello. I have a listbox whose rowsource is set to a saved query (call it "qry_customer_list.") When I add customers to my database, I call the listbox Requery method so that the listbox will...
9
bhcob1
by: bhcob1 | last post by:
Hey guys, 'Update or CancelUpdate without AddNew or Edit' On my database i keep occasionly get this error when i try and edit a field, it is not everytime. It will be working fine and then this...
1
beacon
by: beacon | last post by:
Hi everybody, I have an Employee table with the following: Table - Employee -------------------------- ID: AutoNum, PK FName: Text LName: Text Status: Yes/No
6
by: deewe | last post by:
Hello, On an LostFocus event I'm trying to update another field that is tied to a DLookUp query. I'm able to update all the form fields but I don't find a way to update only one field. The...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.