CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting
3 Months Free and Free Setup - ASP.NET Web Hosting



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 11/15/2007 7:27:41 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 22 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
acemagoo
Asp.Net User
Executing javascript from menu adapter11/15/2007 7:27:41 PM

0/0

Is there an easy way to execute a registered javascript from the menu adapter? 

I usually do this:

In code behind: 

HyperLink1.Attributes("onclick") = "popup_" & PopName & "();focus();" 

Which creates this in the html: 

<a id="HyperLink1" onclick="popup_myFeed();focus();" href="javascript:void(0)">

Or do I need to alter the adapter source code?

 Any creative ideas before I alter the code?
 


acemagoo
Asp.Net User
Re: Executing javascript from menu adapter11/16/2007 12:21:13 PM

0/0

The only adapter I have played with so for is the menu adapter, so changes were made there and not in ?WebControlAdapterExtender.vb? as I am not certain of the impact it would have on other adapters.

Made the following changes to MenuAdapter.vb in Sub routine BuildItem:

If (IsLink(item)) Then
    writer.WriteBeginTag("a")
    If (Not String.IsNullOrEmpty(item.NavigateUrl)) Then
       ' Begin script exception code
        If (item.Target.StartsWith("javascript:")) Then
         writer.WriteAttribute("href", Page.Server.HtmlEncode(menu.ResolveClientUrl(item.Target)))
            item.Target = Nothing
            Dim js As String = item.NavigateUrl.ToString
            writer.WriteAttribute("onclick", js)
            writer.WriteAttribute("onkeypress", js)
         Else
            ' End script exception code
            writer.WriteAttribute("href", Page.Server.HtmlEncode(menu.ResolveClientUrl(item.NavigateUrl)))
      End If
Else

__________________________________________________________________________

In code behind:

' Set variable script popup name from PopName property in
' class instance and add hyperlink attributes
strPopUp = "popup_" & myPopup.PopName & "();focus();"
HyperLink1.Attributes("onclick") = strPopUp
HyperLink1.Attributes("href") = "javascript:void(0)"

' Set Menu adapter variables for specific menu item
Me.Menu1.Items(0).ChildItems(0).ChildItems(0).Target = "javascript:void(0);"
Me.Menu1.Items(0).ChildItems(0).ChildItems(0).NavigateUrl = strPopUp

2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
Covert Java: Techniques for Decompiling, Patching, and Reverse Engineering Authors: Alex Kalinovsky, Pages: 288, Published: 2004
Rails Cookbook Authors: Rob Orsini, Pages: 514, Published: 2007
Database Programming with Visual Basic . NET and ADO. NET: Tips, Tutorials, and Code Authors: F. Scott Barker, Pages: 524, Published: 2002
Computers in Your Future 2003: Complete Edition Authors: Bryan Pfaffenberger, Pages: 750, Published: 2002
Hacking Windows Vista: ExtremeTech Authors: Steve Sinchak, Pages: 316, Published: 2007
XML-Based Integration with Xaware: Unifying Applications and Data in Today's E-Business World Authors: Kirstan Vandersluis, Pages: 432, Published: 2004
Peter Norton's Complete Guide to Windows NT Workstation 4 Authors: Peter Norton, Richard Mansfield, John Mueller, Pages: 944, Published: 1998
Taking Your IPhone to the Max Authors: Erica Sadun, Pages: 182, Published: 2007

Web:
Editing style sheet for menu adapter crashes Visual Studio - ASP ... Editing style sheet for menu adapter crashes Visual Studio .... I have more than the java script for the adapters on a web site, ...
Editing style sheet for menu adapter crashes Visual Studio - ASP ... the only javascript my site currently uses is that which ASP. .... The left column contains a verticle menu adapter with a second tier ...
ASP.net CSS friendly Control Adapters CSS Friendly Control Adapters home site. It took a day to get this menu and ....
HomePlug / PowerLine PL-85PE 85Mbps Ethernet Adapter Click here. Menu Spacer ... 85Mbps Ethernet HomePlug Adapter. The Solwise PL- 85PE Homeplug Ethernet Adaptor provides No New Wires communications to any room ...
Linksys Wireless-G PCI Adapter WMP54G WMP54G-UK from Microwarehouse It appears that your web browser does not support Javascript, .... The user will be offered an on screen menu display of major categories such as Computer, ...
DHTML Kitchen Two of the script tags (urchin.js, inline) use javascript to ..... An example of an Adapter object would be a Content Load Adapter or a KeyEvent Adapter ...
AICC/SCORM JavaScript API for WBT Manager December 1, 2000 ... This adapter consists of a Java Applet that is embedded in the course menu. On lesson launch the applet's functions are made available to the lesson as a ...
Download free ASP templates - Free ASP Templates. CSS rules that impact the markup rendered by the Menu adapter ..... attribute on the tag to provide a JavaScript statement to execute on the ...
Steps for adding a CSS Control Adapter - Onion Blog - Pluralsight ... Step 16b: Now all of your menu controls should be rendered using the menu adapter! Note that if you don't want to place the helper JavaScript files in ...
Visual Traceroute - Cross-browser, JavaScript DHTML menu builder ... Visual Traceroute - Cross-browser, JavaScript DHTML menu builder Set of network tools for ... The program is not critical to the video adapters and drivers. ...












bug? login control fires onloggedin and onloginerror twice with css friendly adapters

help

different output of menuadapter- and sharepoint:aspmenu-control

install - update - css control adapters

set adapter by code

ie not responding when span.aspnet-detailsview-value left-margin more 8em?

gridview adapter skips colum style

using this in an application?

horizontal menu 1st tier text overlapping 3rd tier menu items

beginner problem

how can i get wrapped text in a detailsview boundtext item to start just below the heading.

aspnet-menu-withchildren aspnet-menu-childselected

no results with vb code when using css-adapters

changepassword validation group

css height

why does adapter class invoked on startup without doing anything?

browser definition files - restrict to certain folders only

mix css / non-css controls in same web app?

menu css control adapter

javascript files embedded in cssfriendly.dll?

in ie6, menu has delayed display during hover over

.vsi broken?

can't get expanded treeview to fire onchange (also treeview not indenting)

last menu item drops down several pixals after certain width

vetical menu align to top and one menu item no function

script block not being generated

login control & validation

detailsview not appearing during debug

page with menu does not validate

treeview not keeping state

  Privacy | Contact Us
All Times Are GMT