You need to Register for free and Login to post a message in the forum.

Forum

Subject: How to add javascript
Prev Next
You are not authorized to post a reply.

Author Messages
sandip
Nuke Active Member
Nuke Active Member
Posts:29

01 Mar 2006 10:46 AM  

Hello Lee,

Though it is very simple but I want to clear it  in context of DNN.

I want length of textbox if is 3 then attached with "-". Now for this what approch should follow.

1. Whether I should do it into backend code or client code. As I don't want to reload the form, simple I choose Client side scripting. I tried to add javascript into .ascx file but it is giving me error and GUI is not showing.

2. So is it ok if I add javascript through vb file. For this I tried popupScript As String

popupScript = "<script language='javascript'>function Test() {alert('Just to check'); }</script>"

Page.RegisterStartupScript("PopupScript", popupScript)

txtHomePhone.Attributes.Add("onKeyPress", "Test();")

It is working proper for above code and giving alert message on keypress event.

So my question is: Is it right approch or is there any other easy solution for this.

Thanking you,

Sandip

 

 

Dim

leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3313

01 Mar 2006 5:10 PM  
Hello,

To be honest, I do not know the 'best practice' method. It makes sense the method you are using. - Perhaps you should start a post in the main DNN forum and ask other developers what practices they employ?

You maybe interested in viewing this site covering un-obtrusive-Javascript
http://www.bennolan.com/behaviour/

There are a few links in the article worth following, thanks

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
You are not authorized to post a reply.
Forums > DotNetNuke® > DotNetNuke® Questions > How to add javascript



ActiveForums 3.7

Latest Forum Posts

Firefox Does Not Display WMV File In Media Module by johnmk777
Hi All,I can't believe I am having such a hard time finding and answer to this question.  I have see...
advice wanted convert site to DNN while keeping existing asp functionality by max2o
I am running into the issue that a client wants to redesign their site and they want content managem...
RE: Site is not opening by leesykes
from the message it is referencing php - is it a dnn site? - is asp.net applied for the site?
RE: SolPart Menu Font Color Control by leesykes
Hello,I'm not aware of any documentation at the moment. But here is a list of Nav Menu PropertiesTo ...
Site is not opening by kaustav_kar
Hi,Whenever I'm writing the url (http://tajfood.com.sa) it's showing the following error; Index of ...
RE: SolPart Menu Font Color Control by cdees
 Lee, Is there documentation, or perhaps a tutotial on activating and using Nav menu?  Where would I...
RE: EasyCGI help? by Dr Joe
I found some interesting posts on some other sites that explain some of the challenges I've been exp...
RE: Menu's, menu's, and more menu's! by roadshow41
Thanks! I'm still a bit curious about some of the other options, but I think that gives me enough c...
RE: Menu's, menu's, and more menu's! by leesykes
Hello,Yes that should be possible with snapsis, I have used snapsis CSS with flyout menus on a horiz...
RE: Menu's, menu's, and more menu's! by roadshow41
I typically end up using a hybrid of a vertical menu and a horizontal menu due to the sheer number o...
DotNetNuke SEO (Search Engine Optimization) by leesykes
Hello,I regularly get asked for tips on SEO with DotNetNuke, there are several resources available o...
RE: Menu's, menu's, and more menu's! by leesykes
Hello,If you are looking for a menu for SEO reasons, any CSS based unordered list menu will be SEO f...
Menu's, menu's, and more menu's! by roadshow41
Well, I've been trying to steam ahead with the DNN sites I inherited a few months ago.  I've found l...
RE: EasyCGI help? by derpir
Hi Lee I told them that solution two days ago and still no answer, but thanks for suggesting that s...
RE: quick question by derpir
Hithanks! yes I understand. I will deal with my skins more tomorrow, maybe some questions will arriv...
RE: Restart Application by leesykes
It will restart your DotNetNuke installation and reload the application.Clearing cache will clear th...
RE: How can i edit any module from front end by leesykes
hello,I have just tested this and can see exactly the same as you, I suspect the core team have set ...
RE: EasyCGI help? by leesykes
You may want to ask them to reset the correct permissions on your DotNetNuke installation files, som...
RE: quick question by leesykes
Hello,It will be possible to a degree, but it depends on how both of the skins have been built. You ...
RE: EasyCGI help? by Dr Joe
I'll let you know how it works out. I think I opened up about 6 tickets with them so far. ...
AppTheory
RSS Feeds