473,813 Members | 3,379 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1589

"Daniel" <d_********@hot mail.comwrote in message
news:11******** *************@q 3g2000prf.googl egroups.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.comwrot e:
"Daniel" <d_pinea...@hot mail.comwrote in message

news:11******** *************@q 3g2000prf.googl egroups.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_********@hot mail.comwrote in message
news:11******** **************@ q3g2000prf.goog legroups.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("t he_query_string ", the_db_handle);
$numElementInAr ray = mysql_num_rows( $res);
$theArray = array();
for ($i=0; $i<$numElementI nArray; $i++) {
$row = mysql_fetch_arr ay($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
7477
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 subforms are linked to that query), Once that I create/change the query (using the pop-up form), Is there any easy way to update all the 20 subforms inside form1?. Normally I use to change the recordsource in each subform to show the
4
3164
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 multiple users accessing my database, so I need the fields in a record to be updated immediately when they change. I cannot wait until the user closes that record for the fields to be updated, as other users will be using old data.
4
26207
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 make a change in the name field in the details, then refresh the list box with new name? Please help and thanks!
3
3437
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 only a superficial understanding of how it works. I have had some trouble in the past when my code goes to another form and comes back sometimes the search function did not work properly. Then I added a line to requery it and it worked fine. ...
4
6927
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 risk involved in doing this? Should I include a Requery in the loop after executing each query? For example: For each varQry in Array("qryDeleteOldTransactions", _ "qryDeleteClient Acct", etc., etc.) db.Execute varQry
6
3077
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 entered in the textbox. It's all seemingly working except that I have an AfterUpdate event set for the textboxes and that event is NOT triggered when I use the keypad to enter data. If I enter numbers with the regular keyboard, the even is...
6
9989
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 display the customers that I added. Unfortunately, the listbox display does not change. If I close the form and reload it, then the listbox will show the new customers. Any suggestions on how to fix this?
9
7756
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 error appears. I will be editing records and then a random one will get the error. A bit of background on my form, this will seem a bit lengthy but here is my code. The form has a navigation list which the user can select a record to view. An...
1
1874
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
10229
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 below tests update all the fields - Me.Recalc - Me.Controls("Txtbox_RatioDev2").Recalc
0
9734
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10664
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10404
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10139
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9220
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7678
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5568
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4357
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3881
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.