|
|
Subject:
VBS script programming question.
Category: Computers > Programming Asked by: iboz-ga List Price: $20.00 |
Posted:
10 Jun 2004 07:31 PDT
Expires: 15 Jun 2004 10:17 PDT Question ID: 359162 |
I have a page with VBS script that has a function that works when this button is pressed. <form name = "PrtSel"> <p align="center"> <select name=Printer> <option value="1" selected>1 <option value="2">2 <option value="And so on">And so on </select> <INPUT TYPE=button VALUE="Install Printer" NAME="Install"> and the following function is called successfully. <SCRIPT LANGUAGE=VBScript> <!-- Sub Install_OnClick .......................... .......................... End Sub --> </SCRIPT> What I want to do is also to be able to press on the image map on the same page and change the value of PrtSel and call the same function and at the same time not to link to anywhere. So when you press on that area, only the function gets called and nothing else happans. I need to know what will go into href and whatever else may need to be done. If you have any questions or would need any clarification, send me an email. Thanks. |
|
There is no answer at this time. |
|
Subject:
Re: VBS script programming question.
From: crythias-ga on 10 Jun 2004 09:36 PDT |
I did this before, so maybe it'll help. I'm not sure how it relates to vbscript, however. <SCRIPT language="javascript"><!-- function updateroom(room) { document.bldg.rmnum.value= room; } //--></SCRIPT> <FORM ... name="bldg"> <select name="rmnum"> .... </select> </FORM> <MAP name="mymap"> <Area shape="rect" coords="300,154,261,101" href="javascript:updateroom('ED103');" ALT="ED103"> </MAP> |
Subject:
Re: VBS script programming question.
From: iboz-ga on 11 Jun 2004 09:34 PDT |
Thank you very much for the comment but the only problem I have is that I need to have this done in VBS. I have code that has been done in VBS and I have been told that it can only be VBS. Would you be able to give me similar example but in VBS? Thanks a lot. |
Subject:
Re: VBS script programming question.
From: crythias-ga on 11 Jun 2004 09:54 PDT |
Based upon this http://www.intranetjournal.com/corner/wrox/progref/vbt/ch21_17_first_ex.shtml and this http://www.intranetjournal.com/corner/wrox/progref/vbt/ch21_21.shtml and this http://forums.aspfree.com/showthread.php?t=29357 I don't think what I gave you is far off from the answer. I *THINK* (about 95% sure) it'll be something like: <SCRIPT language="VBScript"><!-- Sub updateprinter(clickvalue) document.PrtSel.Printer.value= clickvalue; End Sub //--></SCRIPT> <FORM ... name="formname"> <select name="selectname"> .... </select> </FORM> <MAP name="mymap"> <Area shape="rect" coords="300,154,261,101" href="vbscript:updateprinter(1)" ALT="PrinterName"> </MAP> If that doesn't work (I've spent all of 5 minutes learning vbscript for web pages, but the concepts are nearly identical to javascript), please let me know. |
Subject:
Re: VBS script programming question.
From: crythias-ga on 11 Jun 2004 09:56 PDT |
sorry. replace "formname" with "PrtSel" and "selectname" with "Printer" (I was trying to match your code, and got too generic later. |
Subject:
Re: VBS script programming question.
From: iboz-ga on 14 Jun 2004 11:12 PDT |
I will give it a try and I will let you know .. thank you very much for your help... I greatly appreciate it. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |