Javascript onClick button display image.

This is a discussion on "Javascript onClick button display image." within the JavaScript Forum section. This forum, and the thread "Javascript onClick button display image. are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 12th, 2005, 13:00
kal kal is offline
Junior Member
Join Date: Dec 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Javascript onClick button display image.

Hi,
wondering if anyone could help me.

I have a small script which opens an external application, at the click of a button.

What i want to do is extend the script, so that once the button is pressed and image will display next to the button on the web page.

i have a default image which should always show, unless the button is clicked upon, in which case the image should change.

My code so far is as follows:-

<script language="JavaScript">

function func_snapshot()

{
var myshell = new ActiveXObject( "WScript.shell" );
myshell.run( '"C:/Documents and Settings/klp/My Documents/SNAPSHOT PRODUCT IMPORT-EXPORT-CATALOGUE PROGRAM/snapshot.exe"', 1, true );

}

</script>

<INPUT TYPE="button" NAME="button2" VALUE="SnapShot" ONCLICK="func_snapshot()"></INPUT>

<IMG src="C:/Documents and Settings/klp/My Documents/My Pictures/3.jpg" width="25" height="25" name='snapshotpic'>

Can anyone help, please.

Cheers.
Reply With Quote

  #2 (permalink)  
Old Dec 14th, 2005, 15:24
Banned Member
Join Date: Sep 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Javascript onClick button display image.

<html>
<head></head>
<pre>
c:\web\jtest22x.htm Wednesdae 14 Des 05 at 1020
1. klik tu get dif pik
<body bgcolor="#aaffbb" text="black"> <!bakground=lite green>
</pre>
<input type=text size=25 value="klik heer tu chaenj pix"
style="cursorointer;cursor:hand;border:3 solid red"
onClick="document.pik1.src='beer.gif'">
<img border=0 src="andy.gif" name=pik1>
</body>
</html>
Reply With Quote
  #3 (permalink)  
Old Dec 14th, 2005, 21:50
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: Javascript onClick button display image.

muneepenee please, use better language its happening all the time you have been warned many times :/
Reply With Quote
Reply

Tags
javascript, onclick, button, display, image

Thread Tools

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] display image if javascript not enabled Voodoochilli JavaScript Forum 1 Oct 4th, 2007 13:58
Image onClick event... mrunclesam JavaScript Forum 3 Jan 1st, 2007 13:21
Image map onclick play music kathyc20 JavaScript Forum 0 Jun 25th, 2006 18:22
Urgent help in Javascript calendar display cloudymegz JavaScript Forum 3 Jan 8th, 2006 14:37
javascript button color Monie JavaScript Forum 5 Feb 11th, 2005 10:56


All times are GMT. The time now is 09:54.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43