Need
DNN Support
?
DeskPal.com
Learn DNN / DotNetNuke
Login
Subscribe to DNNCreative
Home
Subscribe
Training & Tutorials
Tutorials for Beginners
Tutorials for Administrators
Tutorials for Core Modules
Tutorials for Advanced Users
How to Build a Website in DotNetNuke
Skinning Tutorials
Module Development
Third Party Modules
Forum
Search
Search
Home
Subscribe
+
Training & Tutorials
Tutorials for Beginners
Tutorials for Administrators
Tutorials for Core Modules
Tutorials for Advanced Users
How to Build a Website in DotNetNuke
Skinning Tutorials
Module Development
Third Party Modules
Forum
You need to
Register
for free and
Login
to post a message in the forum.
Forum
Forums
Search Forum
Search
Advanced Search
Topics
Posts
Unanswered
Active Topics
Forums
>
DotNetNuke®
>
DotNetNuke® Questions
implementing form buttons within DNN
Last Post 01/18/2011 12:44 PM by
Bo
. 4 Replies.
Sort:
Oldest First
Most Recent First
Check this box to subscribe to this topic.
Prev
Next
You are not authorized to post a reply.
Author
Messages
Bo
Nuke Master
Posts:215
01/17/2011 11:29 PM
Hello Joe, Lee and anyone else who has had experience with adding form elements in a DNN page that is based on a form this question is for you. My last post was basically comments on how I was able to pull in a java applet into the DNN environment but what I did not include in that thread was the question I had in regards to building a couple submit buttons within a aspx page created by DNN. You see this particular applet I am using also has some javascript wired into it somehow for the purpose of making various financial calculations. Now the problem is that the javascript function which calls these form buttons actually writes out the html start and end form tags to encapsulate the submit input buttons. Now I know that in an asp.net hosting environment this is a no no as you are nesting a form within the main aspx page which is a form in itself which causes confusion on postbacks. I know there is a javascrit solution or work around for this very situation but I am not sure how to implement it. How can I do a postback for a particular submit button that interacts with this java applet without using the wrapper form tag. Could anyone give me some sample code of how to achieve using submit buttons via javascript DOM. I know robust forms like dynamic forms from datasprings must use this approach in being able to allow the creations of its forms but I am pretty sure this is not the solution I am looking for in my case since all I need to create is two form components that are simply submit buttons that interact differently with the java applet depnding on what button you click on but again I know a form wrapper is not the solution since it would only confuse the asp.net framework. Thanks for your help in this, Bo
Joseph Craig
DNN MVP
Posts:11667
01/18/2011 7:28 AM
Bo,
Here
is a nice reference.
Basically if you have a form that you want to include, you include everything BUT the opening and closing form tags. Then, you replace the Submit button's action with a javascript to handle the onClick event. This, essentially, uses the DotNetNuke page as the form and that uses the Input fields for data.
Note that is you have multiple buttons, they will use the same inputs.
When you say "java applet" are you really are talking about javascript?
Joe Craig,
Patapsco Research Group
Complete DNN Support
Bo
Nuke Master
Posts:215
01/18/2011 9:17 AM
no I really do mean java applet.
There is a client I have who has an old server (not using asp.net) who has some sort of calculator that was written in java and compiled to a .class file with a java archive or JAR file as well so it has to be contained in an HTML Applet tag.
However this same calculator has two submit buttons after the applet is closed which is basically done in a javascript function and than that function is called after the applet.
In this javascript function that creates these buttons is the statement to do a document.write and it writes the needed start FORM and end FORM tags surrounding the input button via javascript but I knew that this was not good in the asp.net environment so somehow they are via javascript wiring functionality with these buttons to interact with the java applet. I have to see exactly how there doing this but once I get a handle on executing actions vis an onclick even and allowing the main form of the page to be kept without a nesting form than I know I can get through the rest.
By the way Joe how would you handle a method attribute via an onClick event (i.e. method equals post or method equals get how do you trigger the method you want your form to be submitted in via the javascript DOM.
Thanks,
Bo
Joseph Craig
DNN MVP
Posts:11667
01/18/2011 11:48 AM
I haven't looked carefully, but I think that javascript can do a get or a post. You should be able to do this with jQuery, too.
I saw your other message after replying. Yes, you were talking about java.
Joe Craig,
Patapsco Research Group
Complete DNN Support
Bo
Nuke Master
Posts:215
01/18/2011 12:44 PM
Hello Joe,
I didn't actually have to do much as the script that was being used on the old server used an onclick even on the input button to achieve its goal. All I had to do is strip the FORM and end FORM tags from the document.write property so those actual form tags did not encapsulate my submit buttons. Than I through all this code into a js file and just referred to it in the head section of the page for my button functionality and simply called the function with a script tag in the html module of course I had tweaked the config file so as not to use default filters but created a tag for each filter I wanted to use in the RAD editor which basically was everything but the script stripping filter which by default is included in the rad editor.
Once I get better with writing DNN modules perhaps I could use the default filters that comes natively with the Telerik for DNN but until that time I must rely on the html module to inject my scripts actually I guess in reality I could use the script injector module couldn't I and than keep the default filters for my telerik rad html provider so there won't be as much of a security risk or chancing of nasty scripts being able to be injected.
I didn't even think of that option it popped in my head as I was replying to your message.
Cool
You are not authorized to post a reply.
Special Bonuses
--Subscriber Bonuses
--Readers Offers
Users Lounge
--Announcements
--DNN Creative Articles
--Everything Else
--Feedback, Suggestions and More
--Membership
--Site Review Please!
--Testimonials
--Podcasts
DotNetNuke®
--DotNetNuke® Questions
--Modules
--Modules - What's needed?
--Quick Tips
Hosting
--DotNetNuke® Hosting Providers
Skinning Toolkit
--Skinning Toolkit
UK DotNetNuke User Group
Forums
>
DotNetNuke®
>
DotNetNuke® Questions
Latest Forum Posts
Can you Run Xcode in Linux?
by Aman Singh
Can you Run Xcode in Linux?
Can you Run Xcode in Linux?
by Aman Singh
Can you Run Xcode in Linux?
Billed for subscription that was canceled
by Ryan
I was just billed for a subscription that was canc eled / inactivetive how do I get a refund for th
Meta Title and Meta Description are not showing properly
by DNN User
Hi, On my site the meta title and meta descriptions are not showing properly. It's showing the m
Search is not functioning properly
by DNN User
Site: https://www.prv-engineering.co.uk/search If I search any item only the 1st option under sea
Search is not functioning properly
by DNN User
Site: https://www.prv-engineering.co.uk/search If I search any item only the 1st option under sea
DNN Platform import site optio
by Melanie Weaver
Is it possible to import site template in DNN Platform 8.0? We have internal Evoq Content 8.1 tha
Events Module for DNN V5?
by Tugboat
Would anyone have a download link for the version 5.0.3 Events Module? Thanks!
"Ghost" TabID Number?
by Tugboat
Hi! I have a portal instance with multiple child portals and on one of the child portals, there i
RE: DNN Load Testing
by ayman sharkawy
Hi. Have you already implemented a site using the DNN . And how the performance of the site and its
Publish All Pages
by NSUOK
I'm using DNN Evoq Content Basic 8.2.0. When I make the HTML Pro module display on all pages, I h
Simpler profile needed in 9.2.2
by Donald
We are upgrading a DNN 4.8.4 site to DNN 9.2.2. On 4.8.4, the top bar shows the user’s name. If yo
How to link from dnnmodal popup to web site page?
by Donald
Hello all. I am using a dnnmodal.show popup. The popup works correctly, showing the content that I
RE: Document Collaboration
by Nick Davern
That feature would be super beneficial for our needs as well! Does anyone have an update as to if th
RE: DNN 9.2, how to set default theme?
by Andy Stephenson DNN Creative
you do that under "Manage/Themes". Note the highlight blue border around the default container and d
DNN 9.2, how to set default theme?
by Donald
Please disregard, found Manage Themes I cannot find how to set a default portal theme in DNN 9.2
RE: Looking for DataSprings Dynamic Forms
by Andy Stephenson DNN Creative
Your best chance would be to contact Chad Nash @ http://www.datasprings.com/
Looking for DataSprings Dynamic Forms
by Jakir HM
Looking for DataSprings Dynamic Forms 3.4 for DNN 4.x 5.x for my site (https://themasters2018s.com/)
RE: Help with Cycle Image Carousel not displaying images
by peter
I had the same problem with the Will Strohl Content Slider after upgrading to DNN 9.1 The above an
RE: Object reference not set to an instance of an object
by Andy Stephenson DNN Creative
Check this one might be useful: http://www.dnnsoftware.com/answers/im-tryin-to-move-my-site-to-pr
Used
By
Testimonials