help system, help!

Hi,

Im trying to code in VB a help system for my web form.

I have 1 label (lblhelp) and several textboxes, what i want to happen is that when a user clicks inside (or even mouseovers) one of the textboxes, the lblhelp populates with help text (different text per text box)

i have no clue where to even start with this, although im thinking it would be nice to create a function that i can use throughout the project.

any ideas?


www.the-web-shed.com
0
mike7510uk
4/11/2008 8:40:35 AM
asp.net.client-side 24353 articles. 2 followers. Follow

9 Replies
826 Views

Similar Articles

[PageSpeed] 25

You would typically use client-side scripting such as Javascript for this. You'll want to create a Javascript function and handle the onfocus and onmouseover events. Inside that function, you can set the value of the label. All very straightforward and you can find hundreds of examples, here's just one:

http://www.exforsys.com/tutorials/javascript/javascript-events-handling.html

Good luck


www.codingthewheel.com - Building the collective hamster wheel, one line of code at a time.
0
CodingTheWheel
4/11/2008 10:57:43 AM

yes i thought that would be the case.

Is there no way to do this in VB?


www.the-web-shed.com
0
mike7510uk
4/11/2008 11:15:53 AM

Well, you'd use VB to generate the page content and so forth, but once that's been sent down to the browser, any changes have to be made using a client-side technology like Javascript or VBScript. Or require another trip up to the server.

You could use AJAX to send off a request when the user hovers over the textbox, generate the content on the server side, then use Javascript to inject the content.. but you're still looking at using Javascript.

The problem being, your VB wants to run on the server, whereas the behavior you need is best performed after the page has been downloaded the browser. So that puts you at the mercy of client-side technologies and there's your problem. Is there some reason you don't want to / can't use JS?


www.codingthewheel.com - Building the collective hamster wheel, one line of code at a time.
0
CodingTheWheel
4/11/2008 11:52:48 AM

hi, thanks for reply,

no there is no real reason, just wanted to see if it could be done in VB.


www.the-web-shed.com
0
mike7510uk
4/11/2008 12:57:45 PM

could i not add the attribute.add ("onmouseover") to my textbox then somehowdisplay what i want to display in my label?


www.the-web-shed.com
0
mike7510uk
4/11/2008 3:12:16 PM

Sure you can, but once again, that would be using Javascript. The above line just adds an onmouseover attribute to the tag. The value of that attribute still needs to be set to a client side script supplied by you.

Take a look at the generated HTML and you'll see what I mean.

To put it precisely, you can assign the handler using VB, as this is just generating content like any other content. But the piece of code that actually injects that text into the label in response to an onmouseover event is going to have to be a client-side script. If that makes sense.


www.codingthewheel.com - Building the collective hamster wheel, one line of code at a time.
0
CodingTheWheel
4/11/2008 4:05:33 PM

