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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Question about formsQuestion about forms
Previous
 
Next
New Post
8/8/2008 5:35 PM
 

I have a module with a form.

<form id="jobform" name="jobform" action="">

I am trying to use prototype.js to serialize the form fields but it's not working. I suspect there is a problem with having my form buried within the default.aspx form. So how can I get a form *name* that I can use?

thanks

Nick

 

 

 

 
New Post
8/8/2008 6:23 PM
 

forms cannot be nested. Have a look e.g. on Feedback or Survey module, how to use DNN form.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
8/10/2008 1:32 AM
 

I did take a look at the feedback module but it did not answer my question. I wanted to share with you what my problem is and how I solved it. It ended up being pretty simple.

I'm porting a complex .net application to dotnetnuke. It's complex because it uses a lot of client side javascript and ajax. I am not using the microsoft ajax library. When I wrote the application 2 years ago, I was using prototype.js. The microsoft library was not able to do drag and drop properly. If you have 2 <div>s and they both have scrollbars, the microsoft library was not able to properly track the position of the element as it moved from one scrollable <div> to the other. Matter of fact, 2 years ago, *no* javascript libraries that I found correctly handled this problem so I had to write my own.

Since then, the problem has been solved and I found that Yahoo's YUI library to be the best and most robust open-source javascript library available. So I have chosen that as my front end development environment. The past week of getting YUI to work with DotNetNuke has been quite educational... But I decided I needed to go through the pain to create the product I'm working on. The drag and drop module is working great.

The problem I had yesterday was working with an iCalendar algorithm that I had written. It relied heavily on statements such as this:

document.theform.duration[1].checked = true;

As you can see, I needed the document's form to get to things like radio button collections, etc. The line of code above was what I had written 2 years ago. As I was studying DotNetNuke, I finally found that a global variable was created for the form:

var theform = document.forms['form'];
if (!theform) {
    theform = document.form;
}

this is from default.aspx. Its very similar to what I had written 2 years ago. When I changed all my code to this:

theform.duration[1].checked = true;

everything just started working. That was a serious relief. This particular module has thousands of lines of javascript and I seriously was having major butterflies in my stomach trying to get this to work...

I'm really happy that I chose

a) DotNetNuke and
b) Yahoo YUI

the combination of the 2 is making for a robust website with a great consistent look.

I hope this long post helps someone.
Nick

 
New Post
8/10/2008 1:37 AM
 

I was just rereading my post and I saw that the DotNetNuke software took the word

t h e Fo r m

that had the F capitalized and lower-cased the F to turn it into theform all lower-cased.

What the heck is that all about?

I just wanted to clarify that so someone else doesn't struggle with trying to use a lower-cased theform which will not work in javascript.

Nick

 

 
New Post
8/10/2008 2:21 AM
 

I apologize, there are a few simple substitution rules applied to prevent injections.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Question about formsQuestion about forms


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