Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...jQuery Tests: Not showing in FirefoxjQuery Tests: Not showing in Firefox
Previous
 
Next
New Post
3/7/2009 11:54 AM
 

I am just starting to learn jQuery and so I've created the most bare bones sample module for just plain javascript.  I used the Simple Dynamic Module template in VS 2008 for DNN 5.0 and used the View.ascx to place a button and a label within a div.  Later I was going to try substituting jQuery code.

The following works in IE 7 (when I click the button the word 'Hide' disappears).

 

 

I checked to make sure I don't have javascript disabled in Firefox. 

So what am I doing wrong?

 

function ShowHide(divName, OnOff) {
    var ele = document.getElementById(divName);
    if (ele != null) {
        if (OnOff == "on")
            ele.style.display = "block";
        else
            ele.style.display = "none";
    }
}

 

	Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Try
                DotNetNuke.Framework.jQuery.RequestRegistration()
                Dim jQueryEthScriptPath As String = Me.TemplateSourceDirectory & "/SomeScript.js"
                Page.ClientScript.RegisterClientScriptInclude("SomeScript", jQueryEthScriptPath)
                If Not Page.IsPostBack Then

                End If
            Catch exc As Exception
                ProcessModuleLoadException(Me, exc)
            End Try
        	End Sub

 

<input id="Button1" type="button" value="button" onclick="ShowHide('myDiv','off');"/>
<div id="MyDiv">
<asp:Label ID="Label1" runat="server" Text="Hide"></asp:Label>
</div>
 
New Post
3/7/2009 11:58 AM
 

Ummm... well.  I copied and pasted some stuff in and it somehow didn't display right in the text above.  Sorry if this looks a little strange.

Laurie

 
New Post
3/8/2009 12:47 AM
 

In my jQuery tests, I'm trying to get this basic javascript to work and then I'll start referencing the jQuery library.  But maybe I'll be lucky to find someone who already has a very, very simple "click me to hide me" DNN module that uses jQuery and works in both IE and Firefox.  Or maybe there are several gotchas with using basic javascript and I should jump right into jQuery?

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...jQuery Tests: Not showing in FirefoxjQuery Tests: Not showing in Firefox


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out