PC Review


Reply
Thread Tools Rate Thread

alter img element using vbscript?

 
 
teejayem@gmail.com
Guest
Posts: n/a
 
      4th Oct 2007
I have an image <img src"contract.gif" alt"Contract" />

Is there anyway I can change the image using VBScript?

 
Reply With Quote
 
 
 
 
Brian K. Williams
Guest
Posts: n/a
 
      4th Oct 2007
I haven't used VBScript in years; you can use JavaScript like this:



First give the element an ID.

<img id="MyImage" src="contract.gif" alt="Contract" />



Then:

document.getElementById("MyImage").src = "../images/new.gif";



Regards,

Brian K. Williams

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have an image <img src"contract.gif" alt"Contract" />
>
> Is there anyway I can change the image using VBScript?
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing WCF Calls based on Body Element - How to rout empty element? Tino Donderwinkel Microsoft C# .NET 0 7th Aug 2010 09:59 AM
Element 'ElephantTreeView' is not a known element. This can occur ifthere is a compilation error in the Web site, or the web.config file ismissing. Dave Microsoft C# .NET 4 7th Jul 2010 02:11 AM
Can't code a css class that makes a span element the same size as a button element Cal Who Microsoft ASP .NET 5 26th Apr 2010 06:35 PM
Question about ALTER TABLE and ALTER COLUMN BobV Microsoft Access VBA Modules 7 20th Sep 2006 02:06 PM
Element 'Element Name Here' is not a known element. This can occur if there is a compilation error in the Web M Noreen Microsoft Dot NET 3 17th Apr 2006 07:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:02 AM.