Hello,
I have a page connected to an SQL table. The page loops through, creating a
row for each record, displaying in image, the ID of which is set to the
record id. When I click a button to change the image, I'd like to refer to
the ID on the main page, but change the image on the main page. Any idea
how to do this?
Example is as follows
Record 1 ID=1 NAME=Image1 Src=bird.jpg
Record 2 ID=2 NAME=Image1 Src=horse.jpg
Record 3 ID=3 NAME=Image1 Src=cow.jpg
When I open the child window and select a new image for Record 3, I'd like
to change the record 3 src to insect.jpg.
I've changed the value of things based on teh Name element but never the ID.
How do I do that?
Any help would be great!
Thanks in advance!
Rick 2 1411
RWC wrote: Hello,
I have a page connected to an SQL table. The page loops through,
creating a row for each record, displaying in image, the ID of which is set to
the record id. When I click a button to change the image, I'd like to
refer to the ID on the main page, but change the image on the main page. Any
idea how to do this?
Example is as follows
Record 1 ID=1 NAME=Image1 Src=bird.jpg Record 2 ID=2 NAME=Image1 Src=horse.jpg Record 3 ID=3 NAME=Image1 Src=cow.jpg
These are not valid id's. An id:
"...must begin with a letter ([A-Za-z]) and may be followed by any
number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"),
colons (":"), and periods (".")"
Though they probably work in most browsers (but that doesn't make them
valid HTML).
Using identical names for the images will cause problems also, though
most browsers will tolerate it. Names on images should be unique.
Browsers will likely return the first image with the name, but you
should not depend on that behaviour.
Your HTML should look something like like:
<tr><td><img name="Image1" id="Image1" src="brid.jpg"> </td></tr>
<tr><td><img name="Image2" id="Image2" src="horse.jpg" ></td></tr>
<tr><td><img name="Image3" id="Image3" src="cow.jpg"></td></tr>
Others may comment on the use of tables for layout...
When I open the child window and select a new image for Record 3, I'd
like to change the record 3 src to insect.jpg.
I've changed the value of things based on teh Name element but never
the ID. How do I do that?
The easiest way is to use the images collection:
opener.document .images['Image3'].src = 'insect.jpg'
--
Rob
Excellent. Thanks Rob, I will give that a try.
Rick
"RobG" <rg***@iinet.ne t.au> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com... RWC wrote: Hello,
I have a page connected to an SQL table. The page loops through, creating a row for each record, displaying in image, the ID of which is set to the record id. When I click a button to change the image, I'd like to refer to the ID on the main page, but change the image on the main page. Any idea how to do this?
Example is as follows
Record 1 ID=1 NAME=Image1 Src=bird.jpg Record 2 ID=2 NAME=Image1 Src=horse.jpg Record 3 ID=3 NAME=Image1 Src=cow.jpg
These are not valid id's. An id:
"...must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")"
Though they probably work in most browsers (but that doesn't make them valid HTML).
Using identical names for the images will cause problems also, though most browsers will tolerate it. Names on images should be unique. Browsers will likely return the first image with the name, but you should not depend on that behaviour.
Your HTML should look something like like:
<tr><td><img name="Image1" id="Image1" src="brid.jpg"> </td></tr> <tr><td><img name="Image2" id="Image2" src="horse.jpg" ></td></tr> <tr><td><img name="Image3" id="Image3" src="cow.jpg"></td></tr>
Others may comment on the use of tables for layout...
When I open the child window and select a new image for Record 3, I'd like to change the record 3 src to insect.jpg.
I've changed the value of things based on teh Name element but never the ID. How do I do that?
The easiest way is to use the images collection:
opener.document .images['Image3'].src = 'insect.jpg'
-- Rob This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: J. Black |
last post by:
Hello everyone -
I've been developing an incident tracking and reporting system for an
emergency services outfit that I work with part time. It's going
well, except for one fly in the ointment.
The situation is this - I have a dispatch form that is used by
dispatchers to track incidents. An incident number is automatically
assigned with an AutoNumber field once a dispatcher initiates an
incident by opening the dispatch form. I have...
|
by: Neo Geshel |
last post by:
I have examined about 80+ different upload scripts on the 'net, both in
VB and C#, and none seem to do what I need them to do. Perhaps someone
here can point me somewhere that Google hasn't reached yet (I have gone
all the way to page 50 on Google's results!!). Here are my requirements:
• I have a DataGrid. Everything will be done from here. Everything. No
exceptions. Everything will also be done in VB, without any code-behind
to...
|
by: cjaserver |
last post by:
This works fine in IE, but is breaking in Firefox, and reported in
Netscape as well. I can't determine why.
http://www.chartermainstreetgld.com
click on the real estate section on the left nav area.
You can see where the green real estate image is being moved down a
line in firefox, where IE displays it correctly.
|
by: Cardman |
last post by:
I am hopeful that someone can quickly solve my image alignment issue
when things are just not going right and where my attempts to solve
this alignment issue have all failed.
First of all take a look here...
http://www.cardman.com/switches.html
In MIE this page looks perfect. Unfortunately both Netscape and Opera
show these item photos in the wrong place. For some *unknown* reason
all the photos drop down to align with the green...
|
by: Dave |
last post by:
Hey all,
I have a problem and I can't find anything on the net to really address
it. We have a program at work that has lots of numbers on the front of
the form because it is a control program for a hydro plant. My boss
would like me to create a web page so our control center can see all of
the numbers but not have access to the actual form. Some of these
numbers are gathered every second, others every five seconds and still
others...
| |
by: Tom |
last post by:
I need to be able to reference some images stored in my VB.NET program.
Normally, I would load the images into an ImageList control and use
them from there (these are going to be icons). However, I need to be
able to add/delete images from this image 'store' (whatever I end up
using); but because an image list only allows referencing by image
number in the list, when I would delete an image/icon it would 'mess'
up the ones following that...
|
by: jackiepatti |
last post by:
QUESTION:
I have a web page containing a form that contains an image instead of a
submit button, e.g.
<form name='myform' action='get' method='otherpage.asp'>
<input type='image' src='picture.gif' name='myimage' id='myimage'>
</form>
When forms with image types are submitted, the value is not returned;
instead, when the form is submitted, the XY coordinates of the where
the user clicked on the image are sent. For example, if the user
|
by: Fred |
last post by:
Hi People,
I have a bit of a problem on my hands and wondered if anyone here has
done anything similar!
I have a VB6 application that displays an image stored locally (all
easy stuff so far). However I want to store images from all offices
across the country in a central location and then if someone from one
office goes into another I want to call a web service to get their
photo from the central photo store, download it to the local...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |