views:

319

answers:

4

I am building an admin portal for a helpdesk. On one page I have a dropdown with a LinkButton, and another a dropdown with a Button. Both buttons redirect to the page they are clicked from by firing off a Response.Redirect(), like so:

Response.Redirect(String.Format("article.aspx?action={0}", ActionDropDown.SelectedValue), False)

This allows me to use one page for multiple functions.

Anyway, the page that the LinkButton does NOT work on has a WYSIWYG editor, FCKeditor, in it and FireBug throws the following error when I click the LinkButton:

FCKeditorAPI is not defined
 - WebForm_OnSubmit()()
 - WebForm_OnSubmit()
 - __doPostBack("ctl00$Content$LinkButton1", "")
 - Sys$WebForms$PageRequestManager$_doPostBack("ctl00$Content$LinkButton1", "")
 - (?)()()
 - javascript:__doPostBack('ctl00$Content$LinkButton1','')
 - var editor = FCKeditorAPI.GetInstance('ctl00_Content_NewArticleEditor');

No errors when I use a button. Any thoughts?

Javascript is NOT disabled in the client.

+1  A: 

Not a full answer here, but a couple of things to check would be that you ensure JavaScript turned on on the client? (sounds like it from the error).

The most obvious thing to check would be what the button is actually doing on the click. Is it rendered as a submit button, or is it doing a postback?

Martin Clarke
You mean javascript is turned off at the client.
Tundey
My instinct was that it is turned on. Because otherwise he wouldn't have got an error in FireBug.
Martin Clarke
+1  A: 

LinkButton uses javascript. Check that it's not turned off on the browser.

Tundey
A: 

I think that it's because LinkButton is rendered into his own <form>, which is inherited in the FCKEdit, or maybe FCKeditor overrides it's form's onSubmit behaviour?

Yossarian
A: 
Zhaph - Ben Duguid
I am using the FCKeditor.Net wrapper
Anders