Solved

Actually VBScript - images do not display

Posted on 2002-07-18
8
244 Views
Last Modified: 2010-08-05
Ok, I have an issue.

I want to add rows to a table and in each row is an image (a very small one).  now when i add the rows and the image tags everything is fine except the image does not appear.

I am sure it is because i am adding the image to the page from the client,but WHY? how do i fix that?

Thanks,
Chris

P.S. I can NOT refresh the page.
0
Comment
Question by:turbosig
8 Comments
 
LVL 20

Expert Comment

by:jitganguly
ID: 7162535
The img tag needs a src location that tells you where the image file is stored.
When you do it in Client side ( you said can not refresh page), it has to be stored somwhere with the same place wher you specify src in img tag.
Check that , and it should work
0
 
LVL 2

Author Comment

by:turbosig
ID: 7162700
I am not sure I understand. the src="line.gif".  It is in the same folder (location) as the page.
0
 
LVL 3

Expert Comment

by:tejaspurani
ID: 7162781
just for knowledge can u show me the code
how u reference the cliend side image from server page?

T.P.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 20

Expert Comment

by:jitganguly
ID: 7162828
TP,
May be he is just doign everything on Clientside.

turbosiq,
When you add a new row are you referrign to the same loction ? Does the gif/jpeg file exists ?
0
 
LVL 30

Expert Comment

by:third
ID: 7163662
i agree with TP, could you show some code please?
0
 
LVL 29

Accepted Solution

by:
Göran Andersson earned 50 total points
ID: 7169334
Here is an example on adding rows to a table. When using innerText, it's not parsed as HTML, so the html code in the second cell will appear as text. When using innerHTML, the html code is parsed, so in the third cell, it will appear as an image.

Note: This is IE only. It should work in N6 with some adjustments, though.

<html>
<head>
<script>
function addRow()
{
     var tbl=document.all.MyTable;
     var row=tbl.insertRow();
     var cell=row.insertCell();
     cell.innerText='Image:';
     cell=row.insertCell();
     cell.innerText='<img src="MyImage.gif">';
     cell=row.insertCell();
     cell.innerHTML='<img src="MyImage.gif">';
}
</script>
</head>
<body>
<table id="MyTable" border="1">
     <tr>
          <td>Type</td>
          <td>Code</td>
          <td>Image</td>
     </tr>
</table>
<input type="button" value="add" onClick="addRow();">
</body>
</html>
0
 
LVL 58

Expert Comment

by:Gary
ID: 8845504
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept Answer by GreenGhost
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now