Sign In  |  Register
 
 DotNetNuke Powered!
DotNetNuke Support Forums

Adding an ONCLICK event to a link through "Rich Text Editor" Only

Rate this topic:

Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

AuthorMessages
RegGFX
Posts:25



01/17/2008 4:54 PM  

I’ll try to explain as clearly as I can on what I’m trying to accomplish

 

While inside the Edit Text/HTML and with the Radio button “Rich Text Editor” selected.

I type text inside the rich text editor that says “View Other Site”.

I then proceed to use the Insert/Edit link button of the editor to make the text into a link.

This brings up the  Link—Webpage Dialog popup window with “Link Info”, “Target” and “Advanced” tabs of the popup window.

Now here is my question at this point…

 

How do I add an ONCLICK event for a link that calls a javascript function?

 

In other words the HTML code would look like this.
onClick="return ExitNotice();">View Other Site

 

Technically I could use the “source” option and just type the code above in….

 

But there doesn’t appear to be away to add an ONCLICK event to the link while using only the “Rich Text Editor”.

 

Is there a way to add an “ONCLICK” event to a link while only using the “Rich Text Editor”?

Just curious if there is an idea to accomplish this.

John Mitchell
Posts:3033



01/17/2008 5:05 PM  
You can edit the source HTML by switching to the "Source" view. Upper Left button on the toolbar.

Some JS might get mangled if you switch back to HTML view before saving, so do the WYSIWYG editing forst, then switch to source view and add any JS, then update or save without switching back.
RegGFX
Posts:25



01/18/2008 4:17 PM  

Thanks John...

I was thinking that was what i needed to do. Just thought i'd check to make sure everyone else in DNN world was doing the same thing when it came to trying to call a JS script function via with a link created in the WYSIWYG editing tool.

It would be a neat feature if we could talk the DNN Core group into adding an input field to the Webpage dialog popup to handle or insert the ability to call an OnClick JavaScript Function inside the link...

But do they really listen to us users and web designers?

We'll just use YE 'OL HAND CODING for now...
As Always, Thanks for the info

Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

Forums >DotNetNuke Support >General-DNN-Help > Adding an ONCLICK event to a link through "Rich Text Editor" Only



ActiveForums 3.7
Visit our Store for great DotNetNuke Modules and Skins
DNNMasters Sitemap/Google Sitemap 3.0

Item codeSM3-01
Price$29.00
Product Information 
DotNetNuke CSS NavMenu 3.3 (Developers)

Item codeCSSNM33DEV
Base Price$149.00
Product Information 
Snapsis PageBlaster 3.3.2 for DotNetNuke - Professional Edition

AuthorJohn Mitchell
Base Price$79.00
Product Information