473,509 Members | 2,951 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change img dynamically works IE not NS6

I am trying to change the image in a TD with a file input.
This works great in IE but I can't get it to work in NS6+(the page
will only be accessible to NS6+).
Code Snippet:
<HTML><HEAD>
<TITLE>Test Image</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function addImage(){
var daImage
daImage = document.FinalForm.imgInput.value;
// following is one line
document.getElementById('container').innerHTML = '<IMG
SRC=\"'+daImage +'\" WIDTH="335" HEIGHT="188" >';
}
</SCRIPT></HEAD>

<BODY>
<TABLE WIDTH="335" BORDER="1" HEIGHT="188" ALIGN="LEFT" ID="imFile"
BGCOLOR="#FFFFFF">
<TR>
<TD ID="container" HEIGHT="178" TITLE="Left click on entries to drag">
</TD>
</TR>
</TABLE>
<FORM Name="FinalForm">
<INPUT TYPE="FILE" ID="imgInput" NAME="UplFile"
ONCLICK="document.getElementById('imgOK').style.vi sibility='visible';">
<INPUT TYPE="BUTTON" ID="imgOK" VALUE="OK"
ONCLICK="addImage();document.getElementById'imgOK' ).style.visibility='hidden';"
STYLE="visibility:hidden">
</FORM>
</BODY>
</HTML>
THank You
Jul 23 '05 #1
4 1368
jhahn wrote:
I am trying to change the image in a TD with a file input.
This works great in IE but I can't get it to work in NS6+
Using <http://validator.w3.org/> may help.
(the page will only be accessible to NS6+).
Nonsense. <http://pointedears.de/scripts/test/whatami>
Code Snippet:
[Invalid HTML]

PointedEars
Jul 23 '05 #2
Thomas 'PointedEars' Lahn wrote:
jhahn wrote:

<--snip-->
(the page will only be accessible to NS6+).

Nonsense. <http://pointedears.de/scripts/test/whatami>


What is nonsense is your belief that people who say "the page will only
be accessible to NS6+" are relying on the userAgent string to identify
it, which is NOT the only way to find it. Learn the difference.
Jul 23 '05 #3
Randy Webb wrote:
Thomas 'PointedEars' Lahn wrote:
jhahn wrote:

<--snip-->
(the page will only be accessible to NS6+).

Nonsense. <http://pointedears.de/scripts/test/whatami>


What is nonsense is your belief that people who say "the page will only
be accessible to NS6+" are relying on the userAgent string to identify
it, which is NOT the only way to find it. Learn the difference.


There is no reliable way to identify a user agent as Netscape 6+, using
the User-Agent header (or navigator.userAgent) or not. STFW, RTFM.
PointedEars
Jul 23 '05 #4
Thomas 'PointedEars' Lahn wrote:
Randy Webb wrote:
Thomas 'PointedEars' Lahn wrote:
jhahn wrote:


<--snip-->
(the page will only be accessible to NS6+).
Nonsense. <http://pointedears.de/scripts/test/whatami>


What is nonsense is your belief that people who say "the page will only
be accessible to NS6+" are relying on the userAgent string to identify
it, which is NOT the only way to find it. Learn the difference.

There is no reliable way to identify a user agent as Netscape 6+, using
the User-Agent header (or navigator.userAgent) or not. STFW, RTFM.


I never said it *was* possible to identify it via the user-agent header
or the navigator.userAgent string. What I said was your assumption that
anybody that says "only accessible to browser XXX" is relying on the
user Agent string was a nonsense argument. And yes, I can differentiate
NS6 from other browsers, and without using the userAgent string.

What you need to do is learn to read what is typed, learn to understand
it, and then read it.

And, I will give you a chance to prove me wrong. Want the opportunity? I
have a page that is *only accessible* to NS6. Care to take the
challenge? If you can open it with any browser other than NS6, you win.
How confident are you?
Jul 23 '05 #5

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

Similar topics

10
9093
by: TheKeith | last post by:
I don't know much about javascript, so take it easy on me. Is there a way to dynamically change a CSS layers dimensions on the fly. Here is what I'm doing. I have a bunch of thumbnails that when...
1
2059
by: Amir Eshterayeh | last post by:
Dear Friends I need to change the css file of my aspx files dynamically so users can choose their css file names and when page loads, it read css file name from database. I try to use...
5
45917
by: coolsti | last post by:
Can someone tell me how to do this if it is possible? I have a table based web site, and I would like to dynamically change the text that is shown in a particular cell of a table. I give the cell...
3
5563
by: Roman Gordin | last post by:
Hi, I use SVG for web-GUI, but found some serious restrictions 8-( When I use HTML (dynamically generated from .php), I may use HTTPRequest object to provide dynamically regeneration some part...
4
20751
by: codemonkey | last post by:
TIA! I would like to know if there is a way to dynamically change the colors of Subform items? I have already set in place Conditional Formatting so each row has an alernating color scheme, but...
7
3247
by: Tim T | last post by:
Hi, I have the need to use dynamically loaded user controls in a webform page. I have the controls loading dynamically, and that part works fine. this is the code used in a webform to dynamically...
6
5552
by: Guogang | last post by:
Hi, is there a way to change the page's title in code behind (C#)? I want to change this part: <HEAD> <TITLE> Can be changed dynamically. </TITLE> </HEAD> Thanks, Guogang
5
130203
by: VB Programmer | last post by:
How can I change the font size of a text box dynamically? I tried this but it didn't work. It said 'Size is Read-Only'. Any other ways around this? Here's the code: txtDisplay.Font.Size = 10
2
5147
by: Rob Roberts | last post by:
In a VS2005 ASP.NET project, I'm trying to find a way to change which css file is linked in based on the browser type. I'd like to use one css file for IE browsers, and a different one for all...
7
6633
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
0
7237
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,...
0
7137
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...
1
7073
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...
0
7506
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...
0
4732
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
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...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
779
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
443
bsmnconsultancy
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...

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.