[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Actually VBScript - images do not display

Posted on 2002-07-18
8
Medium Priority
?
250 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 200 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

650 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