iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old December 12th, 2005, 10:00 AM   #1
kal
New Member
 

Join Date: Dec 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 kal is on a distinguished road
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.
kal is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 14th, 2005, 12:24 PM   #2
WebForumz Member
 

Join Date: Sep 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 muneepenee is on a distinguished road
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>
muneepenee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 14th, 2005, 06:50 PM   #3
Most Reputable Member
 

Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 22
Posts: 1,063
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 sypher has a spectacular aura about sypher has a spectacular aura about
Re: Javascript onClick button display image.

muneepenee please, use better language its happening all the time you have been warned many times :/
__________________
North Wales Web Design - sypher design
sypher is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
javascript , onclick , button , display , image


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 1 October 4th, 2007 10:58 AM
Image onClick event... mrunclesam JavaScript 3 January 1st, 2007 10:21 AM
Image map onclick play music kathyc20 JavaScript 0 June 25th, 2006 03:22 PM
Urgent help in Javascript calendar display cloudymegz JavaScript 3 January 8th, 2006 11:37 AM
javascript button color Monie JavaScript 5 February 11th, 2005 07:56 AM


Search Engine Optimization by vBSEO 3.2.0 RC8