This is what I use (I code in C#, but the same would apply to VB) and no, there's no JavaScript (at least that you would have to write):

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/HoverMenu/HoverMenu.aspx

The HoverMenuExtender would point to your TextBox control or other element in your markup, then inside of the asp:Panel (instead of Label) you could put a DynamicPopulate control, http://www.asp.net/AJAX/AjaxControlToolkit/Samples/DynamicPopulate/DynamicPopulate.aspx. Then point it at a page method and write your help content in VB and return it to the caller.

With these 2 controls you would not need to write any JavaScript (ASP.NET and the AJAX Control Toolkit do it for you at run-time). All you need is a page method and violla!

- Hope that helps.

Chad


Chad Scharf
http://www.chadscharf.com

Don't forget to click "Mark as Answer" if someone answers your question.
0
chadscharf
4/11/2008 4:46:37 PM

Chad it's a good point you make. Well, I'm not sure I see how this approach solves the "don't use Javascript" question but I guess it allows you not to have to write any Javascript, which is the next best thing. Of course, OP wasn't necessarily going to have to write a lot of Javascript in the first place.

The real problem I'm having is the server round trip which AJAX would require - in response to a mouseover event. Why's it necessary? Seems cleaner to download all the page data at once, in the initial request, and then use local JS to turn the correct parts of the content on or off. No latency that way, and much simpler under the hood. At least this is my take based on what the OP has said.

 


www.codingthewheel.com - Building the collective hamster wheel, one line of code at a time.
0
CodingTheWheel
4/11/2008 5:22:16 PM

This is true, although I was assuming the content would need to be dynamic somehow from the server at run-time.

If not, he can still use the HoverMenuExtender and simply create a single div/asp:Panel for each control he wants the help context on, minus the dynamicpopulate control, you now have to write no javascript, and there is no round-trip to the server.

Regards.


Chad Scharf
http://www.chadscharf.com

Don't forget to click "Mark as Answer" if someone answers your question.
0
chadscharf
4/11/2008 5:42:01 PM
Reply:

Similar Artilces:

HELP!HELP!HELP!HELP!HELP!HELP!
I was using powerbuilder4.0 a month ago I decided that migrate it to PB7.0 When Im using 4.0, in datawindows I was using extra colums additional to stores procedure. I mean that for example; stored proc. returns 4 columns. I was using 2 extra columns to modify something from client. But I cant do the same thing in PB7.0. How can I do that??? please help. Gurcan yucel gyucel@infina.com.tr "I was using 2 extra columns to modify something from client." what does this mean that you added to the result set? If so then just goto the SQL and add a param. Then set the...

Help Help Help Help Help Help
------=_NextPart_000_0074_01C2960E.EBE13A30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Can someone please help me. I have installed mysql on Unix Solaris and it works fine I have Perl installed previously which is working and with which i have installed other perlmodules before and are working fine. I have also installed DBI and it works fine with the Sybase drivers which i have installed. When i tried to install the Msql-Mysql-modules-1.2219 drivers i get the following error. # make /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/...

Help Help Help Help
i need to create a crosstab report using Crystal reprot for VS 2003 i face aproblem when i need to order my Fileds by their names my data must be like this Basic Cola Housing Gross Deduction1 Deduction2 Deduction3 Net but when i run my report it give my a not sorted data acutally i have acode field which can i order field using it. but i don't knwo how to do thisSo..................? Select Report tab | |-->Select Record Sort expert Choost the fields you want to sort --Select the corresponding sort direction f...

help help help help
Name: chef mario Email: chefusa_at_pacbell.net Product: Firefox Summary: help help help help Comments: Heard great reports about Firefox!!! Downloaded & installed Firefox !!!! Lost All my very very valuable BOOKMARKS!!! CAN ANYONE HELP!!!!! All bookmarks were in Internet Explorer Did bookmark transfer to Firefox. Seem the Fox eat all m,y bookmarks Need serious help anyone. chef mario Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051025 Firefox/1.5 ...

HELP!!!HELP!!!HELP!!!
I try set picture to database and import it to picture control. Why SetPicture funktio dosen�t work? blob b, tot_b integer li_FileNum, loops, i, ret long flen, bytes_read, new_pos string txtname, named string defext = "BMP", Filter = "bitmap Files (*.bmp), *.bmp" ret = GetFileOpenName("Open Bitmap", txtname, named, defext, filter) SetPointer(HourGlass!) flen = FileLength(txtname) li_FileNum = FileOpen(txtname, StreamMode!, Read!, LockRead!) IF flen > 32765 THEN IF Mod(flen, 32765) = 0 THEN loops = flen/32765 ELSE loops = (flen/32765...

help! help! help!
I got such errors while installing a new replication server,please help me !Thanks a lot. T. 2003/05/29 14:21:24. (-1): Hardware Exception: c0000005, EXCEPTION_ACCESS_VIOLATION T. 2003/05/29 14:21:24. (-1): Thread GLOBAL RS(GLOBAL RS) infected with signal -1073741819 T. 2003/05/29 14:21:24. (-1): ***************STACK TRACE*************** T. 2003/05/29 14:21:24. (-1): *****thread GLOBAL RS(GLOBAL RS)******* T. 2003/05/29 14:21:24. (-1): unknown function 0x0038c559 () T. 2003/05/29 14:21:24. (-1): unknown function 0x0038bb65 () T. 2003/05/29 14:21:24. (-1): pc: 0x00468934, err_h...

Help!help!help!
Whether can I set a window to be unmoveable when the application is run,whatever the window is normal or max when it's running?If it may be set,how.... ...

HELP HELP HELP
I need EAS 3.0.1 mantainance as soon as possible or at least an updated datawindow.jar. I've already asked the mantainance CD to italian Sybase support but they know nothing about it. If someone from sybase could send me an updated datawindow.jar would be very very appreciated. Please email me to m.mazza@ads.it Thank you Mauro Mazza Research & Develop - Gruppo FINMATICA E-mail: m.mazza@ads.it http://www.ads.it ADS automated data systems - Data Processing S.p.A. Via Del Lavoro, 17 40127 Bologna - Italy tel. +39 051 6307 411 fax. +39 051 6307 498 We expect t...

help help help
after i unload., theni install adaptaive server.......everythings running well but unluckily it cannot start the adaptive server when installing but backupserver and XP server can install and start it Building Adaptive Server "abc", unable to boot server "abc" server "abc" was not connected anyone can help me Was an errorlog created for this ASE in the ASE install directory? If so, what does it say? Zidane wrote: > after i unload., theni install adaptaive server.......everythings running > well > but unluckily it cannot st...

help!help!help!
Sorry to re-post again, Hi, Dean : 1. Are you dialing an ISP or dialing modem pool in side the company? I am dailing an ISP. Because some of my client use this way. 2. Is the Jag server behind a firewall? No, there is no Firwall. 3. Do you have a proxy for the remote component? Yes. 4. What is the syntax of createinstance? ls_class = "p_packagename/n_cst_logon" if not isvalid(inv_logon) then ll_return = g_connect.CreateInstance(inv_logon,ls_class) if ll_return <> 0 then ls_return = ...

HELP, HELP, HELP!!!!
can't Install dbd for postgreSQL someboy can help, Me How about some code. Do you have the DBD::pg installed? Send in you code so we can help. Ilya Sterin -----Original Message----- From: aguztyn@cancun.com.mx [mailto:aguztyn@cancun.com.mx] Sent: Monday, April 02, 2001 4:45 PM To: dbi-users@perl.org Subject: HELP, HELP, HELP!!!! can't Install dbd for postgreSQL someboy can help, Me ...

HELP, HELP, HELP
What am I doing WRONG #!/usr/bin/perl -w # # Consilta.cgi # push(@INC,"/var/www/cgi-bin/"); require("cgi-lib.pl"); $|=1; #use strict; use DBI; use CGI; sub avisa_y_salte { my $error = "@_"; print &PrintHeader; print "<h1>Error Inesperado</h1>"; print "<p>$error</p>"; print &HtmlBot; die $DBI::errstr; } my $version="V.20.01"; my $registro="<CENTER><H5><I>Consulta Ciudadana $version 2001. <A HREF=\"mailto:a...

HELP HELP HELP
i need help, i use an dbmaker 3.0 server and now i want to use an client to go on it but i dont have an client(i have dbmaker 3.6 but it don't work) who can help me with the dbmaker 3.0 client (tools,files,drivers) email me kelly.kloen@siteways.nl ...

HELP HELP HELP
Hi again: Just tested my first test and proceeded to test and install a second time. This time I let the server run the update after registering with Novell. However, upon reboot the server was dorked as it could not read my /usr and /var partitions (fstab was bad). Now here is what changed between my first the second build: I added a separate partition for /usr, that is all. I could really use a hand here. If I can't trust the update mechanism ...... Chris. Chris wrote: > Hi again: Just tested my first test and proceeded to test > and install a second...

help help help
i wanna know the list of compite time errors related to code correction/programming errors in powerbuilder.thanks lot cenk That's a pretty big request. You want a list of everything it is possible to do wrong in PowerBuilder? What you might want to do is search the solved cases infobase on the Sybase web site. On Tue, 15 Jun 1999 11:50:32 +0300, in powersoft.public.powerbuilder.general cenk KIZILDAG <cenk1536@yahoo.com> wrote: >i wanna know the list of compite time errors related to code >correction/programming errors in powerbuilder.thanks lot > >c...

Web resources about - help system, help! - asp.net.client-side

List of areas in the United States National Park System - Wikipedia, the free encyclopedia
The National Park System of the United States is the collection of physical properties owned or administered by the National Park Service . This ...

Turnbull government unveils new five-tier terror alert system
Australia has a new five-tier terror alert system but the actual threat of an attack on home soil has not changed, the government said on Thursday. ...

Apple invents active shutter system to protect iPhones from liquid, contaminants
An Apple patent application published Thursday details methods of implementing a powered shutter system that automatically blocks access to speaker, ...

Ars System Guide November 2015: Bargain Box
(credit: Illustration by Aurich Lawson) Since the early 2000s , the Ars System Guides have been helping DIYers to become system-building tweakmeisters. ...

CLOUD COMPUTING VCE Taps Cisco ACI for New Vblock System, More Secure Data Centers
CIO Today CLOUD COMPUTING VCE Taps Cisco ACI for New Vblock System, More Secure Data Centers CIO Today The next evolution of VCE's Vblock ...

Crown Estate Launches Interactive Map Of UK’s Offshore Wind System
One of the UK’s largest property owners, the Crown Estate, has launched an interactive map of the country’s offshore wind system. The interactive ...

Lenovo patches serious flaws in PC system update tool
... issues have forced Lenovo to update one of the tools preloaded on its PCs. Last week, the company released version 5.07.0019 of Lenovo System ...

IRS’s Outdated Fraud Prevention System Could Cost Taxpayers Millions
'The EFDS is vulnerable to structural failure and potentially the inability to detect up to $1.

I have high hopes for the System Shock remake
Night Dive Studios sure is keeping itself busy with the System Shock property. The company touched up the iconic Looking Glass title earlier ...

Facebook's new alert system warned the US about Iranian hackers
How do you think the US would find out about a state-sponsored hack from Iran? Sophisticated security software? Surveillance? Nope Facebook. ...

Resources last updated: 11/28/2015 10:49:26 PM